From 32e346be56ca66e98d03ed42eb153fced014c955 Mon Sep 17 00:00:00 2001 From: oddlama Date: Wed, 15 Mar 2023 01:54:02 +0100 Subject: [PATCH] docs: show how to setup nix-plugins --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 992dca9..86e220e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ -Infrastructure. +This is my personal nix config. -Encrypt secrets using `rage -e -R secrets/recipients.txt plaintext > secret.age`. +- Secrets can be created/edited by running `nix run .#edit-secret some/secret.age` +- Secrets can be rekeyed by running `nix run .#rekey` (you will be prompted to do so in an error message if neccessary) + +To be able to decrypt the repository-wide secrets transparently on a host that +is _not_ managed by this config, you will need to (be me and) run +all commands using these extra parameters, or permanently add the following the system's `nix.conf`: + +1. Get nix-plugins: `NIX_PLUGINS=$(nix build --print-out-paths --no-link nixpkgs#nix-plugins)` +2. Run all commands with `--option plugin-files "$NIX_PLUGINS"/lib/nix/plugins --option extra-builtins-file ./nix/extra-builtins.nix` + or permantently + + ```nix + plugin-files = /lib/nix/plugins + extra-builtins-file = /path/to/nix-config/nix/extra-builtins.nix + ```