feat: add scripts

This commit is contained in:
Nickolaj Jepsen 2026-01-20 01:02:28 +01:00
parent f1d4ea06fc
commit 4e8afa2dfc
3 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,25 @@
{
pkgs,
lib,
...
}: let
makeScript = {
path,
name ? lib.removeSuffix ".bash" (builtins.baseNameOf path),
runtimeInputs ? [],
}:
pkgs.writeShellApplication {
inherit name runtimeInputs;
text = builtins.readFile path;
};
in {
environment.systemPackages = [
(makeScript {
path = ./reboot-windows.bash;
runtimeInputs = with pkgs; [
jq
systemd # for bootctl and systemctl
];
})
];
}