feat: Rename device.nix to default.nix for nixos and darwin
This commit is contained in:
43
nixos/default.nix
Normal file
43
nixos/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
nixpkgs,
|
||||
devices,
|
||||
inputs,
|
||||
overlays,
|
||||
home-manager,
|
||||
nur,
|
||||
...
|
||||
}:
|
||||
builtins.listToAttrs (builtins.map (device: {
|
||||
name = device.name;
|
||||
value = nixpkgs.lib.nixosSystem {
|
||||
system = device.system;
|
||||
specialArgs = {
|
||||
inherit device;
|
||||
lanzaboote = inputs.lanzaboote;
|
||||
};
|
||||
modules = [
|
||||
nur.modules.nixos.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.disko.nixosModules.disko
|
||||
{nixpkgs.overlays = overlays;}
|
||||
./${device.name}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.musnix.nixosModules.musnix
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home-manager = {
|
||||
backupFileExtension = "bak";
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit device;
|
||||
};
|
||||
users.${device.user}.imports = [../common/home.nix];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
})
|
||||
devices)
|
||||
Reference in New Issue
Block a user