From e107d8aa7065fb94046ad2d75c889d57ed8b91c1 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Mon, 15 Jul 2024 21:58:14 +0200 Subject: [PATCH] extract lib.nixosSystem into createSystem --- hosts/default.nix | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index ee6b031..f0e8904 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -4,28 +4,20 @@ }: let inherit (inputs) self; inherit (self) lib; -in { - niks = lib.nixosSystem { - system = null; - specialArgs = { - inherit lib inputs self; - }; - modules = [ - ./niks - ../modules - ]; - }; - del = lib.nixosSystem { + createSystem = systemDir: lib.nixosSystem { system = null; - specialArgs = { - inherit lib inputs self; - }; + specialArgs = {inherit lib inputs self;}; modules = [ - ./del + systemDir ../modules ]; }; +in { + + niks = createSystem ./niks; + + del = createSystem ./del; #hape = lib.nixosSystem { # system = "x86_64-linux"; @@ -38,14 +30,6 @@ in { # inputs.home-manager.nixosModules.home-manager # ]; #}; - chmura = lib.nixosSystem { - system = null; - specialArgs = { - inherit lib inputs self; - }; - modules = [ - ./chmura - ../modules - ]; - }; + + chmura = createSystem ./chmura; }