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 f229550
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/nixos/sddm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
let
inherit (lib)
mkIf
mkMerge
ctp
types
mkOption
Expand All @@ -19,6 +20,7 @@ let
# TODO: remove when 24.05 is stable
minVersion = "24.05";
in

{
options.services.displayManager = ctp.mkVersionedOpts minVersion {
sddm.catppuccin = ctp.mkCatppuccinOpt "sddm" // {
Expand Down Expand Up @@ -48,8 +50,8 @@ in
};
};

config =
mkIf enable {
config = mkIf enable (mkMerge [
{
environment.systemPackages = [
(pkgs.catppuccin-sddm.override {
inherit (cfg)
Expand All @@ -62,7 +64,8 @@ in
})
];
}
// mkIf (enable && versionAtLeast ctp.getModuleRelease minVersion) {
(mkIf (versionAtLeast ctp.getModuleRelease minVersion) {
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
};
})
]);
}

0 comments on commit f229550

Please sign in to comment.