diff --git a/configuration.nix b/configuration.nix index 52ab306..8519d3a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -85,7 +85,6 @@ let ssh_pubkeys = { daily = 7; autosnap = true; autoprune = true; - post_snapshot_script = "/var/src/snaplink"; }; datasets."rpool/nixos/home".use_template = [ "prod" ]; datasets."rpool/nixos/var/lib".use_template = [ "prod" ]; diff --git a/krops.nix b/krops.nix index 6a930b6..dc60e1b 100644 --- a/krops.nix +++ b/krops.nix @@ -9,9 +9,6 @@ let { nixpkgs.symlink = "/root/.nix-defexpr/channels/nixos"; nixos-config.file = toString ./configuration.nix; - - # TODO: how to make this nix-managed? - snaplink.file = toString ./scripts/snaplink; secrets.pass = { dir = toString ./secrets; name = "hel1-a"; diff --git a/scripts/snaplink b/scripts/snaplink deleted file mode 100755 index 1250dab..0000000 --- a/scripts/snaplink +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -_fatal() { >&2 echo "ERROR: $*"; exit 1; } -mountpoint=$(zfs list -H -t filesystem -o mountpoint "$SANOID_TARGET") -[[ -n "$mountpoint" ]] || _fatal "expected non-empty $SANOID_TARGET" -snap_path="$mountpoint/.zfs/snapshot/$SANOID_SNAPNAME" -[[ -d "$snap_path" ]] || _fatal "expected to find a directory in $snap_path" -link_path="$mountpoint/.snapshot-latest" -ln -sf "$snap_path" "$link_path" ->&2 printf "successfully created %s -> %s\n" "$link_path" "$snap_path"