shell: add nom to monitor nixos-rebuild

dev-docs
Moritz Böhme 2023-02-24 12:04:53 +01:00
parent a13aaa59cb
commit 8920ce2ec5
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 13 additions and 2 deletions

View File

@ -5,6 +5,16 @@
}:
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 = {
isNormalUser = true;
@ -39,8 +49,8 @@ with lib;
rm = "rm -i";
mv = "mv -i";
nixos-switch = "sudo nixos-rebuild switch --flake ~/.dotfiles";
nixos-boot = "sudo nixos-rebuild boot --flake ~/.dotfiles";
nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles";
nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles";
nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
@ -77,6 +87,7 @@ with lib;
nixpkgs-fmt
statix
manix
nix-output-monitor
# other
bat