1
Fork 0

Fix website dns stuff

This commit is contained in:
prescientmoon 2025-03-03 23:26:00 +01:00
parent 4a7a3496e3
commit 3bfa7ebba8
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
5 changed files with 59 additions and 7 deletions

View file

@ -41,6 +41,7 @@ in
"TXT" "TXT"
"CNAME" "CNAME"
"MX" "MX"
"ALIAS"
]; ];
description = "The type of the DNS record"; description = "The type of the DNS record";
}; };

View file

@ -611,6 +611,24 @@
} }
}, },
"flake-parts_3": { "flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
@ -631,7 +649,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_4": { "flake-parts_5": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
@ -1025,7 +1043,7 @@
}, },
"hercules-ci-effects": { "hercules-ci-effects": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_5",
"nixpkgs": [ "nixpkgs": [
"neovim-nightly-overlay", "neovim-nightly-overlay",
"nixpkgs" "nixpkgs"
@ -1290,10 +1308,31 @@
"type": "github" "type": "github"
} }
}, },
"moonythm": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1741037664,
"narHash": "sha256-1XnBCxVwI+ma9bMkcTxXvk2dp1EUeN0Wi4ey/K/fGCc=",
"ref": "refs/heads/main",
"rev": "ff605ada27e33b6150af94f3d402afe69e67d3b9",
"revCount": 23,
"type": "git",
"url": "ssh://forgejo@ssh.git.moonythm.dev/prescientmoon/moonythm.git"
},
"original": {
"type": "git",
"url": "ssh://forgejo@ssh.git.moonythm.dev/prescientmoon/moonythm.git"
}
},
"neovim-nightly-overlay": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_4",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects", "hercules-ci-effects": "hercules-ci-effects",
"neovim-src": "neovim-src", "neovim-src": "neovim-src",
@ -1404,6 +1443,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1718811006, "lastModified": 1718811006,
@ -1887,6 +1938,7 @@
"intray": "intray", "intray": "intray",
"korora": "korora", "korora": "korora",
"miros": "miros", "miros": "miros",
"moonythm": "moonythm",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",

View file

@ -29,7 +29,7 @@
./services/jellyfin.nix ./services/jellyfin.nix
./services/jupyter.nix ./services/jupyter.nix
./services/microbin.nix ./services/microbin.nix
./services/moonythm.nix.nix ./services/moonythm.nix
./services/pounce.nix ./services/pounce.nix
./services/prometheus.nix ./services/prometheus.nix
./services/prometheus.nix ./services/prometheus.nix

View file

@ -9,7 +9,6 @@ in
{ {
satellite.cloudflared.at."".port = 8080; satellite.cloudflared.at."".port = 8080;
satellite.nginx.at."".files = dir;
services.nginx.virtualHosts."".extraConfig = '' services.nginx.virtualHosts."".extraConfig = ''
root ${dir}; root ${dir};
error_page 404 /404.html; error_page 404 /404.html;

View file

@ -40,7 +40,7 @@ in
host = lib.mkOption { host = lib.mkOption {
description = "Host to direct traffic from"; description = "Host to direct traffic from";
type = lib.types.str; type = lib.types.str;
default = "${config.subdomain}.${cfg.domain}"; default = if config.subdomain == "" then cfg.domain else "${config.subdomain}.${cfg.domain}";
}; };
protocol = lib.mkOption { protocol = lib.mkOption {
@ -81,7 +81,7 @@ in
mkDnsRecord = mkDnsRecord =
{ subdomain, ... }: { subdomain, ... }:
{ {
type = "CNAME"; type = if subdomain == "" then "ALIAS" else "CNAME";
at = subdomain; at = subdomain;
zone = cfg.domain; zone = cfg.domain;
value = "${cfg.tunnel}.cfargotunnel.com."; value = "${cfg.tunnel}.cfargotunnel.com.";