refactor: normalize usage of lib and builtins namespaces

This commit is contained in:
SebastianStork 2025-07-22 22:58:18 +02:00
parent 043a996319
commit 062fd5de0b
17 changed files with 24 additions and 24 deletions

View file

@ -14,7 +14,7 @@ let
hostFiles =
"${self}/hosts/${hostName}"
|> lib.filesystem.listFilesRecursive
|> builtins.filter (lib.hasSuffix ".nix");
|> lib.filter (lib.hasSuffix ".nix");
in
[
{ networking = { inherit hostName; }; }
@ -46,6 +46,6 @@ in
|> lib.filterAttrs (_: type: type == "directory")
|> lib.mapAttrs (name: _: mkDeployNode name);
checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
checks = lib.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
};
}

View file

@ -1,6 +1,6 @@
{ self, lib, ... }:
let
modulesOf = dir: dir |> lib.filesystem.listFilesRecursive |> builtins.filter (lib.hasSuffix ".nix");
modulesOf = dir: dir |> lib.filesystem.listFilesRecursive |> lib.filter (lib.hasSuffix ".nix");
in
{
flake = {

View file

@ -27,7 +27,7 @@
|> lib.filterAttrs (_: value: value.config.home-manager.users.seb.custom.sops.enable or false)
|> lib.mapAttrsToList (_: value: mkCreationRule value.config.home-manager.users.seb.custom.sops);
jsonConfig = { creation_rules = hostCreationRules ++ userCreationRules; } |> builtins.toJSON;
jsonConfig = { creation_rules = hostCreationRules ++ userCreationRules; } |> lib.strings.toJSON;
in
pkgs.runCommand "sops-config" { buildInputs = [ pkgs.yj ]; } ''
mkdir $out