[feat] Add all nix config with device gates

This commit is contained in:
Uttarayan Mondal
2024-02-19 19:14:09 +05:30
parent 935043e290
commit 0fc1c8b054
14 changed files with 135 additions and 177 deletions

View File

@@ -0,0 +1,25 @@
{ nixpkgs, devices, inputs, overlays, home-manager, ... }:
builtins.listToAttrs (builtins.map (device: {
name = device.name;
value = nixpkgs.lib.nixosSystem {
system = device.system;
specialArgs = { inherit device; };
modules = [
{ nixpkgs.overlays = overlays; }
./configuration.nix
home-manager.nixosModules.home-manager
{
nixpkgs.config.allowUnfree = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
users.${device.user}.imports = [ ../common/home.nix ];
};
}
];
};
}) devices)