Secrets, scripts, clean..

Former-commit-id: 5e98256a82
This commit is contained in:
Hadi
2024-03-15 21:26:34 +01:00
parent 1f6075cae7
commit 202ac3ca3b
27 changed files with 141 additions and 66 deletions

12
home/scripts/age.nix Normal file
View File

@@ -0,0 +1,12 @@
{ pkgs, config, ... }:
let
homedir = config.home.homeDirectory;
add-secrets = pkgs.writeShellScriptBin "add-secrets" ''
file=$1
pubkey=$(cat ~/nixy.key | grep "public key" | cut -d':' -f2 | sed 's/ //g')
${pkgs.age}/bin/age -r $pubkey -o ~/.config/nixos/home/secrets/$file.age -a $file
'';
in { home.packages = with pkgs; [ add-secrets ]; }