automatically import secrets into nixos
This commit is contained in:
16
checks/secrets/default.nix
Normal file
16
checks/secrets/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
(import ../lib/test-base.nix) {
|
||||
name = "secrets";
|
||||
|
||||
nodes.machine = { self, config, ... }: {
|
||||
imports = [
|
||||
self.nixosModules.secrets
|
||||
];
|
||||
environment.etc."secret".source = config.sops.secrets.foo.path;
|
||||
sops.age.keyFile = ./key.age;
|
||||
clan.sops.sopsDirectory = ./sops;
|
||||
networking.hostName = "machine";
|
||||
};
|
||||
testScript = ''
|
||||
machine.succeed("cat /etc/secret >&2")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user