action-flake-update: init

This commit is contained in:
DavHau 2023-07-26 18:30:06 +02:00
parent 49f4ac4de7
commit 15982b6eeb
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,24 @@
{
perSystem =
{ config
, pkgs
, ...
}:
let
name = builtins.baseNameOf ./.;
script = config.writers.writePureShellScriptBin
name
[
pkgs.bash
pkgs.coreutils
pkgs.git
pkgs.nix
]
''
bash ${./script.sh}
'';
in
{
packages.${name} = script;
};
}

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
COMMIT_MSG="update flake lock - $(date --iso-8601=minutes)"
nix --experimental-features "nix-command flakes" \
flake update --commit-lock-file --commit-lockfile-summary "$COMMIT_MSG"