Compare commits
No commits in common. "9f53c984f4ba97a6442d05abc6f57591c6dd1261" and "e863aea052649c39f96d6b9cdec2a60c120bf5d5" have entirely different histories.
9f53c984f4
...
e863aea052
4 changed files with 0 additions and 35 deletions
|
|
@ -1,19 +0,0 @@
|
||||||
{...}: {
|
|
||||||
services.borgbackup = {
|
|
||||||
repos = {
|
|
||||||
backups = {
|
|
||||||
allowSubRepos = true;
|
|
||||||
authorizedKeys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEMtbHUcYanH/guWaKNjGr/IGa8gvI/xRTcNAI9yXhnK BorgBackup backups key"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.openssh.settings = {
|
|
||||||
AllowUsers = [
|
|
||||||
"borg@*.tailscale"
|
|
||||||
"borg@192.168.1.0/24"
|
|
||||||
"borg@localhost"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -11,19 +11,6 @@
|
||||||
file_server browse
|
file_server browse
|
||||||
root * /srv/dl/
|
root * /srv/dl/
|
||||||
'';
|
'';
|
||||||
script = pkgs.writeShellApplication {
|
|
||||||
name = "wait-for-tailscale-ip";
|
|
||||||
runtimeInputs = [pkgs.iproute2];
|
|
||||||
text = ''
|
|
||||||
# Based on https://github.com/tailscale/tailscale/issues/11504#issuecomment-2113331262
|
|
||||||
echo Waiting for tailscale0 to get an IP adress..
|
|
||||||
for i in {1..300}; do
|
|
||||||
if ip addr show dev tailscale0 | grep -q 'inet '; then break; fi
|
|
||||||
echo "Waiting $i/240 seconds"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -84,7 +71,6 @@ in {
|
||||||
# in too little time
|
# in too little time
|
||||||
services.caddy.serviceConfig.RestartSec = lib.mkForce "120s";
|
services.caddy.serviceConfig.RestartSec = lib.mkForce "120s";
|
||||||
services.caddy.unitConfig.StartLimitBurst = lib.mkForce "infinity";
|
services.caddy.unitConfig.StartLimitBurst = lib.mkForce "infinity";
|
||||||
services.caddy.preStart = "${script}/bin/wait-for-tailscale-ip";
|
|
||||||
};
|
};
|
||||||
programs.rust-motd.settings.service_status.Caddy = "caddy";
|
programs.rust-motd.settings.service_status.Caddy = "caddy";
|
||||||
networking.firewall.allowedTCPPorts = [443 80];
|
networking.firewall.allowedTCPPorts = [443 80];
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
./headscale.nix
|
./headscale.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./rust_motd.nix
|
./rust_motd.nix
|
||||||
./borg.nix
|
|
||||||
./adguard.nix
|
./adguard.nix
|
||||||
./grafana.nix
|
./grafana.nix
|
||||||
./prometheus.nix
|
./prometheus.nix
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ in {
|
||||||
UseDns = true;
|
UseDns = true;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
AllowUsers = ["toast"];
|
|
||||||
};
|
};
|
||||||
# The forgejo module is fucky so I can't set this with the nixos option
|
# The forgejo module is fucky so I can't set this with the nixos option
|
||||||
# https://github.com/NixOS/nixpkgs/issues/306205
|
# https://github.com/NixOS/nixpkgs/issues/306205
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue