fix ls on macos and other nav, passwdless lf
This commit is contained in:
@@ -125,6 +125,10 @@
|
|||||||
command = "/run/current-system/sw/bin/rsync";
|
command = "/run/current-system/sw/bin/rsync";
|
||||||
options = ["NOPASSWD"];
|
options = ["NOPASSWD"];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
command = "/etc/profiles/per-user/blake/bin/lf";
|
||||||
|
options = ["NOPASSWD"];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ set ignorecase true
|
|||||||
|
|
||||||
# shortcuts
|
# shortcuts
|
||||||
map gb cd /holocron
|
map gb cd /holocron
|
||||||
map gz cd %{{ [ -d /holocron ] && printf /holocron || printf /media/holocron }}
|
|
||||||
map gn cd ~/.nix
|
map gn cd ~/.nix
|
||||||
map gc cd ~/.config
|
map gc cd ~/.config
|
||||||
|
map gv cd /var/lib
|
||||||
|
|
||||||
# navigation
|
# navigation
|
||||||
map [ half-up
|
map [ half-up
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
program = "zsh";
|
program = "zsh";
|
||||||
cfg = config.dots.${program};
|
cfg = config.dots.${program};
|
||||||
home_dir = config.home.homeDirectory;
|
home_dir = config.home.homeDirectory;
|
||||||
|
isDarwin = pkgs.stdenv.isDarwin;
|
||||||
#sec = sops.secrets;
|
#sec = sops.secrets;
|
||||||
in {
|
in {
|
||||||
options.dots.${program} = {
|
options.dots.${program} = {
|
||||||
@@ -23,7 +24,6 @@ in {
|
|||||||
programs.${program} = {
|
programs.${program} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dotDir = "${config.xdg.configHome}/zsh";
|
dotDir = "${config.xdg.configHome}/zsh";
|
||||||
#dotDir = ".config/zsh";
|
|
||||||
autocd = true;
|
autocd = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
|
||||||
@@ -41,18 +41,20 @@ in {
|
|||||||
path = "$XDG_STATE_HOME/zsh/history";
|
path = "$XDG_STATE_HOME/zsh/history";
|
||||||
};
|
};
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases =
|
||||||
|
{
|
||||||
# --- zsh ---
|
# --- zsh ---
|
||||||
src = "source ${home_dir}/.config/zsh/.zshrc";
|
src = "source ${home_dir}/.config/zsh/.zshrc";
|
||||||
|
|
||||||
# --- config editing ---
|
# --- config editing ---
|
||||||
cfl = "nvim /home/blake/.nix/users/blake/dots/core/lf/lfrc";
|
cfl = "nvim /home/blake/.nix/users/blake/dots/core/lf/lfrc";
|
||||||
cfz = "nvim /home/blake/.nix/users/blake/dots/core/zsh/default.nix";
|
cfz = "nvim /home/blake/.nix/users/blake/dots/core/zsh/default.nix";
|
||||||
|
cfv = "sudo lf /var/lib";
|
||||||
|
|
||||||
# --- navigation ---
|
# --- navigation ---
|
||||||
ls = "ls --color=auto --group-directories-first";
|
# ls = "ls --color=auto --group-directories-first";
|
||||||
ll = "ls -lh --color=auto --group-directories-first";
|
# ll = "ls -lh --color=auto --group-directories-first";
|
||||||
la = "ls -Alh --color=auto --group-directories-first";
|
# la = "ls -Alh --color=auto --group-directories-first";
|
||||||
".." = "cd ..";
|
".." = "cd ..";
|
||||||
"..." = "cd ../..";
|
"..." = "cd ../..";
|
||||||
fs = "du -h | sort -h";
|
fs = "du -h | sort -h";
|
||||||
@@ -111,7 +113,21 @@ in {
|
|||||||
peace = "systemctl poweroff";
|
peace = "systemctl poweroff";
|
||||||
love = "systemctl reboot";
|
love = "systemctl reboot";
|
||||||
lock = "loginctl lock-session";
|
lock = "loginctl lock-session";
|
||||||
};
|
}
|
||||||
|
# use GNU core utils ls on macos
|
||||||
|
// (
|
||||||
|
if isDarwin
|
||||||
|
then {
|
||||||
|
ls = "gls --color=auto --group-directories-first";
|
||||||
|
ll = "gls -lh --color=auto --group-directories-first";
|
||||||
|
la = "gls -Alh --color=auto --group-directories-first";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ls = "gls --color=auto --group-directories-first";
|
||||||
|
ll = "gls -lh --color=auto --group-directories-first";
|
||||||
|
la = "gls -Alh --color=auto --group-directories-first";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user