Secrets, scripts, clean..

Former-commit-id: 5e98256a82
This commit is contained in:
Hadi
2024-03-15 21:26:34 +01:00
parent f3dcd108db
commit c6c053585c
23 changed files with 141 additions and 66 deletions
+12
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 ]; }