2022-10-31 14:45:51 -04:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-06-19 23:44:29 -04:00
|
|
|
|
2022-12-21 14:18:03 -07:00
|
|
|
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
2022-06-19 23:44:29 -04:00
|
|
|
|
|
|
|
programs.fish = {
|
|
|
|
shellAbbrs = {
|
2022-06-19 23:54:16 -04:00
|
|
|
nr = lib.mkForce "rebuild-darwin";
|
|
|
|
nro = lib.mkForce "rebuild-darwin offline";
|
2022-06-19 23:44:29 -04:00
|
|
|
};
|
|
|
|
functions = {
|
2022-06-19 23:54:16 -04:00
|
|
|
rebuild-darwin = {
|
2022-06-19 23:44:29 -04:00
|
|
|
body = ''
|
|
|
|
if test "$argv[1]" = "offline"
|
|
|
|
set option "--option substitute false"
|
|
|
|
end
|
2022-07-13 02:15:00 +00:00
|
|
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
2023-02-12 21:26:12 -05:00
|
|
|
commandline -r "darwin-rebuild switch $option --flake ${config.dotfilesPath}#lookingglass"
|
2022-07-05 19:16:08 -04:00
|
|
|
commandline --function execute
|
2022-06-19 23:44:29 -04:00
|
|
|
'';
|
|
|
|
};
|
2022-10-30 20:14:41 -04:00
|
|
|
rebuild-home = lib.mkForce {
|
|
|
|
body = ''
|
|
|
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
2023-02-12 21:26:12 -05:00
|
|
|
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass";
|
2022-10-30 20:14:41 -04:00
|
|
|
commandline --function execute
|
|
|
|
'';
|
|
|
|
};
|
2022-06-19 23:44:29 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|