nixos: fix typo in assertion message when no key source is configured

This commit is contained in:
Jörg Thalheim 2023-09-18 18:31:14 +02:00
parent ea208e55f8
commit aceb2862d3
2 changed files with 2 additions and 2 deletions

View file

@ -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";

View file

@ -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";