about summary refs log tree commit diff stats
path: root/sys/secrets/update.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-20 16:10:21 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-20 16:14:26 +0200
commit368cb6b0d25db2ae23be42ad51584de059997e51 (patch)
tree3282e45d3ebced63c8498a47e83a255c35de620b /sys/secrets/update.sh
parentrefactor(hm): Rename to `modules/home` (diff)
downloadnixos-config-368cb6b0d25db2ae23be42ad51584de059997e51.zip
refactor(sys): Modularize and move to `modules/system` or `pkgs`
Diffstat (limited to 'sys/secrets/update.sh')
-rwxr-xr-xsys/secrets/update.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/sys/secrets/update.sh b/sys/secrets/update.sh
deleted file mode 100755
index edc4ae8a..00000000
--- a/sys/secrets/update.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env nix
-#! nix shell nixpkgs#age nixpkgs#jq nixpkgs#dash --command dash
-# shellcheck shell=dash
-
-cleanup() {
-    [ "$key_file" ] && rm "$key_file"
-}
-trap cleanup EXIT
-
-update_lf_cd_paths() {
-    echo "Starting to update the lf/cd_paths file.."
-
-    cd "$(git rev-parse --show-toplevel)/sys/secrets" || {
-        echo "A secrets dir does not exist! (This is most likely a bug)"
-        exit 1
-    }
-
-    key_file="$(mktemp)"
-
-    nix eval -f ./secrets.nix --json | jq --raw-output '.["lf/cd_paths"].publicKeys | join("\n")' >"$key_file"
-
-    # `lf-make-map` is provided by the dev shell
-    {
-        lf-make-map --quiet --depth 4 visualize ~/media ~/repos ~/school | sed 's|\(.*\)|# \1|'
-        lf-make-map --quiet --depth 4 generate ~/media ~/repos ~/school
-    } | age --recipients-file "$key_file" --encrypt --armor --output ./lf/cd_paths
-
-    echo "Finished updating the lf/cd_paths file.."
-}
-
-main() {
-    update_lf_cd_paths
-}
-
-main
-
-# vim: ft=sh