diff --git a/nixosModules/desktop/environment/home/dev.nix b/nixosModules/desktop/environment/home/dev.nix index 366bf8d1..5f651f2a 100644 --- a/nixosModules/desktop/environment/home/dev.nix +++ b/nixosModules/desktop/environment/home/dev.nix @@ -2,19 +2,23 @@ config = { programs.bash.shellAliases = { # https://wiki.hyprland.org/Contributing-and-Debugging/#lsp-and-formatting - "mkCMakeFiles" = "cmake -S . -B build/ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"; + "mkCMakeFiles" = "${pkgs.cmake}/bin/cmake -S . -B build/ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"; }; home.packages = [ - (pkgs.writeShellScriptBin "testChanges" '' - chmod +w -fR /home/matt/git/$1/$2/{.cache,build} - rm -r /home/matt/git/$1/$2/{.cache,build} - cd /home/matt/.nix || return - nix flake update "$1" - nh os switch - cd "/home/matt/git/$1/$2" || return - nix develop /home/matt/git/$1 -c cmake -S . -B build/ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - '') + (pkgs.writeShellApplication { + name = "testChanges"; + runtimeInputs = [pkgs.cmake]; + text = '' + chmod +w -fR /home/matt/git/"$1/''${2:-"."}"/{.cache,build} + rm -r /home/matt/git/"$1/''${2:-"."}"/{.cache,build} + cd /home/matt/.nix || return + nix flake update "$1" + nh os switch + cd "/home/matt/git/$1/''${2:-"."}" || return + nix develop "/home/matt/git/$1" -c cmake -S . -B build/ -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + ''; + }) ]; };