From 8c1d7d3d3b03f1b73802c1afd047493c79a2c85c Mon Sep 17 00:00:00 2001 From: isabel Date: Fri, 14 Jun 2024 16:30:47 +0100 Subject: [PATCH 1/2] fix(nixos): use the qt 6 version of sddm the upstream port has moved to qt 6, while nixos' default is still qt 5 --- modules/nixos/sddm.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix index 1f36de10..e3b97fb1 100644 --- a/modules/nixos/sddm.nix +++ b/modules/nixos/sddm.nix @@ -40,10 +40,32 @@ in default = true; description = "Add an additional background layer to the login panel"; }; + + assertQt6Sddm = + lib.mkEnableOption '' + checking if `services.displayManager.sddm.package` is the Qt 6 version. + + This is to ensure the theme is applied properly, but may have false positives in the case of overridden packages for example + '' + // { + default = true; + }; }; config = mkIf enable { + assertions = lib.optional cfg.assertQt6Sddm { + assertion = config.services.displayManager.sddm.package == pkgs.kdePackages.sddm; + message = '' + Only the Qt 6 version of SDDM is supported by this port! + + In most cases this can be resolved by setting `services.displayManager.sddm.package` + to `pkgs.kdePackages.sddm`. If you know what you're doing and wish to disable this check, + please set `services.displayManager.sddm.catppuccin.assertQt6Sddm` to `false` + ''; + }; + services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}"; + environment.systemPackages = [ (pkgs.catppuccin-sddm.override { inherit (cfg) From 411cb1da5700e5e7b33edaac8373fbfbfc570ced Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 08:08:32 -0400 Subject: [PATCH 2/2] chore(nixos): use the qt6 version of sddm in tests --- test.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test.nix b/test.nix index f43c8709..6b73ce8b 100644 --- a/test.nix +++ b/test.nix @@ -29,7 +29,7 @@ testers.runNixOSTest { name = "module-test"; nodes.machine = - { lib, ... }: + { lib, pkgs, ... }: { imports = [ home-manager.nixosModules.default @@ -43,7 +43,9 @@ testers.runNixOSTest { }; services = { - displayManager.sddm = enable; + displayManager.sddm = enable // { + package = pkgs.kdePackages.sddm; # our module/the upstream port requires the qt6 version + }; xserver.enable = true; # required for sddm };