diff --git a/actual.nix b/actual.nix new file mode 100644 index 0000000..6f9ea0d --- /dev/null +++ b/actual.nix @@ -0,0 +1,17 @@ +{lib, config, ...}: +let +in +{ + config = lib.mkMerge [ + (lib.mkIf (config.networking.hostName == "loadedskypotato") { + services.actual = { + enable = true; + settings = { + hostname = "127.0.0.1"; + }; + }; + + services.cloudflared.tunnels.mine.ingress."actual.claytonhickey.me" = "http://127.0.0.1:${builtins.toString 3000}"; + }) + ]; +} diff --git a/cloudflared.nix b/cloudflared.nix index 6a3b6c3..ccd31ff 100644 --- a/cloudflared.nix +++ b/cloudflared.nix @@ -11,5 +11,28 @@ }; }; }) + (lib.mkIf (config.networking.hostName == "loadedskypotato") { + services.cloudflared = { + enable = true; + certificateFile = "/Block/cloudflare/cert.pem"; + tunnels.mine = { + credentialsFile = "/Block/cloudflare/4fc85af1-38f7-4c96-856c-7c797c5e3bf8.json"; + default = "http_status:404"; + ingress = { + "languini.net" = "http://10.100.0.2:5267"; + "claytondoesthings.xyz" = "http://127.0.0.1:5000"; + "nextcloud.claytondoesthings.xyz" = "http://10.100.0.2:8120"; + "bikeability.claytonhickey.me" = "http://10.100.0.2:8001"; + "bikeability-tileserver.claytonhickey.me" = "http://10.100.0.2:8000"; + "bikeability-rasterserver.claytonhickey.me" = "http://127.0.0.1:8304"; + "claytonhickey.me" = "http://127.0.0.1:8302"; + "jellyfin.claytonhickey.me" = "http://10.100.0.2:8096"; + "forgejo.claytonhickey.me" = "unix://${config.services.forgejo.settings.server.HTTP_ADDR}"; + "matrix.claytonhickey.me" = "http://127.0.0.1:8303"; + "mastodon.claytonhickey.me" = "http://10.100.0.2:5328"; + }; + }; + }; + }) ]; } diff --git a/cos.nix b/cos.nix index 873e57d..cb9be9a 100644 --- a/cos.nix +++ b/cos.nix @@ -1,6 +1,7 @@ { lib, inputs, config, ... }: { imports = [ + ./actual.nix ./hyprland.nix ./wireguard.nix ./winboat.nix diff --git a/loadedskypotato/configuration.nix b/loadedskypotato/configuration.nix index 2844d34..81f5de2 100644 --- a/loadedskypotato/configuration.nix +++ b/loadedskypotato/configuration.nix @@ -99,31 +99,6 @@ in locations."/".proxyPass = "http://10.100.0.2:9000/styles/bikeability/512/"; }; - services.cloudflared = { - enable = true; - certificateFile = "/Block/cloudflare/cert.pem"; - tunnels = { - "4fc85af1-38f7-4c96-856c-7c797c5e3bf8" = { - credentialsFile = "/Block/cloudflare/4fc85af1-38f7-4c96-856c-7c797c5e3bf8.json"; - default = "http_status:404"; - ingress = { - "languini.net" = "http://10.100.0.2:5267"; - "claytondoesthings.xyz" = "http://127.0.0.1:5000"; - "nextcloud.claytondoesthings.xyz" = "http://10.100.0.2:8120"; - "bikeability.claytonhickey.me" = "http://10.100.0.2:8001"; - "bikeability-tileserver.claytonhickey.me" = "http://10.100.0.2:8000"; - "bikeability-rasterserver.claytonhickey.me" = "http://127.0.0.1:8304"; - "claytonhickey.me" = "http://127.0.0.1:8302"; - "jellyfin.claytonhickey.me" = "http://10.100.0.2:8096"; - "forgejo.claytonhickey.me" = "unix://${config.services.forgejo.settings.server.HTTP_ADDR}"; - "matrix.claytonhickey.me" = "http://127.0.0.1:8303"; - "actual.claytonhickey.me" = "http://127.0.0.1:3000"; - "mastodon.claytonhickey.me" = "http://10.100.0.2:5328"; - }; - }; - }; - }; - services.dnsmasq = { enable = true; settings = { @@ -241,13 +216,6 @@ in }; }; - actual = { - enable = true; - settings = { - hostname = "127.0.0.1"; - }; - }; - nginx = { enable = true; diff --git a/loadedskypotato/grocy.nix b/loadedskypotato/grocy.nix index 7a0aecb..1095ada 100644 --- a/loadedskypotato/grocy.nix +++ b/loadedskypotato/grocy.nix @@ -27,6 +27,6 @@ let cfg = config.cos.grocy; in enableACME = lib.mkForce false; forceSSL = lib.mkForce false; }; - services.cloudflared.tunnels."4fc85af1-38f7-4c96-856c-7c797c5e3bf8".ingress.${cfg.hostname} = "http://127.0.0.1:8303"; + services.cloudflared.tunnels.mine.ingress.${cfg.hostname} = "http://127.0.0.1:8303"; }; } diff --git a/loadedskypotato/trilium.nix b/loadedskypotato/trilium.nix index 8d715b7..9857588 100644 --- a/loadedskypotato/trilium.nix +++ b/loadedskypotato/trilium.nix @@ -27,6 +27,6 @@ let cfg = config.cos.trilium; in dataDir = cfg.dataDir; }; - services.cloudflared.tunnels."4fc85af1-38f7-4c96-856c-7c797c5e3bf8".ingress.${cfg.hostname} = "http://${config.services.trilium-server.host}:${builtins.toString cfg.port}"; + services.cloudflared.tunnels.mine.ingress.${cfg.hostname} = "http://${config.services.trilium-server.host}:${builtins.toString cfg.port}"; }; }