Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/nixos/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
./plymouth.nix
./sddm.nix
./tty.nix
./where-is-my-sddm-theme.nix
# keep-sorted end
]
74 changes: 74 additions & 0 deletions modules/nixos/where-is-my-sddm-theme.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{ catppuccinLib }:
{
config,
lib,
pkgs,
...
}:

let
inherit (catppuccinLib) importINI;
inherit (lib)
mkOption
recursiveUpdate
singleton
types
;

cfg = config.catppuccin.where-is-my-sddm-theme;
enable = cfg.enable && config.services.displayManager.sddm.enable;
in

{
options.catppuccin.where-is-my-sddm-theme =
catppuccinLib.mkCatppuccinOption {
name = "where-is-my-sddm-theme";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name = "where-is-my-sddm-theme";
name = "where-is-my-sddm-theme";
default = config.catppuccin.sddm.enable || config.catppuccin.enable;
defaultText = "config.catppuccin.sddm.enable || config.catppuccin.enable";

I think this will fix the conflict with our base SDDM module

default = config.catppuccin.enable && !config.catppuccin.sddm.enable;
defaultText = "config.catppuccin.enable && !config.catppuccin.sddm.enable";
}
// {
variant = mkOption {
type = types.enum [
"qt5"
"qt6"
];
default =
if config.services.displayManager.sddm.package == pkgs.libsForQt5.sddm then "qt5" else "qt6";
defaultText = "Automatically determined based on your SDDM package - `qt6` for `kdePackages.sddm`, `qt5` for `libsForQt5.sddm`, and `qt6` as fallback";
example = "qt5";
description = "Which variant will be used for Where is my SDDM theme?";
};

settings = mkOption {
type = lib.types.submodule { freeformType = with types; attrsOf anything; };
default = { };
example = {
General.passwordCharacter = "*";
};
description = "Additional settings for Where is my SDDM theme?";
};
};

config = lib.mkIf enable {
assertions = [
{
assertion = config.catppuccin.sddm.enable -> cfg.enable;
message = "Only one of `catppuccin.sddm` and `catppuccin.where-is-my-sddm-theme` may be set at a time.";
}
];

environment.systemPackages = [
(pkgs.where-is-my-sddm-theme.override {
variants = singleton cfg.variant;
themeConfig = recursiveUpdate (importINI "${config.catppuccin.sources.where-is-my-sddm-theme}/catppuccin-${cfg.flavor}.conf") cfg.settings;
})
];

services.displayManager = {
sddm = {
theme =
if cfg.variant == "qt6" then "where_is_my_sddm_theme" else "where_is_my_sddm_theme_qt5";
};
};
};
}
5 changes: 5 additions & 0 deletions pkgs/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@
"lastModified": "2023-04-12",
"rev": "b1a81bae74d66eaae16457f2d8f151b5bd4fe5da"
},
"where-is-my-sddm-theme": {
"hash": "sha256-f6d7bJoSbFzEhAIfilxNLQGtAMQWTtUTube/pTqP7AY=",
"lastModified": "2024-10-13",
"rev": "82a36df79ab596b9fbe85c86d3c2f3a1e39433af"
},
"wlogout": {
"hash": "sha256-0VCk+7t/cSEmcnfvKdxUDwwrtK0VLhZrVpw4enoBEbc=",
"lastModified": "2025-08-07",
Expand Down