host my website on hopper

This commit is contained in:
xunuwu 2025-05-20 19:45:23 +02:00
parent 59af65fc9b
commit 05a8ed91cb
3 changed files with 69 additions and 1 deletions

57
flake.lock generated
View file

@ -383,6 +383,24 @@
}
},
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_7": {
"inputs": {
"nixpkgs-lib": [
"stylix",
@ -821,6 +839,21 @@
"type": "github"
}
},
"nixpkgs-lib_3": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1747542820,
@ -900,6 +933,27 @@
"type": "github"
}
},
"own-website": {
"inputs": {
"flake-parts": "flake-parts_6",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747761237,
"narHash": "sha256-2cl+riOIb1vOdVLgNJuILjfMXXLHX9KvhefTVU8kvBA=",
"owner": "xunuwu",
"repo": "xunuwu.xyz",
"rev": "b5e68df87795c7010d129dde90ce3d3ee7bc6959",
"type": "github"
},
"original": {
"owner": "xunuwu",
"repo": "xunuwu.xyz",
"type": "github"
}
},
"pyproject-build-systems": {
"inputs": {
"nixpkgs": [
@ -986,6 +1040,7 @@
"nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_2",
"nvim-config": "nvim-config",
"own-website": "own-website",
"roblox-playtime": "roblox-playtime",
"sobercookie": "sobercookie",
"sops-nix": "sops-nix",
@ -1043,7 +1098,7 @@
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_6",
"flake-parts": "flake-parts_7",
"git-hooks": "git-hooks_2",
"gnome-shell": "gnome-shell",
"home-manager": [

View file

@ -78,6 +78,9 @@
roblox-playtime.url = "github:xunuwu/roblox-playtime";
roblox-playtime.inputs.nixpkgs.follows = "nixpkgs";
own-website.url = "github:xunuwu/xunuwu.xyz";
own-website.inputs.nixpkgs.follows = "nixpkgs";
cloudflare-ipv4.url = "https://www.cloudflare.com/ips-v4";
cloudflare-ipv4.flake = false;

View file

@ -2,6 +2,7 @@
config,
vars,
inputs,
pkgs,
...
}: let
inherit (vars) domain;
@ -51,6 +52,15 @@ in {
dash = mkPrivateEntry "dash" "${bridge}:${toString config.services.homepage-dashboard.listenPort}";
absPriv = mkPrivateEntry "abs" "${bridge}:${toString config.services.audiobookshelf.port}";
base = {
useACMEHost = domain;
hostName = "${domain}:${toString caddyPort}";
extraConfig = ''
root * ${inputs.own-website.packages.${pkgs.system}.default}
file_server
'';
};
other = {
useACMEHost = domain;
hostName = ":${toString caddyPort}";