-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
48 lines (47 loc) · 1.25 KB
/
Copy pathdefault.nix
File metadata and controls
48 lines (47 loc) · 1.25 KB
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
{ inputs, pkgs, ... }:
let
inherit (pkgs) lib;
inherit (pkgs.stdenv) isDarwin;
inherit (inputs.host) isMatic;
in
{
# macOS: launchd agent for input-leap server
launchd.agents.input-leap-server = lib.mkIf isDarwin {
enable = true;
config = {
ProgramArguments = [
"${pkgs.input-leap}/bin/input-leaps"
"--no-daemon"
"--config"
"${../../../config/input-leap/server.conf}"
"--address"
":24800"
"--disable-crypto"
];
KeepAlive = true;
RunAtLoad = true;
StandardOutPath = "/tmp/input-leap-server.log";
StandardErrorPath = "/tmp/input-leap-server.error.log";
};
};
# Only on matic (not kyber)
systemd.user.services.input-leap-client = lib.mkIf isMatic {
Unit = {
Description = "Input Leap client (connects to galactica)";
After = [
"graphical-session.target"
"network-online.target"
];
Requires = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.input-leap}/bin/input-leapc --no-daemon --name matic --disable-crypto galactica:24800";
Restart = "on-failure";
RestartSec = 5;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
}