Skip to content

Commit

Permalink
fix(nixos): sddm package not being installed
Browse files Browse the repository at this point in the history
Never use attrset merge operator with `mk*` attrsets since the right hand attrset overrides the left
  • Loading branch information
Weathercold committed May 24, 2024
1 parent 27dc542 commit 44c9433
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions modules/nixos/sddm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let
ctp
types
mkOption
optionalAttrs
versionAtLeast
;
cfg = config.services.displayManager.sddm.catppuccin;
Expand All @@ -19,8 +20,10 @@ let
# TODO: remove when 24.05 is stable
minVersion = "24.05";
in
{
options.services.displayManager = ctp.mkVersionedOpts minVersion {

# turn off this module entirely if less than minVersion
optionalAttrs (versionAtLeast ctp.getModuleRelease minVersion) {
options.services.displayManager = {
sddm.catppuccin = ctp.mkCatppuccinOpt "sddm" // {
font = mkOption {
type = types.str;
Expand Down Expand Up @@ -48,21 +51,18 @@ in
};
};

config =
mkIf enable {
environment.systemPackages = [
(pkgs.catppuccin-sddm.override {
inherit (cfg)
flavor
font
fontSize
background
loginBackground
;
})
];
}
// mkIf (enable && versionAtLeast ctp.getModuleRelease minVersion) {
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
};
config = mkIf enable {
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
environment.systemPackages = [
(pkgs.catppuccin-sddm.override {
inherit (cfg)
flavor
font
fontSize
background
loginBackground
;
})
];
};
}

0 comments on commit 44c9433

Please sign in to comment.