nixos-configs/nixosModules/desktop/environment/home/dev.nix
matt1432 2cfbfe9bef
All checks were successful
Discord / discord commits (push) Has been skipped
chore(hypr): allow deletion of build files in dev script
2024-11-10 17:18:19 -05:00

23 lines
734 B
Nix

{pkgs, ...}: {
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";
};
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
'')
];
};
# For accurate stack trace
_file = ./dev.nix;
}