pkgs/clerie-sops: Init sops
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ self, nixpkgs, agenix, bij, chaosevents, fernglas, fieldpoc, nixos-exporter, solid-xmpp-alarm, ... }@inputs:
|
||||
{ self, nixpkgs, agenix, bij, chaosevents, fernglas, fieldpoc, nixos-exporter, solid-xmpp-alarm, sops-nix, ... }@inputs:
|
||||
|
||||
rec {
|
||||
generateNixosSystem = {
|
||||
@@ -43,6 +43,7 @@ rec {
|
||||
fieldpoc.nixosModules.default
|
||||
nixos-exporter.nixosModules.default
|
||||
solid-xmpp-alarm.nixosModules.solid-xmpp-alarm
|
||||
sops-nix.nixosModules.sops
|
||||
(../hosts + "/${name}/configuration.nix")
|
||||
# Automatically load secrets from the hosts secrets directory
|
||||
({ lib, ... }: let
|
||||
@@ -52,6 +53,10 @@ rec {
|
||||
file = secretsPath + "/${filename}";
|
||||
}) (lib.filterAttrs (name: type: (type == "regular") && (lib.hasSuffix ".age" name) ) (if builtins.pathExists secretsPath then builtins.readDir secretsPath else {}));
|
||||
})
|
||||
# Automatically load secrets from sops file for host
|
||||
({ ... }: {
|
||||
sops.defaultSopsFile = ../hosts + "/${name}/secrets.json";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user