Make home-manager declarations more clean

inky
Elnu 2 years ago
parent 4f9ca94dc4
commit 507da92a6e

@ -24,15 +24,17 @@ 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; };
users.${user} = {
imports = [ imports = [
(import ./home.nix) (import ./home.nix)
(import ./thinkpads/home.nix) (import ./thinkpads/home.nix)
]; ];
}; };
};
} }
]; ];
}; };
@ -51,15 +53,15 @@ 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,15 +77,17 @@ 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; };
users.${user} = {
imports = [ imports = [
(import ./home.nix) (import ./home.nix)
(import ./virtualbox/home.nix) (import ./virtualbox/home.nix)
]; ];
}; };
};
} }
]; ];
}; };

Loading…
Cancel
Save