Compare commits
1 Commits
1198be4e05
...
9a7e600e7b
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a7e600e7b |
@@ -1,3 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../../module/agenix.nix ];
|
||||
|
||||
# Add agenix to system packages
|
||||
environment.systemPackages = [ pkgs.agenix ];
|
||||
}
|
||||
|
||||
@@ -297,9 +297,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Add agenix to system packages
|
||||
environment.systemPackages = [ pkgs.agenix ];
|
||||
|
||||
# Create a new directory full of secrets for symlinking (this helps
|
||||
# ensure removed secrets are actually removed, or at least become
|
||||
# invalid symlinks).
|
||||
|
||||
@@ -27,7 +27,6 @@ stdenv.mkDerivation rec {
|
||||
doInstallCheck = true;
|
||||
installCheckInputs = [ shellcheck ];
|
||||
postInstallCheck = ''
|
||||
set -x
|
||||
shellcheck ${bin}
|
||||
${bin} -h | grep ${version}
|
||||
|
||||
@@ -57,7 +56,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
cd $HOME/secrets
|
||||
test $(${bin} -d secret1.age) = "hello"
|
||||
set +x
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
23
pkgs/agenix/update.sh
Executable file
23
pkgs/agenix/update.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# All operations are done relative to root
|
||||
GITROOT=$(git rev-parse --show-toplevel)
|
||||
cd "$GITROOT"
|
||||
|
||||
REVISION=${1:-main}
|
||||
|
||||
TMPCLONE=$(mktemp -d)
|
||||
trap "rm -rf ${TMPCLONE}" EXIT
|
||||
|
||||
git clone https://github.com/ryantm/agenix.git --revision="$REVISION" "$TMPCLONE" --depth=1
|
||||
|
||||
cp "${TMPCLONE}/pkgs/agenix.sh" pkgs/agenix/agenix.sh
|
||||
cp "${TMPCLONE}/pkgs/agenix.nix" pkgs/agenix/default.nix
|
||||
sed -i 's#../example#./example#' pkgs/agenix/default.nix
|
||||
|
||||
cp "${TMPCLONE}/example/"* pkgs/agenix/example/
|
||||
cp "${TMPCLONE}/example_keys/"* pkgs/agenix/example_keys/
|
||||
|
||||
cp "${TMPCLONE}/modules/age.nix" m/module/agenix.nix
|
||||
Reference in New Issue
Block a user