mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(nix): nix-darwin !
This commit is contained in:
parent
3b8c2068e9
commit
892ab68fbd
6 changed files with 110 additions and 25 deletions
|
|
@ -1,6 +1,4 @@
|
|||
{pkgs, ...}: let
|
||||
inherit (pkgs.stdenv) isLinux;
|
||||
|
||||
abbrs = {
|
||||
## Docker
|
||||
dc = "docker compose";
|
||||
|
|
@ -31,16 +29,16 @@
|
|||
xp = "cd ~/.dotfiles/.config/xmonad && $EDITOR xmonad.hs && prevd";
|
||||
|
||||
# Home-Manager / NixOS
|
||||
ns = "sudo nixos-rebuild switch -L --flake ~/.dotfiles/nix#carbon";
|
||||
hp = "cd ~/.dotfiles/.config/home-manager && $EDITOR flake.nix && prevd";
|
||||
hs = "home-manager switch -L --flake ~/.dotfiles/nix#bismuth";
|
||||
nsh = "nix-shell -p";
|
||||
};
|
||||
abbrsLinux = {
|
||||
ss = "sudo systemctl";
|
||||
se = "sudoedit";
|
||||
ns = "sudo nixos-rebuild switch -L --flake ~/.dotfiles/nix#carbon";
|
||||
};
|
||||
abbrsDarwin = {
|
||||
ns = "darwin-rebuild switch -L --flake ~/.dotfiles/nix#bismuth";
|
||||
};
|
||||
abbrsMacos = {};
|
||||
|
||||
aliases = {
|
||||
rm = "rm -i"; # idiot protection
|
||||
|
|
@ -53,7 +51,7 @@
|
|||
chown = "chown --preserve-root";
|
||||
sudoedit = "SUDO_EDITOR=(which nvim) sudoedit";
|
||||
};
|
||||
aliasesMacos = {
|
||||
aliasesDarwin = {
|
||||
hide_desktop = ''
|
||||
defaults write com.apple.finder CreateDesktop false; killall Finder
|
||||
'';
|
||||
|
|
@ -68,20 +66,22 @@
|
|||
'';
|
||||
};
|
||||
in {
|
||||
programs.fish = {
|
||||
programs.fish = let
|
||||
inherit (pkgs.stdenv) isLinux;
|
||||
in {
|
||||
shellAbbrs =
|
||||
abbrs
|
||||
// (
|
||||
if isLinux
|
||||
then abbrsLinux
|
||||
else abbrsMacos
|
||||
else abbrsDarwin
|
||||
);
|
||||
shellAliases =
|
||||
aliases
|
||||
// (
|
||||
if isLinux
|
||||
then aliasesLinux
|
||||
else aliasesMacos
|
||||
else aliasesDarwin
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue