action-flake-update: init
This commit is contained in:
parent
49f4ac4de7
commit
15982b6eeb
24
flake-parts/action-flake-update/default.nix
Normal file
24
flake-parts/action-flake-update/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
7
flake-parts/action-flake-update/script.sh
Normal file
7
flake-parts/action-flake-update/script.sh
Normal 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"
|
Loading…
Reference in New Issue
Block a user