summaryrefslogtreecommitdiff
path: root/systems/default.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-01 03:11:00 -0400
committerseth <[email protected]>2023-11-01 03:11:00 -0400
commit1f4ea1037f9303214cd83a1be9280af14fedbc45 (patch)
treeb3f310168f27f3051a9cdedd3435e071ead89a9e /systems/default.nix
parentf4d97c3f32353b072d5d748f9c6af6d8ea9fe158 (diff)
overlays/systems/users: tidy up random stuff
Diffstat (limited to 'systems/default.nix')
-rw-r--r--systems/default.nix19
1 files changed, 10 insertions, 9 deletions
diff --git a/systems/default.nix b/systems/default.nix
index 6807a71..31e9004 100644
--- a/systems/default.nix
+++ b/systems/default.nix
@@ -9,15 +9,16 @@
basic nixosSystem/darwinSystem wrapper; can override
the exact builder by supplying an argument
*/
- mapSystems = builder:
- lib.mapAttrs (name: args:
- (args.builder or builder) (
- (lib.filterAttrs (n: _: n != "builder") args) # use builder but don't include it in output
- // {
- modules = args.modules ++ [./${name}];
- specialArgs = {inherit inputs self;};
- }
- ));
+ toSystem = builder: name: args:
+ (args.builder or builder) (
+ (builtins.removeAttrs args ["builder"])
+ // {
+ modules = args.modules ++ [./${name}];
+ specialArgs = {inherit inputs self;};
+ }
+ );
+
+ mapSystems = builder: lib.mapAttrs (toSystem builder);
mapDarwin = mapSystems inputs.darwin.lib.darwinSystem;
mapNixOS = mapSystems inputs.nixpkgs.lib.nixosSystem;