Add nix-output-monitor
Use nix-output-monitor for things like my rebuilds
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# vim: set ft=python :
|
||||
# vim: set ft=xonsh :
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
from tempfile import NamedTemporaryFile, TemporaryDirectory
|
||||
|
||||
def bw_unlock():
|
||||
"""Unlocks the BitWarden CLI and adds the resulting session code to the
|
||||
@@ -59,10 +59,18 @@ aliases['aws_creds'] = _aws_creds
|
||||
|
||||
def _rebuild(args):
|
||||
system = uname()
|
||||
hostname = system.nodename
|
||||
if system.sysname == 'Darwin':
|
||||
darwin-rebuild --flake ~/.config/darwin switch
|
||||
else:
|
||||
sudo nixos-rebuild switch
|
||||
with TemporaryDirectory() as td:
|
||||
pushd @(td)
|
||||
import platform
|
||||
nom build f"/etc/nixos#nixosConfigurations.{hostname}.config.build.toplevel"
|
||||
if g`result`:
|
||||
nvd diff /run/current-system result
|
||||
sudo result/bin/switch-to-configuration switch
|
||||
popd
|
||||
aliases['rebuild'] = _rebuild
|
||||
|
||||
def _yaml2json(args, stdin=None, stdout=None):
|
||||
|
||||
@@ -93,6 +93,7 @@ in
|
||||
iperf
|
||||
killall
|
||||
nano
|
||||
nix-output-monitor
|
||||
pciutils
|
||||
pwgen
|
||||
unzip
|
||||
|
||||
Reference in New Issue
Block a user