From 913aa0dae95a6074bf2811b94d76270c838e4547 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 10 Oct 2024 09:32:41 +0900 Subject: [PATCH] :fire: remove unused services --- machines/orbi/configuration.nix | 2 - .../hardware-configuration/disko-config.nix | 12 --- machines/orbi/service-taskwarrior.nix | 76 ------------------- machines/orbi/service-vikunja.nix | 76 ------------------- 4 files changed, 166 deletions(-) delete mode 100644 machines/orbi/service-taskwarrior.nix delete mode 100644 machines/orbi/service-vikunja.nix diff --git a/machines/orbi/configuration.nix b/machines/orbi/configuration.nix index bd74047..9c24f42 100644 --- a/machines/orbi/configuration.nix +++ b/machines/orbi/configuration.nix @@ -21,9 +21,7 @@ ./service-photoprism.nix # ./service-surrealdb.nix # not really needed at the moment ./service-taskchampion.nix - #./service-taskwarrior.nix ./service-vaultwarden.nix - # ./service-vikunja.nix ./service-wastebin.nix ./nginx-ingolf-wagner-de.nix diff --git a/machines/orbi/hardware-configuration/disko-config.nix b/machines/orbi/hardware-configuration/disko-config.nix index 2a16043..ad45957 100644 --- a/machines/orbi/hardware-configuration/disko-config.nix +++ b/machines/orbi/hardware-configuration/disko-config.nix @@ -150,18 +150,6 @@ in #"com.sun:auto-snapshot:monthly" = toString true; }; }; - "vikunja" = { - type = "zfs_fs"; - mountpoint = "/var/lib/nixos-containers/vikunja"; - options = { - mountpoint = "legacy"; - compression = "lz4"; - "com.sun:auto-snapshot:hourly" = toString true; - "com.sun:auto-snapshot:daily" = toString true; - #"com.sun:auto-snapshot:weekly" = toString true; - #"com.sun:auto-snapshot:monthly" = toString true; - }; - }; }; }; diff --git a/machines/orbi/service-taskwarrior.nix b/machines/orbi/service-taskwarrior.nix deleted file mode 100644 index ea464a6..0000000 --- a/machines/orbi/service-taskwarrior.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - uiPort = 8080; -in -{ - - users.users.taskwarrior-webui = { - isSystemUser = true; - group = "taskwarrior-webui"; - uid = config.ids.uids.taskd; - }; - users.groups.taskwarrior-webui = { - gid = config.ids.gids.taskd; - }; - - # fixme: process is running as root - # fixme: task sync not working - - virtualisation.oci-containers = { - containers.taskwarrior-webui = { - volumes = [ - "/srv/taskwarrior/taskrc:/.taskrc" - "/srv/taskwarrior/task:/.task" - ]; - ports = [ - # only allow access via wireguard - "10.100.0.1:${toString uiPort}:80" - ]; - #user = "${toString config.users.users.taskwarrior-webui.uid}:${toString config.users.groups.taskwarrior-webui.gid}"; - environment = { - TZ = "Europe/Berlin"; - }; - image = "dcsunset/taskwarrior-webui:3"; - extraOptions = [ - # https://www.artificialworlds.net/blog/2023/08/18/accessing-services-on-the-host-from-a-docker-container-or-a-podman-one/ - # host.containers.internal <- will reference host ports - "--network=slirp4netns:allow_host_loopback=true" - ]; - - }; - }; - - networking.firewall.interfaces.wg0.allowedTCPPorts = [ uiPort ]; - networking.firewall.interfaces.wg0.allowedUDPPorts = [ uiPort ]; - - healthchecks.closed.public.ports.taskserver-webui = [ uiPort ]; - - # host nginx setup - # ---------------- - - # curl -H "Host: taskwarrior.ingolf-wagner.de" https://orbi.private/ < will work - # curl -H "Host: taskwarrior.ingolf-wagner.de" https://10.100.0.1/ < will work - # curl -H "Host: taskwarrior.ingolf-wagner.de" https://144.76.13.147/ < wont work - #services.nginx = { - # enable = true; - # recommendedProxySettings = true; - # virtualHosts = { - # "transmission2.${config.networking.hostName}.private" = { - # extraConfig = '' - # allow ${config.tinc.private.subnet}; - # allow ${config.wireguard.wg0.subnet}; - # deny all; - # ''; - # locations."/" = { - # proxyPass = "http://127.0.0.1:${toString uiPort}"; - # }; - # }; - # }; - #}; - -} diff --git a/machines/orbi/service-vikunja.nix b/machines/orbi/service-vikunja.nix deleted file mode 100644 index 1aa60ec..0000000 --- a/machines/orbi/service-vikunja.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ - config, - pkgs, - lib, - components, - inputs, - ... -}: -let - vikunjaPort = 3456; - mysqlPort = 3337; -in -{ - - networking.firewall.interfaces.wg0.allowedTCPPorts = [ vikunjaPort ]; - healthchecks.closed.public.ports.vikunja = [ vikunjaPort ]; - - containers.vikunja = { - privateNetwork = false; - autoStart = true; - - config = - { config, lib, ... }: - { - nixpkgs.pkgs = pkgs; - imports = [ - "${components}/monitor/container.nix" - inputs.nix-topology.nixosModules.default - ]; - system.stateVersion = "24.05"; - services.logrotate.checkConfig = false; # because uid 3000 does not exist in here - - # Vikunja - # ---------- - services.vikunja = { - enable = true; - port = vikunjaPort; - frontendScheme = "http"; - frontendHostname = "vikunja.ingolf-wagner.de"; - database.type = "sqlite"; - #database = { - # type = "mysql"; - # host = "localhost:${toString mysqlPort}"; - # user = "vikunja"; - #}; - }; - - # MySQL Database - # -------------- - services.mysql = { - enable = false; - package = pkgs.mariadb; - settings.mysqld.port = mysqlPort; - ensureDatabases = [ "vikunja" ]; - ensureUsers = [ - { - name = "vikunja"; - ensurePermissions = { - "vikunja.*" = "ALL PRIVILEGES"; - }; - } - ]; - }; - - # Backup Database - # --------------- - services.mysqlBackup = { - enable = false; - databases = config.services.mysql.ensureDatabases; - singleTransaction = true; - }; - - }; - }; - -}