mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
nixos-check-reboot script
This commit is contained in:
parent
6dfd986018
commit
9606e22fb9
1 changed files with 7 additions and 0 deletions
|
@ -54,6 +54,13 @@ in
|
||||||
exec nix shell 'nixpkgs/nixos-unstable#python3.pkgs.pip' --command pip install --user -UI pip setuptools
|
exec nix shell 'nixpkgs/nixos-unstable#python3.pkgs.pip' --command pip install --user -UI pip setuptools
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
(writeShellScriptBin "nixos-check-reboot" ''
|
||||||
|
set -e
|
||||||
|
booted="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})"
|
||||||
|
built="$(readlink /nix/var/nix/profiles/system/{initrd,kernel,kernel-modules})"
|
||||||
|
[ "$booted" = "$built" ]
|
||||||
|
'')
|
||||||
|
|
||||||
(writeScriptBin "zfsram" ''
|
(writeScriptBin "zfsram" ''
|
||||||
#!${pkgs.python3}/bin/python
|
#!${pkgs.python3}/bin/python
|
||||||
for ln in open('/proc/spl/kstat/zfs/arcstats').readlines():
|
for ln in open('/proc/spl/kstat/zfs/arcstats').readlines():
|
||||||
|
|
Loading…
Reference in a new issue