-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nixos): add support for sddm (#168)
- Loading branch information
1 parent
0f2d8bb
commit d8a6d8a
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ lib | ||
, pkgs | ||
, config | ||
, ... | ||
}: | ||
let | ||
cfg = config.services.displayManager.sddm.catppuccin; | ||
enable = cfg.enable && config.services.displayManager.sddm.enable; | ||
|
||
inherit (lib) mkIf ctp types mkOption; | ||
in | ||
{ | ||
options.services.displayManager.sddm.catppuccin = | ||
ctp.mkCatppuccinOpt "sddm" | ||
// { | ||
font = mkOption { | ||
type = types.str; | ||
default = "Noto Sans"; | ||
description = "Font to use for the login screen"; | ||
}; | ||
|
||
fontSize = mkOption { | ||
type = types.str; | ||
default = "9"; | ||
description = "Font size to use for the login screen"; | ||
}; | ||
|
||
background = mkOption { | ||
type = with types; (either path str); | ||
default = ""; | ||
description = "Background image to use for the login screen"; | ||
}; | ||
|
||
loginBackground = mkOption { | ||
type = types.bool; | ||
default = true; | ||
description = "Add an additonal background layer to the login panel"; | ||
}; | ||
}; | ||
|
||
config = mkIf enable { | ||
services.displayManager.sddm.theme = "catppuccin-${cfg.flavour}"; | ||
|
||
environment.systemPackages = [ | ||
(pkgs.catppuccin-sddm.override { | ||
flavor = cfg.flavour; | ||
inherit (cfg) font fontSize background loginBackground; | ||
}) | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters