configurations: formatting and some cleaning

This commit is contained in:
Mateusz Słodkowicz 2023-10-27 17:00:26 +02:00
parent 0ac720823c
commit f2c82ea93f
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
6 changed files with 48 additions and 59 deletions

View File

@ -2,5 +2,4 @@
let
genHomes = import ./genHomes.nix { inherit inputs; inherit materusFlake; };
in
{ }
// genHomes "materus"
genHomes "materus"

View File

@ -39,7 +39,7 @@ let
path = materusFlake.selfPath;
}; in
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; };
modules = [
./${username}
@ -48,6 +48,5 @@ let
];
};
};
in
genHomes

View File

@ -3,11 +3,11 @@
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;
materusCfg = {
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;
materusCfg = {
inherit stable;
inherit materusFlake;
inherit host;
@ -15,9 +15,9 @@ materusCfg = {
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;
};
in
(nixosSystem rec {
};
in
(nixosSystem rec {
specialArgs = { inherit materusCfg; };
system = arch;
modules = [
@ -25,10 +25,10 @@ in
inputs.private.systemModule
profiles.osProfile
] ++ extraModules;
}) // {inherit materusCfg;};
}) // { inherit materusCfg; };
in
{
materusPC = makeSystem {host = "materusPC"; stable = false;};
flamaster = makeSystem {host = "flamaster"; stable = true;};
valkyrie = makeSystem {host = "valkyrie"; stable = true;};
materusPC = makeSystem { host = "materusPC"; stable = false; };
flamaster = makeSystem { host = "flamaster"; stable = true; };
valkyrie = makeSystem { host = "valkyrie"; stable = true; };
}

View File

@ -46,18 +46,9 @@
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 {
nixosConfigurations = import ./configurations/host { inherit inputs; materusFlake = self; };
homeConfigurations = import ./configurations/home { inherit inputs; materusFlake = self; };
selfPath = ./.;
};
}