2023-09-25 18:05:07 +00:00
|
|
|
{ inputs, outputs, stateVersion, ... }: {
|
|
|
|
# Helper function for generating home-manager configs
|
|
|
|
mkHome = { hostname, username, desktop ? null, platform ? "x86_64-linux" }: inputs.home-manager.lib.homeManagerConfiguration {
|
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${platform};
|
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit inputs outputs desktop hostname platform username stateVersion;
|
|
|
|
};
|
2023-09-25 18:53:08 +00:00
|
|
|
modules = [ ../home/${username}/${hostname}.nix ];
|
2023-09-25 18:05:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Helper function for generating host configs
|
|
|
|
mkHost = { hostname, username, desktop ? null, installer ? null }: inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs outputs desktop hostname username stateVersion;
|
|
|
|
};
|
|
|
|
modules = [
|
2023-09-25 18:53:08 +00:00
|
|
|
../nixos/${hostname}
|
2023-09-25 18:05:07 +00:00
|
|
|
inputs.agenix.nixosModules.default
|
|
|
|
] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]);
|
|
|
|
};
|
|
|
|
|
|
|
|
forAllSystems = inputs.nixpkgs.lib.genAttrs [
|
|
|
|
"aarch64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
}
|