Extract the per-host home-manager block (useGlobalPkgs, useUserPackages, backupFileExtension, users.<name> with username/homeDirectory/optional stateVersion/optional imports) into nixos/lib/home-manager-user.nix. Each flake-module now imports it with its per-host parameters, removing ~40 lines of boilerplate across the four hosts.
17 lines
478 B
Nix
17 lines
478 B
Nix
{ inputs, ... }: {
|
|
flake.nixosConfigurations.phantom-ship = inputs.nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
inputs.nix-openclaw.nixosModules.openclaw-gateway
|
|
../hosts/phantom-ship.nix
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
(import ../lib/home-manager-user.nix {
|
|
lib = inputs.nixpkgs.lib;
|
|
user = "danny";
|
|
homeDirectory = "/home/danny";
|
|
stateVersion = "25.11";
|
|
})
|
|
];
|
|
};
|
|
}
|