watch-ssh-keys turns secrets-service into authorized_keys files

This commit is contained in:
Daniel Barlow
2024-08-24 23:25:32 +01:00
parent f34abc85ae
commit 9828b007ae
3 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
{
fetchurl,
writeFennel,
fennel,
fennelrepl,
runCommand,
lua,
anoia,
linotify,
lualinux,
stdenv
}:
let name = "watch-ssh-keys";
in stdenv.mkDerivation {
inherit name;
src = ./.;
buildInputs = [lua];
nativeBuildInputs = [fennelrepl];
buildPhase = ''
fennelrepl --test ./watch-ssh-keys.fnl
cp -p ${writeFennel name {
packages = [
anoia
lualinux
linotify
fennel
];
macros = [
anoia.dev
];
mainFunction = "run";
} ./watch-ssh-keys.fnl } ${name}
'';
installPhase = ''
install -D ${name} $out/bin/${name}
'';
}