mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-28 02:14:54 +00:00
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
|
|
home-manager.users.${config.user} = lib.mkIf pkgs.stdenv.isDarwin {
|
|
|
|
programs.fish = {
|
|
shellAbbrs = {
|
|
nr = {
|
|
function = lib.mkForce "rebuild-darwin";
|
|
};
|
|
nro = {
|
|
function = lib.mkForce "rebuild-darwin-offline";
|
|
};
|
|
};
|
|
functions = {
|
|
rebuild-darwin = {
|
|
body = ''
|
|
git -C ${config.dotfilesPath} add --intent-to-add --all
|
|
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"
|
|
'';
|
|
};
|
|
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";
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|