diff options
author | Leonardo Santiago <[email protected]> | 2024-11-12 15:44:00 -0300 |
---|---|---|
committer | Leonardo Santiago <[email protected]> | 2024-11-12 15:44:00 -0300 |
commit | f34f7bfe32976e03bc4685f8387cf15aa0c1be8c (patch) | |
tree | 0603b7bc6a0234a3f7d56264996d07ff3514d8d7 | |
parent | d34ae459d9d0bebd861a8788a8fe8602a1f99423 (diff) |
reindent flake.nix
-rw-r--r-- | flake.nix | 31 |
1 files changed, 15 insertions, 16 deletions
@@ -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; + }; } |