Merge pull request #284800 from lovesegfault/fix-moonraker-warn

nixos/moonraker: fix update_manager.enable_system_updates being [bool] and not bool
This commit is contained in:
Bernardo Meurer 2024-01-29 18:23:33 -05:00 committed by GitHub
commit 429a3accd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,17 +103,18 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
warnings = [] warnings = []
++ optional (cfg.settings.update_manager.enable_system_updates or false) ++ (optional (head (cfg.settings.update_manager.enable_system_updates or [false])) ''
''Enabling update_manager is not supported on NixOS and will lead to non-removable warnings in some clients.'' Enabling system updates is not supported on NixOS and will lead to non-removable warnings in some clients.
++ optional (cfg.configDir != null) '')
'' ++ (optional (cfg.configDir != null) ''
services.moonraker.configDir has been deprecated upstream and will be removed. services.moonraker.configDir has been deprecated upstream and will be removed.
Action: ${ Action: ${
if cfg.configDir == unifiedConfigDir then "Simply remove services.moonraker.configDir from your config." if cfg.configDir == unifiedConfigDir
else "Move files from `${cfg.configDir}` to `${unifiedConfigDir}` then remove services.moonraker.configDir from your config." then "Simply remove services.moonraker.configDir from your config."
} else "Move files from `${cfg.configDir}` to `${unifiedConfigDir}` then remove services.moonraker.configDir from your config."
''; }
'');
assertions = [ assertions = [
{ {