sops-nix
sops-nix copied to clipboard
Allow to set uid and gid instead of owner and group.
https://github.com/Mic92/sops-nix/issues/514
Allow to set uid and gid instead of owner and group. No checks will be performed when uid and gid are set.
sops.secrets = {
sslCertificate = {
sopsFile = ./secrets.yaml;
owner = "";
group = "";
uid = config.containers."nginx".config.users.users."nginx".uid;
gid = config.containers."nginx".config.users.groups."nginx".gid;
};
sslCertificateKey = {
sopsFile = ./secrets.yaml;
owner = "";
group = "";
uid = config.containers."nginx".config.users.users."nginx".uid;
gid = config.containers."nginx".config.users.groups."nginx".gid;
};
};
Could you also add a simple secret example to our existing nixos test? Than we won't regress in future.
Could you also add a simple secret example to our existing nixos test? Than we won't regress in future.
I'm not sure how to run the tests?
$ nix-build pkgs/sops-install-secrets/nixos-test.nix
error: cannot evaluate a function that has an argument without a value ('lib')
Nix attempted to evaluate a function as a top level expression; in
this case it must have its arguments supplied either by default
values, or passed explicitly with '--arg' or '--argstr'. See
https://nixos.org/manual/nix/stable/language/constructs.html#functions.
at /home/munnik/Code/sops-nix/pkgs/sops-install-secrets/nixos-test.nix:1:3:
1| { lib, testers }:
| ^
2| let
@munnik cd sops-nix; nix-build -A sops-install-secrets.tests
For a single test:
nix-build -A sops-install-secrets.tests.age-ssh-keys
Could you also add a simple secret example to our existing nixos test? Than we won't regress in future.
Done in https://github.com/Mic92/sops-nix/pull/637/commits/a24e29e38dca7e16b88bade2c5789de396dc7273
@mergify queue
queue
✅ The pull request has been merged automatically
The pull request has been merged automatically at a4c33bfecb93458d90f9eb26f1cf695b47285243
Thank you! Also, for the help and feedback. Learned a lot of new Nix things. :+1: