1 { config, lib, pkgs, ... }:
4 options.services.tetrd.enable = lib.mkEnableOption (lib.mdDoc "tetrd");
6 config = lib.mkIf config.services.tetrd.enable {
8 systemPackages = [ pkgs.tetrd ];
9 etc."resolv.conf".source = "/etc/tetrd/resolv.conf";
13 tmpfiles.rules = [ "f /etc/tetrd/resolv.conf - - -" ];
16 description = pkgs.tetrd.meta.description;
17 wantedBy = [ "multi-user.target" ];
20 ExecStart = "${pkgs.tetrd}/opt/Tetrd/bin/tetrd";
22 RuntimeDirectory = "tetrd";
23 RootDirectory = "/run/tetrd";
26 DeviceAllow = "usb_device";
27 LockPersonality = true;
28 MemoryDenyWriteExecute = true;
29 NoNewPrivileges = true;
31 PrivateNetwork = lib.mkDefault false;
33 PrivateUsers = lib.mkDefault false;
34 ProtectClock = lib.mkDefault false;
35 ProtectControlGroups = true;
37 ProtectHostname = true;
38 ProtectKernelLogs = true;
39 ProtectKernelModules = true;
40 ProtectKernelTunables = true;
41 ProtectProc = "invisible";
42 ProtectSystem = "strict";
44 RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" "AF_NETLINK" ];
45 RestrictNamespaces = true;
46 RestrictRealtime = true;
47 RestrictSUIDSGID = true;
48 SystemCallArchitectures = "native";
73 "${pkgs.nettools}/bin/route:/usr/bin/route"
74 "${pkgs.nettools}/bin/ifconfig:/usr/bin/ifconfig"
78 "/etc/tetrd/resolv.conf:/etc/resolv.conf"
83 CapabilityBoundingSet = [
88 AmbientCapabilities = [