-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathi3.nix
31 lines (31 loc) · 877 Bytes
/
i3.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
{
lib,
config,
pkgs,
...
}: {
options.xsession.windowManager.i3.enableSystemdTarget = lib.mkEnableOption "i3 autostarting the systemd graphical user targets";
config = let
cfg = config.xsession.windowManager.i3.enableSystemdTarget;
in
lib.mkIf cfg {
systemd.user = {
targets.i3-session = {
Unit = {
Description = "i3 session";
Documentation = ["man:systemd.special(7)"];
BindsTo = ["graphical-session.target"];
Wants = ["graphical-session-pre.target"];
After = ["graphical-session-pre.target"];
};
};
};
xsession.windowManager.i3.config.startup = lib.mkAfter [
{
command = "${pkgs.systemd}/bin/systemctl --user start i3-session.target";
always = false;
notification = false;
}
];
};
}