diff options
Diffstat (limited to 'accounts/gkleen@sif/systemd.nix')
-rw-r--r-- | accounts/gkleen@sif/systemd.nix | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix new file mode 100644 index 00000000..a5b71417 --- /dev/null +++ b/accounts/gkleen@sif/systemd.nix | |||
@@ -0,0 +1,94 @@ | |||
1 | { pkgs, config, userName, ... }: | ||
2 | let | ||
3 | xmobar = import ./xmobar pkgs.haskellPackages; | ||
4 | cfg = config.home-manager.users.${userName}; | ||
5 | in { | ||
6 | services = { | ||
7 | sync-keepass = { | ||
8 | Service = { | ||
9 | Type = "oneshot"; | ||
10 | WorkingDirectory = "~"; | ||
11 | ExecStart = "${pkgs.lftp}/bin/lftp -f ${./store.kdbx.lftp}"; | ||
12 | }; | ||
13 | }; | ||
14 | urxvtd = { | ||
15 | Service = { | ||
16 | Type = "simple"; | ||
17 | WorkingDirectory = "~"; | ||
18 | ExecStart = "${cfg.programs.urxvt.package}/bin/urxvtd"; | ||
19 | Restart = "always"; | ||
20 | }; | ||
21 | Unit = { | ||
22 | After = ["graphical-session.target"]; | ||
23 | }; | ||
24 | Install = { | ||
25 | WantedBy = ["graphical-session.target"]; | ||
26 | }; | ||
27 | }; | ||
28 | emacs = { | ||
29 | Unit = { | ||
30 | After = ["graphical-session-pre.target"]; | ||
31 | }; | ||
32 | }; | ||
33 | trayer = { | ||
34 | Service = { | ||
35 | Type = "simple"; | ||
36 | WorkingDirectory = "~"; | ||
37 | ExecStart = "${pkgs.trayer}/bin/trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 8 --tint 0x000000 --alpha 0 --transparent true --height 32 --monitor primary"; | ||
38 | Restart = "always"; | ||
39 | }; | ||
40 | Install = { | ||
41 | WantedBy = ["graphical-session.target"]; | ||
42 | }; | ||
43 | }; | ||
44 | xmobar = { | ||
45 | Service = { | ||
46 | Type = "simple"; | ||
47 | WorkingDirectory = "~"; | ||
48 | ExecStart = "${xmobar}/bin/xmobar"; | ||
49 | Restart = "always"; | ||
50 | Environment = "PATH=${pkgs.worktime}/bin:${pkgs.openssh}/bin"; | ||
51 | |||
52 | }; | ||
53 | Install = { | ||
54 | WantedBy = ["graphical-session.target"]; | ||
55 | }; | ||
56 | }; | ||
57 | dunst = { | ||
58 | Service = { | ||
59 | Restart = "always"; | ||
60 | }; | ||
61 | Install = { | ||
62 | WantedBy = ["graphical-session.target"]; | ||
63 | }; | ||
64 | }; | ||
65 | xiccd = { | ||
66 | Service = { | ||
67 | Type = "simple"; | ||
68 | WorkingDirectory = "~"; | ||
69 | ExecStart = "${pkgs.xiccd}/bin/xiccd"; | ||
70 | Restart = "always"; | ||
71 | }; | ||
72 | }; | ||
73 | }; | ||
74 | timers = { | ||
75 | sync-keepass = { | ||
76 | Timer = { | ||
77 | OnActiveSec = "1m"; | ||
78 | OnUnitActiveSec = "1m"; | ||
79 | }; | ||
80 | |||
81 | Install = { | ||
82 | WantedBy = ["default.target"]; | ||
83 | }; | ||
84 | }; | ||
85 | }; | ||
86 | targets = { | ||
87 | graphical-session = { | ||
88 | Unit = { | ||
89 | BindsTo = ["default.target"]; | ||
90 | After = ["basic.target"]; | ||
91 | }; | ||
92 | }; | ||
93 | }; | ||
94 | } | ||