fix(nixos): use the qt 6 version of sddm (#230)
* fix(nixos): use the qt 6 version of sddm the upstream port has moved to qt 6, while nixos' default is still qt 5 * chore(nixos): use the qt6 version of sddm in tests --------- Co-authored-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
cc8d3b17d2
commit
b6c854508d
2 changed files with 26 additions and 2 deletions
|
@ -40,10 +40,32 @@ in
|
||||||
default = true;
|
default = true;
|
||||||
description = "Add an additional background layer to the login panel";
|
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 {
|
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}";
|
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.catppuccin-sddm.override {
|
(pkgs.catppuccin-sddm.override {
|
||||||
inherit (cfg)
|
inherit (cfg)
|
||||||
|
|
6
test.nix
6
test.nix
|
@ -29,7 +29,7 @@ testers.runNixOSTest {
|
||||||
name = "module-test";
|
name = "module-test";
|
||||||
|
|
||||||
nodes.machine =
|
nodes.machine =
|
||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
home-manager.nixosModules.default
|
home-manager.nixosModules.default
|
||||||
|
@ -43,7 +43,9 @@ testers.runNixOSTest {
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
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
|
xserver.enable = true; # required for sddm
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue