shell: add nom to monitor nixos-rebuild

This commit is contained in:
Moritz Böhme 2023-02-24 12:04:53 +01:00
parent a13aaa59cb
commit 8920ce2ec5
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -5,6 +5,16 @@
}: }:
with lib; with lib;
let
nom-system = pkgs.writeShellApplication {
name = "nom-system";
runtimeInputs = with pkgs; [ nix-output-monitor ];
text = ''
nom build --no-link "/home/moritz/.dotfiles#nixosConfigurations.$(hostname).config.system.build.toplevel"
'';
};
nom-system-command = command: "${nom-system}/bin/nom-system && ${command}";
in
{ {
users.users.moritz = { users.users.moritz = {
isNormalUser = true; isNormalUser = true;
@ -39,8 +49,8 @@ with lib;
rm = "rm -i"; rm = "rm -i";
mv = "mv -i"; mv = "mv -i";
nixos-switch = "sudo nixos-rebuild switch --flake ~/.dotfiles"; nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles";
nixos-boot = "sudo nixos-rebuild boot --flake ~/.dotfiles"; nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles";
nixos-update = "pushd ~/.dotfiles && nix flake update && popd"; nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent''; latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
@ -77,6 +87,7 @@ with lib;
nixpkgs-fmt nixpkgs-fmt
statix statix
manix manix
nix-output-monitor
# other # other
bat bat