mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 22:12:56 +00:00
29 lines
629 B
Nix
29 lines
629 B
Nix
|
{ config, ... }: {
|
||
|
|
||
|
home-manager.users.${config.user} = {
|
||
|
|
||
|
programs.fish = {
|
||
|
shellAbbrs = {
|
||
|
nr = "rebuild-darwin";
|
||
|
nro = "rebuild-darwin offline";
|
||
|
};
|
||
|
functions = {
|
||
|
rebuild-nixos = {
|
||
|
body = ''
|
||
|
if test "$argv[1]" = "offline"
|
||
|
set option "--option substitute false"
|
||
|
end
|
||
|
pushd ${config.dotfilesPath}
|
||
|
git add --all
|
||
|
popd
|
||
|
commandline -r darwin-rebuild switch $option --flake ${config.dotfilesPath}#macbook
|
||
|
commandline -f execute
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|