From 9b871249e2859c6b63226caf16215929ae7c4168 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Fri, 31 May 2024 20:33:12 +0200 Subject: [PATCH] voyager: remove transmission --- flake.lock | 14 ++--- hosts/voyager/configuration.nix | 1 - hosts/voyager/services/transmission.nix | 76 ------------------------- 3 files changed, 7 insertions(+), 84 deletions(-) delete mode 100644 hosts/voyager/services/transmission.nix diff --git a/flake.lock b/flake.lock index 5453ce7..f65a3e3 100644 --- a/flake.lock +++ b/flake.lock @@ -163,11 +163,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1716991068, + "narHash": "sha256-Av0UWCCiIGJxsZ6TFc+OiKCJNqwoxMNVYDBChmhjNpo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "25cf937a30bf0801447f6bf544fc7486c6309234", "type": "github" }, "original": { @@ -243,11 +243,11 @@ }, "voyager-addons": { "locked": { - "lastModified": 1707399193, - "narHash": "sha256-Q570CBu01ufGMitMQVAgsKoQ7zMEDwqDtqKJ1kyeUjQ=", + "lastModified": 1717176924, + "narHash": "sha256-pYq/v0RNwHshSZf2OeH3P6Aa4/zHGDAJq7Z2Ah9i700=", "ref": "refs/heads/main", - "rev": "3d04b4ec9c40948693f4efe919413cce9265bae7", - "revCount": 4, + "rev": "15f32cc6b828c56cb6a954de0096b81f291100d9", + "revCount": 8, "type": "git", "url": "file:///home/felixalb/voyager-addons" }, diff --git a/hosts/voyager/configuration.nix b/hosts/voyager/configuration.nix index 21edbc3..cac05a1 100644 --- a/hosts/voyager/configuration.nix +++ b/hosts/voyager/configuration.nix @@ -21,7 +21,6 @@ ./services/postgres.nix ./services/snappymail.nix ./services/timemachine.nix - ./services/transmission.nix ]; networking = { diff --git a/hosts/voyager/services/transmission.nix b/hosts/voyager/services/transmission.nix deleted file mode 100644 index fc71ae0..0000000 --- a/hosts/voyager/services/transmission.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ config, pkgs, lib, ... }: -let - host = "127.0.1.2"; - port = "5003"; - uid = config.ids.uids.transmission; - gid = config.ids.gids.transmission; -in { - sops.secrets."transmission/vpncreds" = { - owner = "transmission"; - group = "transmission"; - }; - - users.users.transmission = { - inherit uid; - group = "transmission"; - isSystemUser = true; - useDefaultShell = true; - description = "Transmission torrent service"; - }; - - users.groups.transmission = { - inherit gid; - }; - - # Transmission+PIA: Torrent client, Integrated VPN, Web interface - virtualisation.oci-containers.containers.transmission = { - image = "haugene/transmission-openvpn"; - ports = [ "${host}:${port}:9091" ]; - volumes = [ - "/var/lib/transmission/config:/config" - "/tank/media/transmission:/data" - ]; - environment = { - OPENVPN_PROVIDER = "PIA"; - OPENVPN_CONFIG = "sweden,norway,de_frankfurt"; - LOCAL_NETWORK = "192.168.10.0/24"; - TRANSMISSION_WEB_UI = "flood-for-transmission"; - PUID = toString uid; - PGID = toString gid; - }; - environmentFiles = [ - # OPENVPN_USERNAME and password is set here - # and optionally TRANSMISSION_RPC_USERNAME and password - config.sops.secrets."transmission/vpncreds".path - ]; - extraOptions = [ - /* "--cap-add=net_admin,net_raw,mknod" */ - "--cap-add=NET_ADMIN" - "--device=/dev/net/tun" - ]; - }; - services.nginx.virtualHosts."transmission.home.feal.no" = { - locations."/" = { - proxyPass = "http://${host}:${port}"; - }; - }; - - fileSystems = { - "/tank/media/transmission/jellyfin" = { - device = "/tank/media/jellyfin"; - options = [ "bind" ]; - }; - "/tank/media/transmission/music" = { - device = "/tank/media/music"; - options = [ "bind" ]; - }; - "/tank/media/transmission/inbox" = { - device = "/tank/inbox"; - options = [ "bind" ]; - }; - "/tank/media/transmission/other" = { - device = "/tank/media/other"; - options = [ "bind" ]; - }; - }; -}