patos/modules/utils.nix
Daniel Lundin 3f347427ed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Add experimental installer script
2024-10-23 22:06:39 +02:00

29 lines
542 B
Nix

{
config,
pkgs,
lib,
...
}:
let
script = pkgs.writeShellScriptBin "patos-upgrade.sh" ''
systemd-sysupdate --verify=no
systemd-sysupdate --verify=no update --reboot
'';
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
{
environment.systemPackages = [
# pkgs.ncdu
patos-install
script
];
}