dotfiles/modules/darwin/nixpkgs.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2024-04-20 13:42:06 +00:00
{
config,
pkgs,
lib,
...
}:
{
2022-06-20 03:44:29 +00:00
2022-12-21 21:18:03 +00:00
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
2022-06-20 03:44:29 +00:00
programs.fish = {
shellAbbrs = {
nr = {
function = lib.mkForce "rebuild-darwin";
};
2024-12-16 18:43:54 +00:00
nro = {
function = 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 = ''
2022-07-13 02:15:00 +00:00
git -C ${config.dotfilesPath} add --intent-to-add --all
2024-12-16 18:43:54 +00:00
echo "darwin-rebuild switch --flake ${config.dotfilesPath}#lookingglass"
'';
};
rebuild-darwin-offline = {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
echo "darwin-rebuild switch --option substitute false --flake ${config.dotfilesPath}#lookingglass"
2022-06-20 03:44:29 +00:00
'';
};
rebuild-home = lib.mkForce {
body = ''
git -C ${config.dotfilesPath} add --intent-to-add --all
echo "${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#lookingglass";
'';
};
2022-06-20 03:44:29 +00:00
};
};
};
}