This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / keys / flake-module.nix
844 B 38 lines
1{ lib, ... }: 2let 3 # Helper to read all files from a subdirectory 4 readKeysFromDir = 5 baseDir: subDir: 6 let 7 dir = baseDir + "/${subDir}"; 8 in 9 if builtins.pathExists dir then 10 lib.mapAttrs' ( 11 name: _: 12 let 13 # Remove everything after the first dot 14 keyName = builtins.head (lib.splitString "." name); 15 in 16 lib.nameValuePair keyName (builtins.readFile (dir + "/${name}")) 17 ) (builtins.readDir dir) 18 else 19 { }; 20 21in 22{ 23 flake.keys = { 24 # SSH keys (any format: rsa, ed25519, ecdsa) 25 ssh = readKeysFromDir ./. "ssh"; 26 27 # PGP/GPG keys - define directly with metadata 28 pgp = { 29 yubi = { 30 key = ./pgp/yubi.pgp; 31 id = "DBCD757846069B392EA9401D6657BE8A8D1EE807"; 32 }; 33 }; 34 35 # Age keys 36 age = readKeysFromDir ./. "age"; 37 }; 38}