Compare commits

..

1 commit

Author SHA1 Message Date
74ac2c76d3 remove nixpkgs overwrite 2025-11-26 03:15:33 +01:00
3 changed files with 74 additions and 11 deletions

View file

@ -1,19 +1,15 @@
{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let { nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { nixpkgs, ... }@inputs: { host, ... }@imports: let
system = hostname: { namespace ? "fbs42", nixpkgs ? "nixpkgs" }: inputs.${nixpkgs}.lib.nixosSystem { system = hostname: { namespace?"fbs42" }: nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs flake namespace; }; specialArgs = { inherit inputs flake namespace; };
modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${hostname}"; })) flake.lib.schema.base) modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${hostname}"; })) flake.lib.schema.base)
++ [ { config.networking.hostName = hostname; } ] ++ [ { config.networking.hostName = hostname; } ]
++ [ nixosModules.default ] ++ [ nixosModules.default ]
++ inputs.${nixpkgs}.lib.optional (inputs ? home-manager) { ++ [ inputs.home-manager.nixosModules.default ]
imports = [ inputs.home-manager.nixosModules.default ]; ++ [ { config.home-manager.sharedModules = [ hmModules.default ]; } ]
config.home-manager = { ++ [ { config.home-manager.extraSpecialArgs = { inherit flake namespace; }; } ]
sharedModules = [ hmModules.default ];
extraSpecialArgs = { inherit flake namespace; };
};
}
++ builtins.attrValues nixosUsers ++ builtins.attrValues nixosUsers
++ builtins.attrValues nixosGroups ++ builtins.attrValues nixosGroups
; ;
}; };
in builtins.mapAttrs (name: value: assert builtins.length value == 1; system name (builtins.head value)) host in builtins.mapAttrs (hostname: snippets: assert builtins.length snippets == 1; system hostname (builtins.head snippets)) host

60
flake.lock generated
View file

@ -1,6 +1,64 @@
{ {
"nodes": { "nodes": {
"root": {} "hardware": {
"locked": {
"lastModified": 1762847253,
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixos-hardware",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747688870,
"narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1763966396,
"narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5ae3b07d8d6527c42f17c876e404993199144b6a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"hardware": "hardware",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
}, },
"root": "root", "root": "root",
"version": 7 "version": 7

View file

@ -1,3 +1,12 @@
{ {
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, ... }@inputs: import ./lib/flake.nix inputs ./.; outputs = { self, ... }@inputs: import ./lib/flake.nix inputs ./.;
} }