diff --git a/nixos/common/global/secrets/rekeyed/fuchsia/146f3229661998a1ca74449720287a7d-smb-secrets.age b/nixos/common/global/secrets/rekeyed/fuchsia/146f3229661998a1ca74449720287a7d-smb-secrets.age deleted file mode 100644 index 0d75c86..0000000 --- a/nixos/common/global/secrets/rekeyed/fuchsia/146f3229661998a1ca74449720287a7d-smb-secrets.age +++ /dev/null @@ -1,8 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 jVljVA ILfVChFf5s9U6CODItB/TqS1tUaAEeoLAGiNKPbDclU -MCyVqjOPexZm+is5JWG5zfbS26nJj/Z4mk6SJDufBPM --> RƥՐII9s~a{'<5|o;_*T'|ysvt(X_J.`r`"|*[ \ No newline at end of file diff --git a/nixos/common/global/secrets/rekeyed/viridian/4108bf86376b696948d4139797cfc8ba-microbin.age b/nixos/common/global/secrets/rekeyed/viridian/4108bf86376b696948d4139797cfc8ba-microbin.age deleted file mode 100644 index e9b6d06..0000000 Binary files a/nixos/common/global/secrets/rekeyed/viridian/4108bf86376b696948d4139797cfc8ba-microbin.age and /dev/null differ diff --git a/nixos/viridian/configuration.nix b/nixos/viridian/configuration.nix index 44a9a41..bb3286c 100644 --- a/nixos/viridian/configuration.nix +++ b/nixos/viridian/configuration.nix @@ -6,32 +6,25 @@ # Our user configuration and optional user units ../common/users/sajenim - # Containers - ./containers/jellyfin - ./containers/jellyseerr - ./containers/lidarr - ./containers/mealie - ./containers/microbin - ./containers/prowlarr - ./containers/qbittorrent - ./containers/radarr - ./containers/recyclarr - ./containers/sonarr - # Services ./services/borgbackup ./services/crowdsec ./services/forgejo - ./services/grafana ./services/immich ./services/lighttpd ./services/minecraft ./services/mpd - ./services/mysql ./services/paperless-ngx - ./services/prometheus ./services/traefik + # Multimedia + ./multimedia/jellyfin + ./multimedia/lidarr + ./multimedia/prowlarr + ./multimedia/qbittorrent + ./multimedia/radarr + ./multimedia/sonarr + # Setup our hardware ./hardware-configuration.nix ]; diff --git a/nixos/viridian/containers/jellyseerr/default.nix b/nixos/viridian/containers/jellyseerr/default.nix deleted file mode 100644 index 47bb4c5..0000000 --- a/nixos/viridian/containers/jellyseerr/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{...}: let - port = "5055"; -in { - virtualisation.oci-containers.containers = { - # Request management - jellyseerr = { - autoStart = true; - image = "ghcr.io/hotio/jellyseerr:release-1.9.2"; - ports = [ - "${port}:5055/tcp" # WebUI - ]; - volumes = [ - "/srv/containers/jellyseerr:/config" - ]; - environment = { - PUID = "1000"; - PGID = "100"; - }; - extraOptions = [ - "--network=media-stack" - ]; - }; - }; - - services.traefik.dynamicConfigOptions.http.routers = { - jellyseerr = { - rule = "Host(`jellyseerr.kanto.dev`)"; - entryPoints = [ - "websecure" - ]; - middlewares = [ - "internal" - ]; - service = "jellyseerr"; - }; - }; - - services.traefik.dynamicConfigOptions.http.services = { - jellyseerr.loadBalancer.servers = [ - {url = "http://127.0.0.1:${port}";} - ]; - }; -} diff --git a/nixos/viridian/containers/mealie/default.nix b/nixos/viridian/containers/mealie/default.nix deleted file mode 100644 index 42a6f7c..0000000 --- a/nixos/viridian/containers/mealie/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{...}: let - port = "9925"; -in { - virtualisation.oci-containers.containers = { - mealie = { - autoStart = true; - image = "ghcr.io/mealie-recipes/mealie:v1.11.0"; - ports = [ - "${port}:9000" - ]; - volumes = [ - "/srv/containers/mealie:/app/data/" - ]; - environment = { - ALLOW_SIGNUP = "false"; - PUID = "1000"; - PGID = "100"; - TZ = "Australia/Perth"; - MAX_WORKERS = "1"; - WEB_CONCURRENCY = "1"; - BASE_URL = "https://mealie.kanto.dev"; - SECURITY_MAX_LOGIN_ATTEMPTS = "3"; - SECRURITY_USER_LOCKOUT_TIME = "72"; - }; - }; - }; - - services.traefik.dynamicConfigOptions.http.routers = { - mealie = { - rule = "Host(`mealie.kanto.dev`)"; - entryPoints = [ - "websecure" - ]; - middlewares = [ - "crowdsec" - "geoblock" - ]; - service = "mealie"; - }; - }; - - services.traefik.dynamicConfigOptions.http.services = { - mealie.loadBalancer.servers = [ - {url = "http://127.0.0.1:${port}";} - ]; - }; -} diff --git a/nixos/viridian/containers/microbin/default.nix b/nixos/viridian/containers/microbin/default.nix deleted file mode 100644 index 248a623..0000000 --- a/nixos/viridian/containers/microbin/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{config, ...}: let - port = "8181"; -in { - age.secrets.microbin = { - # Environment variables for microbin - rekeyFile = ./environment.age; - owner = "sajenim"; - group = "users"; - }; - - virtualisation.oci-containers.containers = { - # Self-hosted, open-source pastbin - microbin = { - autoStart = true; - image = "danielszabo99/microbin:2.0.4"; - ports = [ - "${port}:8080/tcp" # WebUI - ]; - volumes = [ - # Container data - "/srv/containers/microbin:/app/microbin_data:rw" - ]; - environmentFiles = [ - config.age.secrets.microbin.path - ]; - }; - }; - - services.traefik.dynamicConfigOptions.http.routers = { - microbin = { - rule = "Host(`bin.kanto.dev`)"; - entryPoints = [ - "websecure" - ]; - middlewares = [ - "internal" - ]; - service = "microbin"; - }; - }; - - services.traefik.dynamicConfigOptions.http.services = { - microbin.loadBalancer.servers = [ - {url = "http://127.0.0.1:${port}";} - ]; - }; -} diff --git a/nixos/viridian/containers/microbin/environment.age b/nixos/viridian/containers/microbin/environment.age deleted file mode 100644 index 160a5cd..0000000 Binary files a/nixos/viridian/containers/microbin/environment.age and /dev/null differ diff --git a/nixos/viridian/containers/recyclarr/default.nix b/nixos/viridian/containers/recyclarr/default.nix deleted file mode 100644 index cd7aa60..0000000 --- a/nixos/viridian/containers/recyclarr/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{...}: { - virtualisation.oci-containers.containers = { - # Automatically synchronize recommended settings from the TRaSH guides to your Sonarr/Radarr instances - recyclarr = { - autoStart = true; - image = "ghcr.io/recyclarr/recyclarr:6.0.2"; - volumes = [ - "/srv/containers/recyclarr:/config" - ]; - extraOptions = [ - "--network=media-stack" - ]; - user = "1000:100"; - }; - }; -} diff --git a/nixos/viridian/containers/jellyfin/default.nix b/nixos/viridian/multimedia/jellyfin/default.nix similarity index 100% rename from nixos/viridian/containers/jellyfin/default.nix rename to nixos/viridian/multimedia/jellyfin/default.nix diff --git a/nixos/viridian/containers/lidarr/default.nix b/nixos/viridian/multimedia/lidarr/default.nix similarity index 100% rename from nixos/viridian/containers/lidarr/default.nix rename to nixos/viridian/multimedia/lidarr/default.nix diff --git a/nixos/viridian/containers/prowlarr/default.nix b/nixos/viridian/multimedia/prowlarr/default.nix similarity index 100% rename from nixos/viridian/containers/prowlarr/default.nix rename to nixos/viridian/multimedia/prowlarr/default.nix diff --git a/nixos/viridian/containers/qbittorrent/default.nix b/nixos/viridian/multimedia/qbittorrent/default.nix similarity index 100% rename from nixos/viridian/containers/qbittorrent/default.nix rename to nixos/viridian/multimedia/qbittorrent/default.nix diff --git a/nixos/viridian/containers/radarr/default.nix b/nixos/viridian/multimedia/radarr/default.nix similarity index 100% rename from nixos/viridian/containers/radarr/default.nix rename to nixos/viridian/multimedia/radarr/default.nix diff --git a/nixos/viridian/containers/sonarr/default.nix b/nixos/viridian/multimedia/sonarr/default.nix similarity index 100% rename from nixos/viridian/containers/sonarr/default.nix rename to nixos/viridian/multimedia/sonarr/default.nix diff --git a/nixos/viridian/services/grafana/default.nix b/nixos/viridian/services/grafana/default.nix deleted file mode 100644 index e457450..0000000 --- a/nixos/viridian/services/grafana/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{config, ...}: { - # Setup grafana our grafana instance. - services.grafana = { - enable = true; - dataDir = "/srv/services/grafana"; - settings = { - server = { - http_addr = "127.0.0.1"; - http_port = 3400; - domain = "kanto.dev"; - root_url = "https://kanto.dev/grafana/"; - serve_from_sub_path = true; - }; - database = { - type = "mysql"; - name = "grafana"; - user = "grafana"; - host = "/var/run/mysqld/mysqld.sock"; - }; - }; - }; - - # Setup our database for grafana. - services.mysql = { - ensureUsers = [ - { - name = "grafana"; - ensurePermissions = { - "grafana.*" = "ALL PRIVILEGES"; - }; - } - ]; - ensureDatabases = ["grafana"]; - }; - - # Setup our traefik router. - services.traefik.dynamicConfigOptions.http.routers = { - grafana = { - rule = "Host(`kanto.dev`)"; - entryPoints = [ - "websecure" - ]; - middlewares = [ - "internal" - ]; - service = "grafana"; - }; - }; - - # Setup our traefik service. - services.traefik.dynamicConfigOptions.http.services = { - grafana.loadBalancer.servers = [ - {url = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}";} - ]; - }; -} diff --git a/nixos/viridian/services/mysql/default.nix b/nixos/viridian/services/mysql/default.nix deleted file mode 100644 index 3ca4267..0000000 --- a/nixos/viridian/services/mysql/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - services.mysql = { - enable = true; - package = pkgs.mariadb; - dataDir = "/srv/services/mysql"; - }; -} diff --git a/nixos/viridian/services/prometheus/default.nix b/nixos/viridian/services/prometheus/default.nix deleted file mode 100644 index 38a67aa..0000000 --- a/nixos/viridian/services/prometheus/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{config, ...}: { - services.prometheus = { - enable = true; - port = 9001; # Port to listen on. - - # Valid in all configuration contexts, defaults for other configuration sections. - globalConfig = { - scrape_interval = "15s"; - }; - - # Collect specific metrics, format them, and expose them through HTTP endpoints for prometheus to scrape. - exporters = { - node = { - enable = true; - enabledCollectors = ["systemd" "processes"]; - port = 9100; - }; - }; - - # Specify a set of targets and parameters describing how to scrape them. - scrapeConfigs = [ - { - job_name = "node"; - static_configs = [ - { - targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"]; - } - ]; - } - ]; - }; -}