server down migrate website

This commit is contained in:
cy 2024-12-15 15:28:28 -05:00
parent 996687f7a4
commit 558d518286
5 changed files with 34 additions and 37 deletions

23
flake.lock generated
View file

@ -1,21 +1,5 @@
{
"nodes": {
"chromium": {
"locked": {
"lastModified": 1734083684,
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -38,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733940404,
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
"lastModified": 1734119587,
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
"type": "github"
},
"original": {
@ -54,7 +38,6 @@
},
"root": {
"inputs": {
"chromium": "chromium",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"

View file

@ -11,7 +11,6 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
chromium.url = "github:NixOS/nixpkgs/314e12ba369ccdb9b352a4db26ff419f7c49fa84";
};
outputs = {

View file

@ -57,8 +57,7 @@
home.packages = with pkgs; [
firefox
inputs.chromium.legacyPackages.${system}.ungoogled-chromium
# ungoogled-chromium
ungoogled-chromium
librewolf
bitwarden-desktop
bitwarden-cli

8
hosts/ytnix/Caddyfile Normal file
View file

@ -0,0 +1,8 @@
cything.io {
uri strip_prefix /blog
reverse_proxy localhost:8084
}
www.cything.io {
redir https://cything.io{uri} permanent
}

View file

@ -51,10 +51,12 @@
dns = "none";
wifi.backend = "iwd";
};
nameservers = ["31.59.129.225" "2a0f:85c1:840:2bfb::1"];
# nameservers = ["31.59.129.225" "2a0f:85c1:840:2bfb::1"];
nameservers = ["1.1.1.1"];
resolvconf.enable = true;
firewall = {
allowedUDPPorts = [51820]; # for wireguard
allowedUDPPorts = [51820 443]; # for wireguard
allowedTCPPorts = [80 443];
trustedInterfaces = ["wg0"];
};
};
@ -265,17 +267,23 @@
services.ollama.enable = true;
# wireguard setup
networking.wg-quick.interfaces.wg0 = {
address = ["10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64"];
privateKeyFile = "/run/secrets/wireguard/private";
peers = [
{
publicKey = "a16/F/wP7HQIUtFywebqPSXQAktPsLgsMLH9ZfevMy0=";
allowedIPs = ["0.0.0.0/0" "::/0"];
endpoint = "31.59.129.225:51820";
persistentKeepalive = 25;
presharedKeyFile = "/run/secrets/wireguard/psk";
}
];
# networking.wg-quick.interfaces.wg0 = {
# address = ["10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64"];
# privateKeyFile = "/run/secrets/wireguard/private";
# peers = [
# {
# publicKey = "a16/F/wP7HQIUtFywebqPSXQAktPsLgsMLH9ZfevMy0=";
# allowedIPs = ["0.0.0.0/0" "::/0"];
# endpoint = "31.59.129.225:51820";
# persistentKeepalive = 25;
# presharedKeyFile = "/run/secrets/wireguard/psk";
# }
# ];
# };
services.caddy = {
enable = true;
configFile = ./Caddyfile;
logFormat = lib.mkForce "level INFO";
};
}