From 392b32b2af4ea9c02e1c360cdf6d8e337ed59f56 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Mon, 29 Jan 2024 11:31:12 -0500 Subject: [PATCH] nixos/moonraker: fix update_manager.enable_system_updates being [bool] and not bool --- nixos/modules/services/misc/moonraker.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/moonraker.nix b/nixos/modules/services/misc/moonraker.nix index 4e419aafa990..f043cc83bf05 100644 --- a/nixos/modules/services/misc/moonraker.nix +++ b/nixos/modules/services/misc/moonraker.nix @@ -103,17 +103,18 @@ in { config = mkIf cfg.enable { warnings = [] - ++ optional (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.'' - ++ optional (cfg.configDir != null) - '' - services.moonraker.configDir has been deprecated upstream and will be removed. + ++ (optional (head (cfg.settings.update_manager.enable_system_updates or [false])) '' + Enabling system updates is not supported on NixOS and will lead to non-removable warnings in some clients. + '') + ++ (optional (cfg.configDir != null) '' + services.moonraker.configDir has been deprecated upstream and will be removed. - Action: ${ - if cfg.configDir == unifiedConfigDir 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." - } - ''; + Action: ${ + if cfg.configDir == unifiedConfigDir + 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 = [ {