diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 2f971c6..e40adbd 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -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