restructuring part 2/2
This commit is contained in:
parent
fcc480dbf1
commit
2cc1ad23a7
1 changed files with 27 additions and 19 deletions
46
flake.nix
46
flake.nix
|
|
@ -8,24 +8,32 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ nixpkgs, home-manager, ... }:
|
{ self, nixpkgs, home-manager, ... } @ inputs:
|
||||||
{
|
let
|
||||||
nixosConfigurations = {
|
system = "x86_64-linux";
|
||||||
nixvm = nixpkgs.lib.nixosSystem {
|
username = "xory";
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [
|
|
||||||
./configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.xory = ./home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
mkNixosHost = hostName:
|
||||||
# arguments to home.nix
|
nixpkgs.lib.nixosSystem {
|
||||||
}
|
inherit system;
|
||||||
];
|
modules = [
|
||||||
};
|
./hosts/${hostName}/configuration.nix
|
||||||
};
|
./hosts/${hostName}/hardware-configuration.nix
|
||||||
};
|
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.${username} = import ./hosts/${hostName}/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
nixosConfigurations = nixpkgs.lib.mapAttrs'
|
||||||
|
(name: value: {
|
||||||
|
name = name;
|
||||||
|
value = mkNixosHost name;
|
||||||
|
})
|
||||||
|
(nixpkgs.lib.filterAttrs (name: value: value == "directory")
|
||||||
|
(builtins.readDir ./hosts));
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue