[module/taskserver,user/malte] Basic task syncing capabilities

Needs further work, especially regarding reproduceability
This commit is contained in:
Malte Tammena 2022-03-29 13:26:19 +02:00
parent 98a8cc026d
commit 093e6c59e9
4 changed files with 46 additions and 0 deletions

View file

@ -46,6 +46,11 @@
openFirewall = true;
};
services.taskserverConfigured = {
enable = true;
dataDir = "/srv/hnd/taskserver";
};
# TODO: This will not work until a few PRs are merged:
# - https://github.com/NixOS/hydra/pull/1175
# - https://github.com/NixOS/hydra/pull/1171

View file

@ -16,6 +16,7 @@
./hdparm.nix
./malte.nix
./marie.nix
./taskserver.nix
];
options.settings = with lib; {

29
modules/taskserver.nix Normal file
View file

@ -0,0 +1,29 @@
{
pkgs,
lib,
config,
...
}: let
cfg = config.services.taskserverConfigured;
in {
options.services.taskserverConfigured = with lib; {
enable = mkEnableOption "Enable configured taskserver";
dataDir = mkOption {
type = types.str;
description = "Folder to use for storage";
};
};
config = {
services.taskserver = lib.mkIf cfg.enable {
inherit (cfg) dataDir enable;
fqdn = "elysia-clarki";
debug = true;
listenHost = "0.0.0.0";
organisations.default = {
users = ["malte"];
};
};
networking.firewall.allowedTCPPorts = [config.services.taskserver.listenPort];
};
}

View file

@ -61,9 +61,20 @@ in {
sort = "reviewed+,modified+";
filter = "( reviewed.none: or reviewed.before:now-6days ) and ( +PENDING )";
};
taskd = {
certificate = "~/Tasks/pem/public.cert";
key = "~/Tasks/pem/private.key";
ca = "~/Tasks/pem/ca.cert";
server = "elysia-clarki:53589";
credentials = "default/malte/cdbff0ec-8b40-400f-990b-7c57d0b3a499";
};
};
};
services.taskwarrior-sync = {
enable = true;
};
home.file.".timewarrior/extensions/totals.py".source = "${timewarriorExtensions}/totals.py";
home.file."${dataLocation}/hooks/on-modify-timewarrior" = {
source = "${timewarriorExtensions}/on-modify.timewarrior";