uhh yes
This commit is contained in:
parent
8226f5b933
commit
371db9222f
4 changed files with 59 additions and 17 deletions
37
flake.nix
37
flake.nix
|
|
@ -15,29 +15,32 @@
|
|||
system = "x86_64-linux";
|
||||
username = "xory";
|
||||
|
||||
opentrack-overlay = import ./overlays/opentrack.nix;
|
||||
|
||||
mkNixosHost = hostName:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
impermanence.nixosModules.impermanence
|
||||
./hosts/${hostName}/configuration.nix
|
||||
./hosts/${hostName}/hardware-configuration.nix
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ opentrack-overlay ]; }
|
||||
impermanence.nixosModules.impermanence
|
||||
./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;
|
||||
}
|
||||
];
|
||||
};
|
||||
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")
|
||||
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