1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-28 18:47:44 +00:00

flake: use const more

This commit is contained in:
RGBCube 2025-07-28 03:27:28 +03:00
parent 86f136d9fd
commit c9fba65644
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -88,13 +88,13 @@
inherit (builtins) readDir; inherit (builtins) readDir;
inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs nameValuePair; inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs nameValuePair;
lib' = nixpkgs.lib.extend (_: _: nix-darwin.lib); lib' = nixpkgs.lib.extend (const <| const <| nix-darwin.lib);
lib = lib'.extend <| import ./lib inputs; lib = lib'.extend <| import ./lib inputs;
hostsByType = readDir ./hosts hostsByType = readDir ./hosts
|> mapAttrs (name: const <| import ./hosts/${name} lib) |> mapAttrs (name: const <| import ./hosts/${name} lib)
|> attrsToList |> attrsToList
|> groupBy ({ name, value }: |> groupBy ({ value, ... }:
if value ? class && value.class == "nixos" then if value ? class && value.class == "nixos" then
"nixosConfigurations" "nixosConfigurations"
else else