nixos

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 9eaca13622c946a1bebbd42ca7c49fa2c33d137e
parent ebceafcf8f89f81f83a398eef6be07a7d1abf80c
Author: Toni Brown <me@tb148.net>
Date:   Wed, 25 Feb 2026 20:11:20 +0800

setup btrbk

Diffstat:
Mconfiguration.nix | 24++++++++++++++++++++++++
Mmihomo.nix | 2+-
2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/configuration.nix b/configuration.nix @@ -147,6 +147,30 @@ catppuccin.accent = "mauve"; xdg.icons.fallbackCursorThemes = ["catppuccin-mocha-mauve-cursors"]; + services.btrbk.instances.btrbk = { + settings = { + ssh_identity = "/etc/btrbk/id_ed25519"; + ssh_user = "btrbk"; + backend_remote = "btrfs-progs-sudo"; + # stream_compress = "zstd"; + + subvolume."[2a01:4f8:1c19:8cba::1]:/var/lib" = { + snapshot_name = "hetznerion"; + + snapshot_dir = "/var/lib/btrbk/snapshots"; + snapshot_preserve_min = "latest"; + snapshot_preserve = "7d *w"; + + target = "/var/lib/btrbk/backups"; + target_preserve_min = "latest"; + target_preserve = "7d *w"; + }; + }; + }; + systemd.tmpfiles.rules = [ + "d /var/lib/btrbk/backups 0750 btrbk btrbk" + ]; + services.searx = { enable = true; environmentFile = "${config.users.users.tb148.home}/.searxng.env"; diff --git a/mihomo.nix b/mihomo.nix @@ -196,7 +196,7 @@ rules = [ "RULE-SET,private_domain,直连,no-resolve" "RULE-SET,private_ip,直连,no-resolve" - "DST-PORT,22,直连" + # "DST-PORT,22,直连" "RULE-SET,cn_domain,国内" "RULE-SET,cn_ip,国内" "RULE-SET,gfw,代理"