mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-09 20:03:56 +00:00
39 lines
857 B
Nix
39 lines
857 B
Nix
|
{ ... }: {
|
||
|
programs.fish.functions = {
|
||
|
clone.body = ''
|
||
|
echo "cd ~/git/"
|
||
|
cd $HOME/git
|
||
|
git clone $argv && cd $(basename $argv .git)
|
||
|
'';
|
||
|
# NIX
|
||
|
rebuild.body = ''
|
||
|
git add ~/.flake/.
|
||
|
for ARG in $argv
|
||
|
if [ $ARG = home ]
|
||
|
command home-manager switch --flake ~/.flake
|
||
|
return $status
|
||
|
else if [ $ARG = host ]
|
||
|
command sudo nixos-rebuild switch --flake ~/.flake
|
||
|
return $status
|
||
|
else
|
||
|
command echo "Select 'home' or 'host'"
|
||
|
end
|
||
|
end
|
||
|
'';
|
||
|
nrun.body = ''
|
||
|
nix run nixpkgs#$argv
|
||
|
'';
|
||
|
nshell.body = ''
|
||
|
nix shell nixpkgs#$argv
|
||
|
'';
|
||
|
nbuild.body = ''
|
||
|
nix build nixpkgs#$argv
|
||
|
'';
|
||
|
nclean.body = ''
|
||
|
nix-env --delete-generations old
|
||
|
nix-store --gc
|
||
|
nix-collect-garbage -d
|
||
|
'';
|
||
|
};
|
||
|
}
|