mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 01:31:33 +01:00
Refactor
This commit is contained in:
parent
0d7164fe0a
commit
49c918f747
13 changed files with 53 additions and 53 deletions
|
|
@ -25,14 +25,17 @@
|
|||
hostCreationRules =
|
||||
self.nixosConfigurations
|
||||
|> lib.attrValues
|
||||
|> lib.filter (value: value.config.custom.sops.enable or false)
|
||||
|> lib.map (value: mkCreationRule value.config.custom.sops);
|
||||
|> lib.map (host: host.config.custom.sops)
|
||||
|> lib.filter (sops: sops.enable)
|
||||
|> lib.map (sops: mkCreationRule sops);
|
||||
|
||||
userCreationRules =
|
||||
self.nixosConfigurations
|
||||
|> lib.attrValues
|
||||
|> lib.filter (value: value.config.home-manager.users.seb.custom.sops.enable or false)
|
||||
|> lib.map (value: mkCreationRule value.config.home-manager.users.seb.custom.sops);
|
||||
|> lib.filter (host: host.config |> lib.hasAttr "home-manager")
|
||||
|> lib.map (host: host.config.home-manager.users.seb.custom.sops)
|
||||
|> lib.filter (sops: sops.enable)
|
||||
|> lib.map (sops: mkCreationRule sops);
|
||||
|
||||
jsonConfig = { creation_rules = hostCreationRules ++ userCreationRules; } |> lib.strings.toJSON;
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue