watch-ssh-keys turns secrets-service into authorized_keys files
This commit is contained in:
40
pkgs/watch-ssh-keys/default.nix
Normal file
40
pkgs/watch-ssh-keys/default.nix
Normal 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}
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user