[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,24 @@
{ devices, inputs, overlays, home-manager, nix-darwin, ... }:
builtins.listToAttrs (builtins.map (device: {
name = device.name;
value = nix-darwin.lib.darwinSystem {
system = device.system;
modules = [
{ nixpkgs.overlays = overlays; }
./configuration.nix
home-manager.darwinModules.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)