mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
refactor: normalize usage of lib and builtins namespaces
This commit is contained in:
parent
043a996319
commit
062fd5de0b
17 changed files with 24 additions and 24 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue