mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-26 18:44:52 +00:00
d021baa1bb
required because they don't share all attributes
34 lines
996 B
Nix
34 lines
996 B
Nix
{ config, pkgs, lib, ... }: {
|
|
|
|
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
|
|
|
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
|
|
'';
|
|
};
|
|
rebuild-home = lib.mkForce {
|
|
body = ''
|
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
|
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#macbook";
|
|
commandline --function execute
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
}
|