Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.services.todesk;
|
|
in
|
|
{
|
|
options = {
|
|
services.todesk.enable = lib.mkEnableOption "ToDesk daemon";
|
|
services.todesk.package = lib.mkPackageOption pkgs "todesk" { };
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
systemd.services.todeskd = {
|
|
description = "ToDesk Daemon Service";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
wants = [
|
|
"network-online.target"
|
|
"display-manager.service"
|
|
"nss-lookup.target"
|
|
];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${cfg.package}/bin/todesk service";
|
|
ExecReload = "${pkgs.coreutils}/bin/kill -SIGINT $MAINPID";
|
|
Restart = "on-failure";
|
|
WorkingDirectory = "/var/lib/todesk";
|
|
PrivateTmp = true;
|
|
StateDirectory = "todesk";
|
|
StateDirectoryMode = "0777"; # Desktop application read and write /opt/todesk/config/config.ini. Such a pain!
|
|
ProtectSystem = "strict";
|
|
ProtectHome = "read-only";
|
|
RemoveIPC = "yes";
|
|
};
|
|
};
|
|
};
|
|
}
|