2023-08-23 14:39:51 +02:00
|
|
|
{ inputs, outputs, stateVersion, hmStateVersion, ... }: {
|
2023-08-25 12:07:54 +02:00
|
|
|
|
2023-08-23 09:53:29 +02:00
|
|
|
# Helper function for generating home-manager configs
|
2023-08-31 13:22:44 +02:00
|
|
|
mkHome = {
|
|
|
|
hostname,
|
|
|
|
username,
|
|
|
|
desktop ? null,
|
|
|
|
platform ? "x86_64-linux",
|
2023-09-15 05:03:35 +02:00
|
|
|
theme ? "default"
|
2023-08-31 13:22:44 +02:00
|
|
|
}: inputs.home-manager.lib.homeManagerConfiguration {
|
2023-08-23 12:47:21 +02:00
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${platform};
|
2023-08-31 13:22:44 +02:00
|
|
|
extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion theme; };
|
2023-08-25 12:07:54 +02:00
|
|
|
modules = [
|
|
|
|
../home-manager
|
|
|
|
inputs.doom-emacs.hmModule
|
|
|
|
];
|
2023-08-23 09:53:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Helper function for generating host configs
|
2023-08-31 13:22:44 +02:00
|
|
|
mkHost = {
|
|
|
|
hostname,
|
|
|
|
username,
|
|
|
|
desktop ? null,
|
|
|
|
installer ? null,
|
|
|
|
gpu ? null,
|
|
|
|
platform ? "x86_64-linux",
|
2023-09-15 05:03:35 +02:00
|
|
|
theme ? "default"
|
2023-08-31 13:22:44 +02:00
|
|
|
}: inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; };
|
2023-08-23 09:53:29 +02:00
|
|
|
modules = [
|
2023-08-23 10:11:24 +02:00
|
|
|
../nixos
|
2023-08-27 12:50:23 +02:00
|
|
|
inputs.sops-nix.nixosModules.sops
|
|
|
|
inputs.lanzaboote.nixosModules.lanzaboote
|
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"
|
|
|
|
];
|
2023-08-25 12:07:54 +02:00
|
|
|
}
|