blob: 9852a51ca84d2c10a47d46b8a0e66ed149be0da5 (
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
|
{ config, lib, pkgs, ... }:
{
environment.systemPackages = [
#pkgs.tigervnc
pkgs.turbovnc
pkgs.x11vnc
pkgs.xscreensaver
];
security.polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if (
subject.isInGroup("users")
&& (
action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
)
)
{
return polkit.Result.YES;
}
})
'';
};
services = {
displayManager = lib.mkIf (config.networking.hostName != "fangorn") {
defaultSession = "xsession";
};
picom.enable = true;
xserver = {
displayManager.lightdm = lib.mkMerge [
(lib.mkIf (config.networking.hostName == "fangorn") {
enable = true;
})
(lib.mkIf (config.networking.hostName != "fangorn") {
enable = true;
extraSeatDefaults = ''greeter-hide-users=true'';
})
];
displayManager.session = lib.mkIf (config.networking.hostName != "fangorn") [
{
manage = "desktop";
name = "xsession";
start = ''exec $HOME/.xsession'';
}
];
enable = true;
xkb.layout = "us";
xkb.options = "caps:super,compose:ralt";
};
};
}
|