about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAmelia Cuss <amelia@kivikakk.ee>2024-04-27 16:35:27 +0300
committertomf <tom@tom-fitzhenry.me.uk>2024-04-27 23:38:29 +1000
commit2e0b0c270792db5b30bae72b9c7fa45176a1474a (patch)
tree873fbf50c0ef90054e9a710de63b4d02de2294ca /nixos
parent7de07e182551b4567b9b30bfeb0771476a0c8358 (diff)
nixos/akkoma: Don't warn if no installWrapper
Currently the installWrapper warning is issued if sudo (and sudo-rs)
aren't installed.  This is fine, except we get the warning even if we
explicitly turn off installWrapper -- say, for this very reason!

Rather than warning on every build until either sudo is installed or
Akkoma is uninstalled, only warn if cfg.installWrapper is true.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-apps/akkoma.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/akkoma.nix b/nixos/modules/services/web-apps/akkoma.nix
index b180db2d4ca04..7c9bf6c465164 100644
--- a/nixos/modules/services/web-apps/akkoma.nix
+++ b/nixos/modules/services/web-apps/akkoma.nix
@@ -957,7 +957,7 @@ in {
     assertions = optionals (cfg.config.":pleroma".":media_proxy".enabled && cfg.config.":pleroma".":media_proxy".base_url == null) [''
       `services.akkoma.config.":pleroma".":media_proxy".base_url` must be set when the media proxy is enabled.
     ''];
-    warnings = optionals (with config.security; (!sudo.enable) && (!sudo-rs.enable)) [''
+    warnings = optionals (with config.security; cfg.installWrapper && (!sudo.enable) && (!sudo-rs.enable)) [''
       The pleroma_ctl wrapper enabled by the installWrapper option relies on
       sudo, which appears to have been disabled through security.sudo.enable.
     ''];