1 Commits

Author SHA1 Message Date
1198be4e05 Include agenix module and package directly
All checks were successful
CI / build:cross (pull_request) Successful in 6s
CI / build:all (pull_request) Successful in 10m38s
Avoids adding an extra flake input only to fetch a single module and
package.
2025-10-13 13:58:07 +02:00
4 changed files with 5 additions and 28 deletions

View File

@@ -1,8 +1,3 @@
{ pkgs, ... }:
{
imports = [ ../../module/agenix.nix ];
# Add agenix to system packages
environment.systemPackages = [ pkgs.agenix ];
}

View File

@@ -297,6 +297,9 @@ 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).

View File

@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
doInstallCheck = true;
installCheckInputs = [ shellcheck ];
postInstallCheck = ''
set -x
shellcheck ${bin}
${bin} -h | grep ${version}
@@ -56,6 +57,7 @@ stdenv.mkDerivation rec {
cd $HOME/secrets
test $(${bin} -d secret1.age) = "hello"
set +x
'';
installPhase = ''

View File

@@ -1,23 +0,0 @@
#!/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