Skip to content

Commit

Permalink
feat: sddm
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed May 13, 2024
1 parent e5322f7 commit 4176e6d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 4 deletions.
50 changes: 50 additions & 0 deletions modules/nixos/sddm.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ 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.int;
default = 9;
description = "Font size to use for the login screen";
};

background = mkOption {
type = types.nullOr types.path;
default = null;
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 {
inherit (cfg) flavor font fontSize background loginBackground;
})
];
};
}
14 changes: 10 additions & 4 deletions test.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{ testers, home-manager }:
{ testers
, home-manager
,
}:
let
common = {
catppuccin.enable = true;
Expand Down Expand Up @@ -88,14 +91,17 @@ testers.runNixOSTest {
yazi = enable;
zathura = enable;
zellij = enable;
zsh = enable // {
syntaxHighlighting = enable;
};
zsh =
enable
// {
syntaxHighlighting = enable;
};
};

gtk = lib.recursiveUpdate enable { catppuccin.cursor.enable = true; };

services = {
displayManager.sddm = enable;
dunst = enable;
mako = enable;
polybar =
Expand Down

0 comments on commit 4176e6d

Please sign in to comment.