blob: 49469b2d20fb4dd39233da2f74f283e282d29d09 (
plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{
lib,
config,
pkgs,
inputs,
system,
...
}: let
inherit (lib) mkIf;
cfg = config.desktops.ly;
in {
config = mkIf cfg.enable {
# display manager
services.displayManager.ly = {
enable = true;
settings = let
base = "0x00${config.theme.colors.base}";
text = "0x00${config.theme.colors.text}";
bold = "0x01${config.theme.colors.text}";
error = "0x00${config.theme.colors.error}";
red = "0x00${config.theme.colors.normal.red}";
blue = "0x00${config.theme.colors.normal.blue}";
in {
# general
clear_password = true;
default_input = "password";
xinitrc = "null";
hide_version_string = true;
hide_key_hints = true;
session_log = "/dev/null";
# state (evil)
tty = 1;
# background
bg = base;
error_bg = base;
blank_box = true;
# foreground
fg = text;
error_fg = error;
border_fg = bold;
# animation
animation = "colormix";
colormix_col1 = blue;
colormix_col2 = red;
colormix_col3 = "0x20000000";
};
};
# disable default login on tty 1
systemd.services."autovt@tty1".enable = false;
systemd.services."getty@tty1".enable = false;
# fix env not being set
systemd.services.display-manager = {
environment.XDG_CURRENT_DESKTOP = "X-NIXOS-SYSTEMD-AWARE";
};
# write save file
environment.etc."ly/save.txt".text = ''
0
${config.user}:1
'';
};
}
|