From 7547f8942cd2ad9ef572d701db23b4c08bb74fae Mon Sep 17 00:00:00 2001 From: davidaf3 Date: Tue, 5 May 2026 23:58:53 +0200 Subject: [PATCH] quickshell: don't throw error when package is null `programs.quickshell.package` is marked as nullable, but it will throw an error if set to null. This commit adds the necessary checks to allow setting the package to null. --- modules/programs/quickshell.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/programs/quickshell.nix b/modules/programs/quickshell.nix index 92b123fd4..b1dc86071 100644 --- a/modules/programs/quickshell.nix +++ b/modules/programs/quickshell.nix @@ -63,9 +63,13 @@ in assertion = !(builtins.any (name: lib.hasInfix "/" name) (builtins.attrNames cfg.configs)); message = "The names of configs in `programs.quickshell.configs` must not contain slashes."; } + { + assertion = cfg.systemd.enable -> cfg.package != null; + message = "`programs.quickshell.systemd.enable` cannot be true when `programs.quickshell.package` is null"; + } ]; - home.packages = [ cfg.package ]; + home.packages = lib.optionals (cfg.package != null) [ cfg.package ]; } (lib.mkIf cfg.systemd.enable {