dotfiles/modules/darwin/dotfiles.nix
2022-06-19 23:54:16 -04:00

29 lines
656 B
Nix

{ config, ... }: {
home-manager.users.${config.user} = {
programs.fish = {
shellAbbrs = {
nr = lib.mkForce "rebuild-darwin";
nro = lib.mkForce "rebuild-darwin offline";
};
functions = {
rebuild-darwin = {
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
'';
};
};
};
};
}