diff --git a/flake.lock b/flake.lock index 24875f2..bddd998 100644 --- a/flake.lock +++ b/flake.lock @@ -114,7 +114,8 @@ "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix", - "unstable": "unstable" + "unstable": "unstable", + "voyager-addons": "voyager-addons" } }, "sops-nix": { @@ -153,6 +154,21 @@ "repo": "nixpkgs", "type": "github" } + }, + "voyager-addons": { + "locked": { + "lastModified": 1704460893, + "narHash": "sha256-rK+GBsfkua1Ou4YHcpQciDOdeS3q23GfTit2SddgTv0=", + "ref": "refs/heads/main", + "rev": "238bcd33b3e2562fcf76f86348909990ddc3d6cc", + "revCount": 3, + "type": "git", + "url": "ssh://git@git.feal.no:2222/felixalb/voyager-addons.git" + }, + "original": { + "type": "git", + "url": "ssh://git@git.feal.no:2222/felixalb/voyager-addons.git" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 1159265..597a0bf 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ matrix-synapse-next.url = "github:dali99/nixos-matrix-modules"; + voyager-addons.url = "git+ssh://git@git.feal.no:2222/felixalb/voyager-addons.git"; + sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; }; @@ -25,6 +27,7 @@ , nixpkgs , sops-nix , unstable + , voyager-addons , ... }@inputs: let overlay-unstable = final: prev: { @@ -43,6 +46,7 @@ ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) ./hosts/voyager/configuration.nix + voyager-addons.nixosModules.default sops-nix.nixosModules.sops matrix-synapse-next.nixosModules.synapse ]; diff --git a/hosts/voyager/configuration.nix b/hosts/voyager/configuration.nix index 22354c1..9f2d40f 100644 --- a/hosts/voyager/configuration.nix +++ b/hosts/voyager/configuration.nix @@ -22,7 +22,6 @@ ./services/gitea.nix ./services/vaultwarden.nix ./services/calibre.nix - ./services/stash.nix ./services/fancontrol.nix ./services/jupyter.nix # ./services/searx.nix diff --git a/hosts/voyager/services/stash.nix b/hosts/voyager/services/stash.nix deleted file mode 100644 index b78f4b4..0000000 --- a/hosts/voyager/services/stash.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ config, pkgs, lib, ... }: -let - host = "127.0.1.2"; - port = "5008"; - # Some uid I will never use for anything else - uid = config.ids.uids.amule; - gid = config.ids.gids.amule; -in { - sops.secrets."transmission/vpncreds" = { - owner = "transmission"; - group = "transmission"; - }; - - users.users.stash = { - inherit uid; - group = "stash"; - isSystemUser = true; - useDefaultShell = true; - description = "Stash media hosting platform"; - }; - - users.groups.stash = { - inherit gid; - }; - - # Stash media hosting platform - virtualisation.oci-containers.containers.stash = { - image = "stashapp/stash"; - ports = [ "${host}:${port}:9999" ]; - volumes = [ - "/var/lib/stash/config:/root/.stash" - "/var/lib/stash/cache:/cache" - "/tank/media/stash/data:/data" - "/tank/media/stash/other/metadata:/metadata" - "/tank/media/stash/other/blobs:/blobs" - "/tank/media/stash/other/generated:/generated" - ]; - environment = { - STASH_STASH = "/data/"; - STASH_GENERATED = "/generated/"; - STASH_METADATA = "/metadata"; - STASH_CACHE = "/cache"; - STASH_PORT = "9999"; - }; - environmentFiles = [ - ]; - }; - services.nginx.virtualHosts."stash.home.feal.no" = { - locations."/" = { - proxyPass = "http://${host}:${port}"; - }; - }; - -}