refactor: move home-manager module to their respective hosts

This commit is contained in:
2024-10-21 16:25:00 +05:30
parent ee4670912b
commit b9d444e78d
10 changed files with 80 additions and 121 deletions

128
flake.nix
View File

@ -53,154 +53,42 @@
nixosConfigurations = { nixosConfigurations = {
arcturus = nixpkgs.lib.nixosSystem { arcturus = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/arcturus];
./hosts/arcturus
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/arcturus/home.nix
];
};
}
];
}; };
canopus = nixpkgs.lib.nixosSystem { canopus = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/canopus];
./hosts/canopus
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/canopus/home.nix
];
};
}
];
}; };
alpha = nixpkgs.lib.nixosSystem { alpha = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/alpha];
./hosts/alpha
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/alpha/home.nix
];
};
}
];
}; };
sirius = nixpkgs.lib.nixosSystem { sirius = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/sirius];
./hosts/sirius
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/sirius/home.nix
];
};
}
];
}; };
vega = nixpkgs.lib.nixosSystem { vega = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/vega];
./hosts/vega
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/vega/home.nix
];
};
}
];
}; };
capella = nixpkgs.lib.nixosSystem { capella = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/capella];
./hosts/capella
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/capella/home.nix
];
};
}
];
}; };
vps = nixpkgs.lib.nixosSystem { vps = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/vps];
./hosts/vps
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/vps/home.nix
];
};
}
];
}; };
isoImage = nixpkgs.lib.nixosSystem { isoImage = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs username;}; specialArgs = {inherit inputs outputs username;};
modules = [ modules = [./hosts/isoImage];
./hosts/isoImage
home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "backup";
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs outputs username;};
home-manager.users.${username} = {
imports = [
./hosts/isoImage/home.nix
];
};
}
];
}; };
}; };

View File

@ -103,5 +103,11 @@
enable = false; enable = false;
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@ -142,5 +142,11 @@
enable = false; enable = false;
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@ -1,5 +1,6 @@
{ {
inputs, inputs,
username,
pkgs, pkgs,
lib, lib,
config, config,
@ -300,5 +301,11 @@
]; ];
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "24.11"; system.stateVersion = "24.11";
} }

View File

@ -1,6 +1,7 @@
{ {
modulesPath, modulesPath,
inputs, inputs,
username,
... ...
}: { }: {
imports = [ imports = [
@ -28,5 +29,11 @@
enable = false; enable = false;
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "24.11"; system.stateVersion = "24.11";
} }

View File

@ -13,6 +13,7 @@
in { in {
imports = [ imports = [
inputs.impermanence.nixosModules.impermanence inputs.impermanence.nixosModules.impermanence
inputs.home-manager.nixosModules.home-manager
../../modules/nixos/sops.nix ../../modules/nixos/sops.nix
]; ];
@ -121,4 +122,15 @@ in {
]; ];
}; };
}; };
home-manager = {
backupFileExtension = "backup";
useUserPackages = true;
extraSpecialArgs = {inherit inputs outputs username;};
users.${username} = {
imports = [
./home.nix
];
};
};
} }

View File

@ -1,10 +1,14 @@
{ {
pkgs, pkgs,
modulesPath, modulesPath,
inputs,
username,
... ...
}: { }: {
imports = [ imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
inputs.home-manager.nixosModules.home-manager
../../modules/nixos/default.nix ../../modules/nixos/default.nix
../../modules/nixos/desktop/awesome ../../modules/nixos/desktop/awesome
]; ];
@ -72,5 +76,11 @@
fonts.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})]; fonts.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})];
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@ -47,5 +47,11 @@
enable = false; enable = false;
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
username,
...
}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../common ../common
@ -51,5 +55,11 @@
enable = false; enable = false;
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "24.11"; system.stateVersion = "24.11";
} }

View File

@ -10,6 +10,7 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
inputs.disko.nixosModules.default inputs.disko.nixosModules.default
inputs.home-manager.nixosModules.home-manager
(import ./disko.nix {device = "/dev/sda";}) (import ./disko.nix {device = "/dev/sda";})
]; ];
@ -114,5 +115,11 @@
}; };
}; };
home-manager.users.${username} = {
imports = [
./home.nix
];
};
system.stateVersion = "24.11"; system.stateVersion = "24.11";
} }