Make home-manager declarations more clean

inky
Elnu 2 years ago
parent 4f9ca94dc4
commit 507da92a6e

@ -24,14 +24,16 @@ in
networking.hostName = "x220"; networking.hostName = "x220";
} }
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager = {
home-manager.useUserPackages = true; useGlobalPkgs = true;
home-manager.extraSpecialArgs = { inherit user; }; useUserPackages = true;
home-manager.users.${user} = { extraSpecialArgs = { inherit user; };
imports = [ users.${user} = {
(import ./home.nix) imports = [
(import ./thinkpads/home.nix) (import ./home.nix)
]; (import ./thinkpads/home.nix)
];
};
}; };
} }
]; ];
@ -51,14 +53,14 @@ in
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
}; useUserPackages = true;
home-manager.useUserPackages = true; extraSpecialArgs = { inherit user; };
home-manager.extraSpecialArgs = { inherit user; }; users.${user} = {
home-manager.users.${user} = { imports = [
imports = [ (import ./home.nix)
(import ./home.nix) (import ./thinkpads/home.nix)
(import ./thinkpads/home.nix) ];
]; };
}; };
} }
]; ];
@ -75,14 +77,16 @@ in
networking.hostName = "virtualbox"; networking.hostName = "virtualbox";
} }
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager = {
home-manager.useUserPackages = true; useGlobalPkgs = true;
home-manager.extraSpecialArgs = { inherit user; }; useUserPackages = true;
home-manager.users.${user} = { extraSpecialArgs = { inherit user; };
imports = [ users.${user} = {
(import ./home.nix) imports = [
(import ./virtualbox/home.nix) (import ./home.nix)
]; (import ./virtualbox/home.nix)
];
};
}; };
} }
]; ];

Loading…
Cancel
Save