configurations: formatting and some cleaning
This commit is contained in:
parent
0ac720823c
commit
f2c82ea93f
|
@ -2,5 +2,4 @@
|
||||||
let
|
let
|
||||||
genHomes = import ./genHomes.nix { inherit inputs; inherit materusFlake; };
|
genHomes = import ./genHomes.nix { inherit inputs; inherit materusFlake; };
|
||||||
in
|
in
|
||||||
{ }
|
genHomes "materus"
|
||||||
// genHomes "materus"
|
|
||||||
|
|
|
@ -29,25 +29,24 @@ let
|
||||||
(builtins.listToAttrs (_for 0)) // {
|
(builtins.listToAttrs (_for 0)) // {
|
||||||
#Make generic x86_64-linux user profile "username"
|
#Make generic x86_64-linux user profile "username"
|
||||||
${username} =
|
${username} =
|
||||||
let materusCfg = {
|
let materusCfg = {
|
||||||
stable = false;
|
stable = false;
|
||||||
inherit materusFlake;
|
inherit materusFlake;
|
||||||
host = "Generic";
|
host = "Generic";
|
||||||
hm = inputs.configInputs.inputs.home-manager;
|
hm = inputs.configInputs.inputs.home-manager;
|
||||||
nixerus = inputs.configInputs.inputs.nixerus;
|
nixerus = inputs.configInputs.inputs.nixerus;
|
||||||
configInputs = inputs.configInputs;
|
configInputs = inputs.configInputs;
|
||||||
path = materusFlake.selfPath;
|
path = materusFlake.selfPath;
|
||||||
}; in
|
}; in
|
||||||
inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration {
|
inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = {allowUnfree = true;}; };
|
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; };
|
||||||
extraSpecialArgs = { inherit materusCfg; };
|
extraSpecialArgs = { inherit materusCfg; };
|
||||||
modules = [
|
modules = [
|
||||||
./${username}
|
./${username}
|
||||||
profiles.homeProfile
|
profiles.homeProfile
|
||||||
inputs.private.homeModule
|
inputs.private.homeModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
genHomes
|
genHomes
|
||||||
|
|
|
@ -3,32 +3,32 @@
|
||||||
let
|
let
|
||||||
profiles = import ../profile;
|
profiles = import ../profile;
|
||||||
|
|
||||||
makeSystem = {host, arch ? "x86_64-linux", extraModules ? [], stable ? true}:
|
makeSystem = { host, arch ? "x86_64-linux", extraModules ? [ ], stable ? true }:
|
||||||
let
|
let
|
||||||
nixosSystem = if stable then inputs.nixpkgs-stable.lib.nixosSystem else inputs.nixpkgs.lib.nixosSystem;
|
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;
|
hm = if stable then inputs.configInputs-stable.inputs.home-manager else inputs.configInputs.inputs.home-manager;
|
||||||
materusCfg = {
|
materusCfg = {
|
||||||
inherit stable;
|
inherit stable;
|
||||||
inherit materusFlake;
|
inherit materusFlake;
|
||||||
inherit host;
|
inherit host;
|
||||||
inherit hm;
|
inherit hm;
|
||||||
nixerus = if stable then inputs.configInputs-stable.inputs.nixerus else inputs.configInputs.inputs.nixerus;
|
nixerus = if stable then inputs.configInputs-stable.inputs.nixerus else inputs.configInputs.inputs.nixerus;
|
||||||
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
|
configInputs = if stable then inputs.configInputs-stable else inputs.configInputs;
|
||||||
path = materusFlake.selfPath;
|
path = materusFlake.selfPath;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
(nixosSystem rec {
|
(nixosSystem rec {
|
||||||
specialArgs = { inherit materusCfg; };
|
specialArgs = { inherit materusCfg; };
|
||||||
system = arch;
|
system = arch;
|
||||||
modules = [
|
modules = [
|
||||||
./${host}
|
./${host}
|
||||||
inputs.private.systemModule
|
inputs.private.systemModule
|
||||||
profiles.osProfile
|
profiles.osProfile
|
||||||
] ++ extraModules;
|
] ++ extraModules;
|
||||||
}) // {inherit materusCfg;};
|
}) // { inherit materusCfg; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
materusPC = makeSystem {host = "materusPC"; stable = false;};
|
materusPC = makeSystem { host = "materusPC"; stable = false; };
|
||||||
flamaster = makeSystem {host = "flamaster"; stable = true;};
|
flamaster = makeSystem { host = "flamaster"; stable = true; };
|
||||||
valkyrie = makeSystem {host = "valkyrie"; stable = true;};
|
valkyrie = makeSystem { host = "valkyrie"; stable = true; };
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,18 +46,9 @@
|
||||||
|
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, home-manager, nur, ... }:
|
outputs = inputs @ { self, nixpkgs, home-manager, nur, ... }:
|
||||||
let
|
|
||||||
systems = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"i686-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
];
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
|
||||||
in
|
|
||||||
rec {
|
rec {
|
||||||
nixosConfigurations = import ./configurations/host { inherit inputs; materusFlake = self; };
|
nixosConfigurations = import ./configurations/host { inherit inputs; materusFlake = self; };
|
||||||
homeConfigurations = import ./configurations/home { inherit inputs; materusFlake = self; };
|
homeConfigurations = import ./configurations/home { inherit inputs; materusFlake = self; };
|
||||||
selfPath = ./.;
|
selfPath = ./.;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue