From f34f7bfe32976e03bc4685f8387cf15aa0c1be8c Mon Sep 17 00:00:00 2001 From: Leonardo Santiago Date: Tue, 12 Nov 2024 15:44:00 -0300 Subject: reindent flake.nix --- flake.nix | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 9d72f5b..e67ae3c 100644 --- a/flake.nix +++ b/flake.nix @@ -24,21 +24,20 @@ }; }; - outputs = { self, nixpkgs, ... } @ inputs : - let - inherit (builtins) readDir attrNames listToAttrs split head; - modules = map (p: ./modules/${p}) (attrNames (readDir ./modules)); - make-config-named = host: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - ./hosts/${host}.nix - inputs.home-manager.nixosModules.default - ] ++ modules; - }; - get-basename = n: head (split "\\." n); - hosts-names = map get-basename (attrNames (readDir ./hosts)); - nixos-configs = map (h: { name= h; value = make-config-named h;}) hosts-names; - in { - nixosConfigurations = listToAttrs nixos-configs; + outputs = { self, nixpkgs, ... } @ inputs : let + inherit (builtins) readDir attrNames listToAttrs split head; + modules = map (p: ./modules/${p}) (attrNames (readDir ./modules)); + make-config-named = host: nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/${host}.nix + inputs.home-manager.nixosModules.default + ] ++ modules; }; + get-basename = n: head (split "\\." n); + hosts-names = map get-basename (attrNames (readDir ./hosts)); + nixos-configs = map (h: { name= h; value = make-config-named h;}) hosts-names; + in { + nixosConfigurations = listToAttrs nixos-configs; + }; } -- cgit v1.2.3