-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrawl.nix
34 lines (28 loc) · 829 Bytes
/
trawl.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
32
33
34
{ system, inputs, config, lib, pkgs, ... }:
with lib;
let
cfg = config.regolith.trawl;
in {
options.regolith.trawl = {
enable = mkEnableOption "Add trawl and trawld.service";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(import ./trawl/default.nix { inherit pkgs; })
];
# https://github.com/regolith-linux/trawl/blob/62cf7cf325ab516a3fac9305b3f4a7c96b84b814/debian/trawld.install#L2
systemd.user.services.trawld = {
description = "Trawl Configuration Daemon";
startLimitIntervalSec = 200;
startLimitBurst = 2;
serviceConfig = {
ExecStart = "/run/current-system/sw/usr/bin/trawld";
Restart = "always";
RestartSec = 1;
Type = "dbus";
BusName = "org.regolith.Trawl";
};
wantedBy = [ "default.target" ];
};
};
}