m 3 taskserver: rip
This commit is contained in:
parent
514dda7d1e
commit
cef765bc10
@ -11,7 +11,6 @@ _:
|
||||
./logging-config.nix
|
||||
./server-config.nix
|
||||
./snapraid.nix
|
||||
./taskserver.nix
|
||||
./torrent.nix
|
||||
./udpt.nix
|
||||
./umts.nix
|
||||
|
@ -1,60 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with import <stockholm/lib>;
|
||||
let
|
||||
cfg = config.makefu.taskserver;
|
||||
|
||||
out = {
|
||||
options.makefu.taskserver = api;
|
||||
config = lib.mkIf cfg.enable imp;
|
||||
};
|
||||
|
||||
api = {
|
||||
enable = mkEnableOption "taskserver";
|
||||
|
||||
workingDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/taskserver";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.taskserver;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
imp = {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
systemd.services.taskserver = {
|
||||
description = "taskd server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = true;
|
||||
unitConfig = {
|
||||
Documentation = "http://taskwarrior.org/docs/#taskd" ;
|
||||
# https://taskwarrior.org/docs/taskserver/configure.html
|
||||
ConditionPathExists = "${cfg.workingDir}/config";
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${cfg.package}/bin/taskd server --data ${cfg.workingDir}";
|
||||
WorkingDirectory = cfg.workingDir;
|
||||
# PrivateTmp = true;
|
||||
# InaccessibleDirectories = "/home /boot /opt /mnt /media";
|
||||
User = "taskd";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.taskd = {
|
||||
uid = genid "taskd";
|
||||
home = cfg.workingDir;
|
||||
createHome = true;
|
||||
};
|
||||
users.groups.taskd.gid = genid "taskd";
|
||||
};
|
||||
|
||||
in
|
||||
out
|
||||
|
Loading…
Reference in New Issue
Block a user