From c194b4c6980c182d5f5333b9dc6e608e1cc7a24e Mon Sep 17 00:00:00 2001 From: RGBCube Date: Thu, 23 Nov 2023 23:41:53 +0300 Subject: [PATCH] Use only linux systems & better importing mechanism --- flake.lock | 6 +++--- flake.nix | 28 +++++++++++++++------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 659818b..202aad4 100644 --- a/flake.lock +++ b/flake.lock @@ -168,11 +168,11 @@ ] }, "locked": { - "lastModified": 1700770129, - "narHash": "sha256-fmpMWS4EkK5ZMHGJeKPrO9c1+REATJJrdlseOaaSHwM=", + "lastModified": 1700770982, + "narHash": "sha256-S5aUrhSKFK0g5r92g646hFc/CUl4sZzY2K0t2YkmgdY=", "owner": "RGBCube", "repo": "FlakeTools", - "rev": "e8b3ae0ddf49200a0e7fdb8d48e2d46219cbc71d", + "rev": "f17c0afee69a6df19b5add11c5ce9b156fb11406", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a998997..4a37405 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,7 @@ }; }; - outputs = { nixpkgs, homeManager, tools, fenix, ... } @ inputs: tools.eachDefaultArch (system: let + outputs = { nixpkgs, homeManager, tools, fenix, ... } @ inputs: tools.eachDefaultLinuxArch (system: let upkgs = { theme = import ./themes/gruvbox.nix; @@ -87,7 +87,7 @@ }; }; - defaultConfiguration = host: ulib.systemConfiguration { + defaultConfiguration = host: abstractions.systemConfiguration { nix.gc = { automatic = true; dates = "daily"; @@ -121,16 +121,18 @@ inherit upkgs ulib; }; - importConfiguration = host: lib.nixosSystem { - inherit specialArgs; + importConfigurations = tools.recursiveUpdateMap (host: { + nixosConfigurations.${host} = lib.nixosSystem { + inherit specialArgs; - modules = [ - homeManager.nixosModules.default - (defaultConfiguration host) - ./machines/${host} - ]; - }; - in { - nixosConfigurations.enka = importConfiguration "enka"; - }); + modules = [ + homeManager.nixosModules.default + (defaultConfiguration host) + ./machines/${host} + ]; + }; + }); + in importConfigurations [ + "enka" + ]); }