From b76fa31346db7fc958a9898f3c594696ca71c4fd Mon Sep 17 00:00:00 2001 From: Gabriele Modena Date: Mon, 1 Apr 2024 20:46:41 +0200 Subject: [PATCH] options: fix uninstallUnmanaged default value. (#62) Coherce `null` value to `false` when initialising the value of uninstallUnmanaged from the uninstallUnmanagedPackages option default value. Fixes issue #61. --- modules/options.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/options.nix b/modules/options.nix index 10c9193..f8fdd81 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -174,7 +174,8 @@ in uninstallUnmanaged = mkOption { type = with types; bool; - default = config.services.flatpak.uninstallUnmanagedPackages || false; + default = (if isNull config.services.flatpak.uninstallUnmanagedPackages then false else + config.services.flatpak.uninstallUnmanagedPackages) || false; description = lib.mdDoc '' If enabled, uninstall packages and delete remotes not managed by this module on activation. I.e. if packages were installed via Flatpak directly instead of this module,