forked from Kangie/sddm-sugar-candy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
46 lines (41 loc) · 1.33 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
description = "Fork of the SDDM Sugar Candy theme by Marian Arlt";
outputs = {self}: {
nixosModules = rec {
default = sddm-sugar-candy;
sddm-sugar-candy = {
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.services.displayManager.sddm.sugarCandy;
in {
options.services.displayManager.sddm.sugarCandy = {
enable = mkEnableOption "sugar candy";
settings = mkOption {
type = with types; attrsOf (oneOf [bool int float str path]);
description = "The configuration for the SDDM Sugar Candy theme written in Nix.";
example = {
Background = /path/to/image.png;
DimBackgroundImage = 0.5;
};
};
};
config = mkIf cfg.enable {
assertions = [
{
assertion = config.services.displayManager.sddm.enable;
message = "The SDDM Sugar Candy theme requires SDDM to be enabled.";
}
];
environment.systemPackages = [
(pkgs.libsForQt5.callPackage ./default.nix {themeSettings.General = cfg.settings;})
];
services.displayManager.sddm.theme = "sddm-sugar-candy";
};
};
};
};
}