patos/modules/utils.nix

30 lines
542 B
Nix
Raw Normal View History

{
config,
pkgs,
lib,
...
}:
let
script = pkgs.writeShellScriptBin "patos-upgrade.sh" ''
systemd-sysupdate --verify=no
systemd-sysupdate --verify=no update --reboot
'';
2024-10-21 18:44:47 +02:00
patos-install = pkgs.writeShellApplication {
name = "patos-install";
text = ''
set -xeuo pipefail
curl -s https://images.dl.patagia.dev/patos/patos_0.0.1.raw.zst |
zstdcat |
dd of=/dev/sdb status=progress bs=4M
'';
};
in
{
2024-10-13 23:18:17 +02:00
environment.systemPackages = [
# pkgs.ncdu
2024-10-21 18:44:47 +02:00
patos-install
2024-10-13 23:18:17 +02:00
script
];
}