diff --git a/modules/services/arr/default.nix b/modules/services/arr/default.nix deleted file mode 100644 index c2cbc4f..0000000 --- a/modules/services/arr/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{...}: { - services.radarr = { - enable = true; - openFirewall = true; - dataDir = "/var/lib/radarr"; - }; - - services.sonarr = { - enable = true; - openFirewall = true; - dataDir = "/var/lib/sonarr"; - }; - - services.prowlarr = { - enable = true; - openFirewall = true; - }; -} diff --git a/modules/services/default.nix b/modules/services/default.nix deleted file mode 100644 index e32b7ba..0000000 --- a/modules/services/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{...}: { - imports = [ - ./traefik.nix - ./homepage.nix - ./searxng.nix - ./hugo.nix - ./stash.nix - ./foundryvtt.nix - ./forgejo.nix - ./jellyfin.nix - ./rustypaste.nix - ]; -} diff --git a/modules/services/forgejo.nix b/modules/services/forgejo.nix deleted file mode 100644 index ee6a723..0000000 --- a/modules/services/forgejo.nix +++ /dev/null @@ -1,17 +0,0 @@ -{pkgs, ...}: { - services.gitea = { - enable = true; - package = pkgs.forgejo; - appName = "forgejo"; - stateDir = "/sakura/forgejo"; - settings = { - service.DISABLE_REGISTRATION = true; - server = { - HTTP_PORT = 3000; - DOMAIN = "git.notohh.dev"; - ROOT_URL = "https://git.notohh.dev"; - LANDING_PAGE = "/explore/repos"; - }; - }; - }; -} diff --git a/modules/services/foundryvtt.nix b/modules/services/foundryvtt.nix deleted file mode 100644 index fa7017a..0000000 --- a/modules/services/foundryvtt.nix +++ /dev/null @@ -1,20 +0,0 @@ -{...}: { - sops.secrets.foundry-username = {}; - sops.secrets.foundry-password = {}; - virtualisation.oci-containers.containers.foundryvtt = { - image = "felddy/foundryvtt:release"; - volumes = [ - "/home/notoh/docker/foundryvtt:/data" - ]; - environment = { - CONTAINER_PRESERVE_CONFIG = "true"; - }; - environmentFiles = [ - /run/secrets/foundry-username - /run/secrets/foundry-password - ]; - ports = [ - "30000:30000" - ]; - }; -} diff --git a/modules/services/homepage.nix b/modules/services/homepage.nix deleted file mode 100644 index a8ca260..0000000 --- a/modules/services/homepage.nix +++ /dev/null @@ -1,12 +0,0 @@ -{...}: { - virtualisation.oci-containers.containers.homepage = { - image = "ghcr.io/benphelps/homepage"; - volumes = [ - "/home/notoh/docker/homepage:/app/config" - "/var/run/docker.sock:/var/run/docker.sock:ro" - ]; - ports = [ - "3005:3000" - ]; - }; -} diff --git a/modules/services/hugo.nix b/modules/services/hugo.nix deleted file mode 100644 index b758dbb..0000000 --- a/modules/services/hugo.nix +++ /dev/null @@ -1,13 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [hugo]; - virtualisation.oci-containers.containers.hugo = { - image = "klakegg/hugo:0.101.0"; - cmd = ["server"]; - volumes = [ - "/home/notoh/docker/hugo:/src" - ]; - ports = [ - "1313:1313" - ]; - }; -} diff --git a/modules/services/jellyfin.nix b/modules/services/jellyfin.nix deleted file mode 100644 index 65ecce0..0000000 --- a/modules/services/jellyfin.nix +++ /dev/null @@ -1,10 +0,0 @@ -{...}: { - services.jellyfin = { - enable = true; - openFirewall = true; - }; - services.jellyseerr = { - enable = true; - openFirewall = true; - }; -} diff --git a/modules/services/rustypaste.nix b/modules/services/rustypaste.nix deleted file mode 100644 index 9d590c4..0000000 --- a/modules/services/rustypaste.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - pkgs, - config, - ... -}: { - sops.secrets.rusty-auth-token = {}; - environment.systemPackages = with pkgs; [rustypaste]; - - systemd.services.rustypaste = { - enable = true; - wantedBy = [ - "multi-user.target" - ]; - description = "A minimal file upload/pastebin service."; - environment = { - # AUTH_TOKEN = config.sops.secrets.rusty-auth-token.path; - CONFIG = "/var/lib/rustypaste/config.toml"; - }; - serviceConfig = { - User = "root"; - ExecStart = "${pkgs.rustypaste}/bin/rustypaste"; - Restart = "always"; - RestartSec = 30; - StandardOutput = "syslog"; - WorkingDirectory = "/var/lib/rustypaste"; - }; - }; -} diff --git a/modules/services/searxng.nix b/modules/services/searxng.nix deleted file mode 100644 index 95e8820..0000000 --- a/modules/services/searxng.nix +++ /dev/null @@ -1,14 +0,0 @@ -{...}: { - virtualisation.oci-containers.containers.searxng = { - image = "searxng/searxng"; - volumes = [ - "/home/notoh/docker/searxng:/etc/searxng:rw" - ]; - environment = { - INSTANCE_NAME = "SearXNG"; - }; - ports = [ - "8085:8080" - ]; - }; -} diff --git a/modules/services/stash.nix b/modules/services/stash.nix deleted file mode 100644 index db7f5c7..0000000 --- a/modules/services/stash.nix +++ /dev/null @@ -1,23 +0,0 @@ -{...}: { - virtualisation.oci-containers.containers.stash = { - image = "stashapp/stash"; - environment = { - STASH_STASH = "/data/"; - STASH_GENERATED = "/generated/"; - STASH_METADATA = "/metadata/"; - STASH_CACHE = "/cache/"; - STASH_PORT = "9999"; - }; - volumes = [ - "/etc/localtime:/etc/localtime:ro" - "/home/notoh/docker/stash/.config:/root/.stash" - "/home/notoh/docker/stash/data:/data" - "/home/notoh/docker/stash/.metadata:/metadata" - "/home/notoh/docker/stash/cache:/cache" - "/home/notoh/docker/stash/generated:/generated" - ]; - ports = [ - "9999:9999" - ]; - }; -} diff --git a/modules/services/traefik.nix b/modules/services/traefik.nix deleted file mode 100644 index 58ac533..0000000 --- a/modules/services/traefik.nix +++ /dev/null @@ -1,120 +0,0 @@ -{config, ...}: { - sops.secrets.cloudflare-api-key = {}; - networking.firewall.allowedTCPPorts = [80 443]; - systemd.user.services.traefik.after = ["docker.service"]; - systemd.services.traefik = { - environment = { - CLOUDFLARE_EMAIL = "jch0tm2e@notohh.dev"; - }; - serviceConfig = { - EnvironmentFile = config.sops.secrets.cloudflare-api-key.path; - }; - }; - services.traefik = { - enable = true; - dynamicConfigOptions = { - http = { - routers = { - api = { - rule = "PathPrefix(`/api/`)"; - entryPoints = ["websecure"]; - service = "api@internal"; - }; - homepage = { - rule = "Host(`dashboard.lab`)"; - entrypoints = ["web"]; - service = "homepage"; - }; - searxng = { - rule = "Host(`searxng.lab`)"; - entrypoints = ["web"]; - service = "searxng"; - }; - stash = { - rule = "Host(`stash.lab`)"; - entrypoints = ["web"]; - service = "stash"; - }; - jellyfin = { - rule = "Host(`jellyfin.lab`)"; - entrypoints = ["web"]; - service = "jellyfin"; - }; - hugo = { - rule = "Host(`notohh.dev`)"; - entryPoints = ["websecure"]; - service = "hugo"; - tls.domains = [{main = "*.notohh.dev";}]; - tls.certresolver = "production"; - }; - foundryvtt = { - rule = "Host(`foundry.notohh.dev`)"; - entrypoints = ["websecure"]; - service = "foundryvtt"; - tls.domains = [{main = "*.notohh.dev";}]; - tls.certresolver = "production"; - }; - gitea = { - rule = "Host(`git.notohh.dev`)"; - entrypoints = ["websecure"]; - service = "gitea"; - tls.domains = [{main = "*.notohh.dev";}]; - tls.certresolver = "production"; - }; - rustypaste = { - rule = "Host(`img.notohh.dev`)"; - entrypoints = ["websecure"]; - service = "rustypaste"; - tls.domains = [{main = "*.notohh.dev";}]; - tls.certresolver = "production"; - }; - }; - services = { - homepage.loadBalancer.servers = [{url = "http://localhost:3005";}]; - searxng.loadBalancer.servers = [{url = "http://localhost:8085";}]; - hugo.loadBalancer.servers = [{url = "http://localhost:1313";}]; - stash.loadBalancer.servers = [{url = "http://localhost:9999";}]; - jellyfin.loadBalancer.servers = [{url = "http://localhost:8096";}]; - foundryvtt.loadBalancer.servers = [{url = "http://localhost:30000";}]; - gitea.loadBalancer.servers = [{url = "http://localhost:3000";}]; - rustypaste.loadBalancer.servers = [{url = "http://localhost:8000";}]; - }; - }; - }; - staticConfigOptions = { - log.level = "DEBUG"; - api.dashboard = false; - api.insecure = false; - global = { - checkNewVersion = false; - sendAnonymousUsage = false; - }; - entryPoints = { - websecure.address = ":443"; - web.address = ":80"; - }; - certificatesResolvers = { - staging.acme = { - email = "x3xr6n66@notohh.dev"; - storage = "/var/lib/traefik/acme.json"; - caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"; - dnsChallenge = { - provider = "cloudflare"; - resolvers = ["1.1.1.1:53" "1.0.0.1:53"]; - delayBeforeCheck = "0"; - }; - }; - production.acme = { - email = "x3xr6n66@notohh.dev"; - storage = "/var/lib/traefik/acme.json"; - caServer = "https://acme-v02.api.letsencrypt.org/directory"; - dnsChallenge = { - provider = "cloudflare"; - resolvers = ["1.1.1.1:53" "1.0.0.1:53"]; - delayBeforeCheck = "0"; - }; - }; - }; - }; - }; -}