nixos-config/configurations/host/default.nix

39 lines
1.4 KiB
Nix
Raw Normal View History

2023-10-08 11:42:08 +02:00
{ inputs, materusFlake }:
let
profiles = import ../profile;
makeSystem = { host, arch ? "x86_64-linux", extraModules ? [ ], stable ? true }:
let
nixosSystem = if stable then inputs.nixpkgs-stable.lib.nixosSystem else inputs.nixpkgs.lib.nixosSystem;
hm = if stable then inputs.configInputs-stable.inputs.home-manager else inputs.configInputs.inputs.home-manager;
2024-02-25 22:07:53 +01:00
materusCfg = rec {
inherit stable;
inherit materusFlake;
inherit host;
inherit hm;
nixerus = if stable then inputs.configInputs-stable.inputs.nixerus else inputs.configInputs.inputs.nixerus;
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
path = materusFlake.selfPath;
2024-02-25 22:07:53 +01:00
isHm = configInputs.inputs.nixpkgs.lib.mkDefault false;
};
in
2024-02-25 22:07:53 +01:00
(nixosSystem {
specialArgs = { inherit materusCfg; };
system = arch;
modules = [
./${host}
inputs.private.systemModule
profiles.osProfile
] ++ extraModules;
}) // { inherit materusCfg; };
in
{
materusPC = makeSystem { host = "materusPC"; stable = false; };
flamaster = makeSystem { host = "flamaster"; stable = true; };
valkyrie = makeSystem { host = "valkyrie"; stable = true; };
waffentrager = makeSystem { host = "waffentrager"; stable = false; arch = "aarch64-linux"; extraModules = [ ]; };
Old-materusPC = makeSystem { host = "Old-materusPC"; stable = false; };
2023-10-08 11:42:08 +02:00
}