2024-03-04 00:34:39 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
# System.
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Android.
|
|
|
|
nix-on-droid = {
|
|
|
|
url = "github:t184256/nix-on-droid/release-23.05";
|
2024-03-04 23:11:23 +03:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
2024-03-04 00:34:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
# Nvim plugins.
|
|
|
|
nvimAlign = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/mini.align.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimAutoclose = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/autoclose.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimBufferline = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/bufferline.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimCloseBuffers = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/close-buffers.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimDevicons = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/nvim-web-devicons.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimGitsigns = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/gitsigns.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-03-05 22:25:23 +03:00
|
|
|
nvimGruvboxMaterial = {
|
2024-03-04 00:34:39 +03:00
|
|
|
url = "git+https://git.voronind.com/mirror/gruvbox-material.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimIndentoMatic = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/indent-o-matic.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimLspconfig = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/nvim-lspconfig.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimLualine = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/lualine.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimOllama = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/ollama.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimPlenary = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/plenary.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimSingleComment = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/SingleComment.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimTelescope = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/telescope.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimTodo = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/todo-comments.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimTokyonight = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/tokyonight.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimTree = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/nvim-tree.lua.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimTreesitter = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/nvim-treesitter.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimTrouble = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/trouble.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
nvimWhichKey = {
|
|
|
|
url = "git+https://git.voronind.com/mirror/which-key.nvim.git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-06 05:40:28 +03:00
|
|
|
outputs = { self, nixpkgs, nix-on-droid, home-manager, ... } @inputs: {
|
2024-03-04 00:34:39 +03:00
|
|
|
# Constant values.
|
|
|
|
nixosModules.const = {
|
2024-03-15 16:37:56 +03:00
|
|
|
url = "git+https://git.voronind.com/voronind/nixos.git";
|
|
|
|
hashedPassword = "$y$j9T$oqCB16i5E2t1t/HAWaFd5.$tTaHtAcifXaDVpTcRv.yH2/eWKxKE9xM8KcqXHfHrD7"; # Use `mkpasswd`.
|
2024-03-04 23:11:23 +03:00
|
|
|
droidStateVersion = "22.11";
|
2024-03-15 16:37:56 +03:00
|
|
|
stateVersion = "23.11";
|
2024-03-26 06:36:00 +03:00
|
|
|
timeZone = "Europe/Moscow";
|
2024-03-04 00:34:39 +03:00
|
|
|
};
|
|
|
|
|
2024-04-02 18:50:20 +03:00
|
|
|
# Colors.
|
|
|
|
nixosModules.color = {
|
|
|
|
bg = "1d2021";
|
|
|
|
bg_1 = "504945";
|
2024-04-02 20:34:27 +03:00
|
|
|
bg_2 = "3c3836";
|
2024-04-02 18:50:20 +03:00
|
|
|
blue = "458588";
|
2024-04-02 21:30:46 +03:00
|
|
|
blue_1 = "076678";
|
2024-04-02 18:50:20 +03:00
|
|
|
darkgray = "282828";
|
|
|
|
fg = "ebdbb2";
|
|
|
|
fg_1 = "fbf1c7";
|
|
|
|
fg_2 = "d5c4a1";
|
|
|
|
gray = "a89984";
|
|
|
|
green = "98971a";
|
2024-04-02 21:30:46 +03:00
|
|
|
green_1 = "87af87";
|
2024-04-02 18:50:20 +03:00
|
|
|
purple = "b16286";
|
|
|
|
red = "cc241d";
|
|
|
|
transparent = "ffffff00";
|
|
|
|
yellow = "b8bb26";
|
2024-04-02 21:30:46 +03:00
|
|
|
|
|
|
|
blue_1_rgb = "69;133;136";
|
|
|
|
fg_1_rgb = "251;241;199";
|
|
|
|
green_1_rgb = "135;175;135";
|
|
|
|
red_rgb = "204;36;29";
|
|
|
|
yellow_rgb = "184;187;38";
|
2024-04-02 18:50:20 +03:00
|
|
|
};
|
|
|
|
|
2024-03-04 00:34:39 +03:00
|
|
|
# Common modules used across all hosts.
|
|
|
|
nixosModules.common.imports = [
|
|
|
|
./module/common/AutoUpdate.nix
|
|
|
|
./module/common/Bash.nix
|
|
|
|
./module/common/Bootloader.nix
|
|
|
|
./module/common/Distrobox.nix
|
|
|
|
./module/common/Dotfiles.nix
|
2024-04-02 20:34:27 +03:00
|
|
|
./module/common/Environment.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./module/common/Filesystem.nix
|
|
|
|
./module/common/Firefox.nix
|
|
|
|
./module/common/Firewall.nix
|
|
|
|
./module/common/Font.nix
|
|
|
|
./module/common/Git.nix
|
|
|
|
./module/common/Kernel.nix
|
|
|
|
./module/common/Ld.nix
|
|
|
|
./module/common/Locale.nix
|
|
|
|
./module/common/Network.nix
|
|
|
|
./module/common/Nix.nix
|
|
|
|
./module/common/Nvim.nix
|
|
|
|
./module/common/Package.nix
|
|
|
|
./module/common/Ssh.nix
|
|
|
|
./module/common/Sshd.nix
|
|
|
|
./module/common/Swap.nix
|
|
|
|
./module/common/Tmux.nix
|
|
|
|
./module/common/Users.nix
|
2024-03-14 13:24:49 +03:00
|
|
|
./module/common/YtDlp.nix
|
2024-03-21 17:42:09 +03:00
|
|
|
./user/Root.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
# Function to create a host.
|
|
|
|
mkHost = { system, hostname, modules }: nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./host/${hostname}/Configuration.nix
|
|
|
|
{ networking.hostName = hostname; }
|
2024-03-04 23:11:23 +03:00
|
|
|
{ system.stateVersion = self.nixosModules.const.stateVersion; }
|
2024-03-04 00:34:39 +03:00
|
|
|
inputs.self.nixosModules.common
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
] ++ modules;
|
|
|
|
|
2024-03-31 22:34:21 +03:00
|
|
|
specialArgs = {
|
|
|
|
const = self.nixosModules.const;
|
2024-04-02 18:50:20 +03:00
|
|
|
color = self.nixosModules.color;
|
2024-03-31 22:34:21 +03:00
|
|
|
flake = self;
|
|
|
|
inputs = inputs;
|
|
|
|
};
|
2024-03-04 00:34:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
# List of all hosts bellow.
|
|
|
|
nixosConfigurations.dasha = self.mkHost {
|
|
|
|
hostname = "dasha";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./module/AmdGpu.nix
|
|
|
|
./module/Gnome.nix
|
|
|
|
./module/IntelCpu.nix
|
|
|
|
./module/PowersaveIntel.nix
|
|
|
|
./module/Print.nix
|
2024-03-09 20:42:25 +03:00
|
|
|
./module/RemoteBuild.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./user/Dasha.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.desktop = self.mkHost {
|
|
|
|
hostname = "desktop";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
2024-03-20 22:54:40 +03:00
|
|
|
./module/AmdCompute.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./module/AmdCpu.nix
|
|
|
|
./module/AmdGpu.nix
|
|
|
|
./module/Ollama.nix
|
|
|
|
./module/PowersaveAmd.nix
|
|
|
|
./module/Print.nix
|
2024-03-09 20:19:48 +03:00
|
|
|
./module/RemoteBuild.nix
|
2024-03-28 08:57:07 +03:00
|
|
|
./module/Sway.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./module/VirtManager.nix
|
|
|
|
./user/Voronind.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.fsight = self.mkHost {
|
|
|
|
hostname = "fsight";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./module/Docker.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.home = self.mkHost {
|
|
|
|
hostname = "home";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./module/AmdCpu.nix
|
|
|
|
./module/AmdGpu.nix
|
|
|
|
./module/Docker.nix
|
|
|
|
./module/Ftpd.nix
|
2024-03-09 20:19:48 +03:00
|
|
|
./module/RemoteBuilder.nix
|
2024-03-28 08:45:55 +03:00
|
|
|
./module/Sway.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./user/Voronind.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.laptop = self.mkHost {
|
|
|
|
hostname = "laptop";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./module/AmdCpu.nix
|
2024-03-04 21:19:30 +03:00
|
|
|
./module/AmdGpu.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./module/Gnome.nix
|
|
|
|
./module/Ollama.nix
|
|
|
|
./module/PowersaveAmd.nix
|
|
|
|
./module/Print.nix
|
2024-03-09 20:42:25 +03:00
|
|
|
./module/RemoteBuild.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./user/Dasha.nix
|
|
|
|
./user/Voronind.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.live = self.mkHost {
|
|
|
|
hostname = "live";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
|
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
|
2024-03-10 08:04:23 +03:00
|
|
|
{ networking.wireless.enable = nixpkgs.lib.mkForce false; }
|
|
|
|
{ services.openssh.settings.PasswordAuthentication = nixpkgs.lib.mkForce true; }
|
|
|
|
{ services.openssh.settings.PermitRootLogin = nixpkgs.lib.mkForce "yes"; }
|
|
|
|
{ system.autoUpgrade.enable = nixpkgs.lib.mkForce false; }
|
|
|
|
({ pkgs, ... }: { boot.kernelPackages = nixpkgs.lib.mkForce pkgs.linuxPackages; })
|
2024-03-04 00:34:39 +03:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations.work = self.mkHost {
|
|
|
|
hostname = "work";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./module/IntelCpu.nix
|
|
|
|
./module/Ollama.nix
|
|
|
|
./module/Powerlimit.nix
|
|
|
|
./module/PowersaveIntel.nix
|
|
|
|
./module/Print.nix
|
2024-03-09 20:42:25 +03:00
|
|
|
./module/RemoteBuild.nix
|
2024-03-28 04:27:37 +03:00
|
|
|
./module/Sway.nix
|
2024-03-04 00:34:39 +03:00
|
|
|
./user/Voronind.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Android.
|
|
|
|
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
|
|
|
modules = [
|
2024-03-09 01:15:42 +03:00
|
|
|
{ system.stateVersion = inputs.self.nixosModules.const.droidStateVersion; }
|
2024-03-04 00:34:39 +03:00
|
|
|
./module/NixOnDroid.nix
|
|
|
|
];
|
2024-03-31 22:34:21 +03:00
|
|
|
extraSpecialArgs = {
|
|
|
|
const = self.nixosModules.const;
|
2024-04-02 18:50:20 +03:00
|
|
|
color = self.nixosModules.color;
|
2024-03-31 22:34:21 +03:00
|
|
|
flake = self;
|
|
|
|
inputs = inputs;
|
|
|
|
};
|
2024-03-04 00:34:39 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|