dotfiles/modules/darwin/nixpkgs.nix

34 lines
966 B
Nix
Raw Permalink Normal View History

2022-10-31 18:45:51 +00:00
{ config, pkgs, lib, ... }: {
2022-06-20 03:44:29 +00:00
home-manager.users.${config.user} = {
programs.fish = {
shellAbbrs = {
2022-06-20 03:54:16 +00:00
nr = lib.mkForce "rebuild-darwin";
nro = lib.mkForce "rebuild-darwin offline";
2022-06-20 03:44:29 +00:00
};
functions = {
2022-06-20 03:54:16 +00:00
rebuild-darwin = {
2022-06-20 03:44:29 +00: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
2022-07-05 23:40:54 +00:00
commandline -r "darwin-rebuild switch $option --flake ${config.dotfilesPath}#macbook"
commandline --function execute
2022-06-20 03:44:29 +00:00
'';
};
rebuild-home = lib.mkForce {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
2022-11-03 15:25:58 +00:00
commandline -r "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#macbook";
commandline --function execute
'';
};
2022-06-20 03:44:29 +00:00
};
};
};
}