mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-30 02:15:38 +00:00
27 lines
653 B
Nix
27 lines
653 B
Nix
{ config, lib, ... }: {
|
|
|
|
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
|
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
|
commandline -r "darwin-rebuild switch $option --flake ${config.dotfilesPath}#macbook"
|
|
commandline --function execute
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
}
|