2023-08-23 10:12:11 +02:00
|
|
|
{ inputs, outputs, stateVersion, hmStateVersion, ... }: {
|
2023-08-23 09:53:29 +02:00
|
|
|
# Helper function for generating home-manager configs
|
|
|
|
mkHome = { hostname, username, desktop ? null, platform ? "x86_64-linux" }: inputs.home-manager.lib.homeManagerConfiguration {
|
2023-08-23 10:11:24 +02:00
|
|
|
# pkgs = inputs.nixpkgs.legacyPackages.${platform};
|
2023-08-23 12:45:34 +02:00
|
|
|
# pkgs = inputs.nixpkgs.${platform};
|
2023-08-23 09:53:29 +02:00
|
|
|
extraSpecialArgs = {
|
2023-08-23 10:11:24 +02:00
|
|
|
inherit inputs outputs desktop hostname platform username hmStateVersion;
|
2023-08-23 09:53:29 +02:00
|
|
|
};
|
2023-08-23 12:45:34 +02:00
|
|
|
modules = [ ../home-manager ];
|
2023-08-23 09:53:29 +02: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-08-23 10:11:24 +02:00
|
|
|
../nixos
|
2023-08-23 12:45:34 +02:00
|
|
|
inputs.sops-nix.nixosModules.sops # Handle secrets
|
|
|
|
inputs.lanzaboote.nixosModules.lanzaboote # SecureBoot Configuration
|
|
|
|
inputs.nur.nixosModules.nur # NixOS User Repository
|
2023-08-23 09:53:29 +02:00
|
|
|
] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]);
|
|
|
|
};
|
|
|
|
|
|
|
|
forAllSystems = inputs.nixpkgs.lib.genAttrs [
|
|
|
|
"aarch64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
}
|