From 7ad8bb319269aab2f1e92cffc80168fa6c4a5df7 Mon Sep 17 00:00:00 2001 From: Jonas Rabenstein Date: Wed, 26 Nov 2025 02:52:11 +0100 Subject: [PATCH 1/2] remove nixpkgs overwrite --- export/nixosConfigurations.nix | 4 ++-- flake.lock | 8 ++++---- flake.nix | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/export/nixosConfigurations.nix b/export/nixosConfigurations.nix index e712097..a36134d 100644 --- a/export/nixosConfigurations.nix +++ b/export/nixosConfigurations.nix @@ -1,6 +1,6 @@ -{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let +{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { nixpkgs, ... }@inputs: { host, ... }@imports: let host' = name: snippets: let - system = { namespace?"fbs42", nixpkgs?"nixpkgs" }: inputs.${nixpkgs}.lib.nixosSystem { + system = { namespace?"fbs42" }: nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs flake namespace; }; modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })) flake.lib.schema.base) ++ [ { config.networking.hostName = name; } ] diff --git a/flake.lock b/flake.lock index 4782076..ea3f5dd 100644 --- a/flake.lock +++ b/flake.lock @@ -38,16 +38,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751274312, - "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", + "lastModified": 1763966396, + "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 5f5c238..808ef2a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; hardware.url = "github:nixos/nixos-hardware"; home-manager = { url = "github:nix-community/home-manager/release-24.11"; From 74ac2c76d3fd1e7b0318a75f08bbd4e1c04b1b11 Mon Sep 17 00:00:00 2001 From: Jonas Rabenstein Date: Wed, 26 Nov 2025 02:52:11 +0100 Subject: [PATCH 2/2] remove nixpkgs overwrite --- export/nixosConfigurations.nix | 32 ++++++++++++++------------------ flake.lock | 8 ++++---- flake.nix | 2 +- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/export/nixosConfigurations.nix b/export/nixosConfigurations.nix index e712097..023c980 100644 --- a/export/nixosConfigurations.nix +++ b/export/nixosConfigurations.nix @@ -1,19 +1,15 @@ -{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let - host' = name: snippets: let - system = { namespace?"fbs42", nixpkgs?"nixpkgs" }: inputs.${nixpkgs}.lib.nixosSystem { - specialArgs = { inherit inputs flake namespace; }; - modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })) flake.lib.schema.base) - ++ [ { config.networking.hostName = name; } ] - ++ [ nixosModules.default ] - ++ [ inputs.home-manager.nixosModules.default ] - ++ [ { config.home-manager.sharedModules = [ hmModules.default ]; } ] - ++ [ { config.home-manager.extraSpecialArgs = { inherit flake namespace; }; } ] - ++ builtins.attrValues nixosUsers - ++ builtins.attrValues nixosGroups - ; - }; +{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { nixpkgs, ... }@inputs: { host, ... }@imports: let + system = hostname: { namespace?"fbs42" }: nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs flake namespace; }; + modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${hostname}"; })) flake.lib.schema.base) + ++ [ { config.networking.hostName = hostname; } ] + ++ [ nixosModules.default ] + ++ [ inputs.home-manager.nixosModules.default ] + ++ [ { config.home-manager.sharedModules = [ hmModules.default ]; } ] + ++ [ { config.home-manager.extraSpecialArgs = { inherit flake namespace; }; } ] + ++ builtins.attrValues nixosUsers + ++ builtins.attrValues nixosGroups + ; + }; - cfg = assert builtins.length snippets == 1; builtins.head snippets; - in system cfg; - -in builtins.mapAttrs host' host +in builtins.mapAttrs (hostname: snippets: assert builtins.length snippets == 1; system hostname (builtins.head snippets)) host diff --git a/flake.lock b/flake.lock index 4782076..ea3f5dd 100644 --- a/flake.lock +++ b/flake.lock @@ -38,16 +38,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751274312, - "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", + "lastModified": 1763966396, + "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 5f5c238..808ef2a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; hardware.url = "github:nixos/nixos-hardware"; home-manager = { url = "github:nix-community/home-manager/release-24.11";