mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-26 14:14:58 +08:00
nixos: fix typo in assertion message when no key source is configured
This commit is contained in:
parent
ea208e55f8
commit
aceb2862d3
2 changed files with 2 additions and 2 deletions
|
|
@ -217,7 +217,7 @@ in {
|
||||||
config = lib.mkIf (cfg.secrets != {}) {
|
config = lib.mkIf (cfg.secrets != {}) {
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = cfg.gnupg.home != null || cfg.gnupg.sshKeyPaths != [] || cfg.age.keyFile != null || cfg.age.sshKeyPaths != [];
|
assertion = cfg.gnupg.home != null || cfg.gnupg.sshKeyPaths != [] || cfg.age.keyFile != null || cfg.age.sshKeyPaths != [];
|
||||||
message = "No key source configurated for sops";
|
message = "No key source configured for sops. Either set services.openssh.enable or set sops.age.keyFile or sops.gnupg.home";
|
||||||
} {
|
} {
|
||||||
assertion = !(cfg.gnupg.home != null && cfg.gnupg.sshKeyPaths != []);
|
assertion = !(cfg.gnupg.home != null && cfg.gnupg.sshKeyPaths != []);
|
||||||
message = "Exactly one of sops.gnupg.home and sops.gnupg.sshKeyPaths must be set";
|
message = "Exactly one of sops.gnupg.home and sops.gnupg.sshKeyPaths must be set";
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ in {
|
||||||
(mkIf (cfg.secrets != {}) {
|
(mkIf (cfg.secrets != {}) {
|
||||||
assertions = [{
|
assertions = [{
|
||||||
assertion = cfg.gnupg.home != null || cfg.gnupg.sshKeyPaths != [] || cfg.age.keyFile != null || cfg.age.sshKeyPaths != [];
|
assertion = cfg.gnupg.home != null || cfg.gnupg.sshKeyPaths != [] || cfg.age.keyFile != null || cfg.age.sshKeyPaths != [];
|
||||||
message = "No key source configurated for sops";
|
message = "No key source configured for sops. Either set services.openssh.enable or set sops.age.keyFile or sops.gnupg.home";
|
||||||
} {
|
} {
|
||||||
assertion = !(cfg.gnupg.home != null && cfg.gnupg.sshKeyPaths != []);
|
assertion = !(cfg.gnupg.home != null && cfg.gnupg.sshKeyPaths != []);
|
||||||
message = "Exactly one of sops.gnupg.home and sops.gnupg.sshKeyPaths must be set";
|
message = "Exactly one of sops.gnupg.home and sops.gnupg.sshKeyPaths must be set";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue