Rearrange aliases & xdg compliance hacks
This commit is contained in:
parent
7b90228590
commit
ced97b5f69
|
@ -6,22 +6,11 @@ alias -- -='cd -'
|
||||||
alias q=exit
|
alias q=exit
|
||||||
alias clr=clear
|
alias clr=clear
|
||||||
alias sudo='sudo '
|
alias sudo='sudo '
|
||||||
|
|
||||||
alias rm='rm -i'
|
alias rm='rm -i'
|
||||||
alias cp='cp -i'
|
alias cp='cp -i'
|
||||||
alias mv='mv -i'
|
alias mv='mv -i'
|
||||||
|
|
||||||
alias mkdir='mkdir -p'
|
alias mkdir='mkdir -p'
|
||||||
alias wget='wget -c'
|
alias wget='wget -c'
|
||||||
if command -v exa >/dev/null; then
|
|
||||||
alias exa='exa --group-directories-first'
|
|
||||||
alias l='exa -1'
|
|
||||||
alias ll='exa -l'
|
|
||||||
alias la='LC_COLLATE=C exa -la'
|
|
||||||
else
|
|
||||||
alias l='ls -1'
|
|
||||||
alias ll='ls -l'
|
|
||||||
fi
|
|
||||||
|
|
||||||
alias mk=make
|
alias mk=make
|
||||||
alias rcp='rsync -vaP --delete'
|
alias rcp='rsync -vaP --delete'
|
||||||
|
@ -31,21 +20,6 @@ alias gurl='curl --compressed'
|
||||||
alias y='xclip -selection clipboard -in'
|
alias y='xclip -selection clipboard -in'
|
||||||
alias p='xclip -selection clipboard -out'
|
alias p='xclip -selection clipboard -out'
|
||||||
|
|
||||||
alias sc=systemctl
|
|
||||||
alias ssc='sudo systemctl'
|
|
||||||
|
|
||||||
alias nix-env='NIXPKGS_ALLOW_UNFREE=1 nix-env'
|
|
||||||
alias nen=nix-env
|
|
||||||
alias nch=nix-channel
|
|
||||||
alias ngc='nix-collect-garbage -d'
|
|
||||||
alias nre='sudo nixos-rebuild'
|
|
||||||
alias nup='sudo nix-channel --update && nre'
|
|
||||||
|
|
||||||
if command -v nvim >/dev/null; then
|
|
||||||
alias vim=nvim
|
|
||||||
alias v=nvim
|
|
||||||
fi
|
|
||||||
|
|
||||||
autoload -U zmv
|
autoload -U zmv
|
||||||
|
|
||||||
take() {
|
take() {
|
||||||
|
|
|
@ -34,6 +34,12 @@
|
||||||
extraGroups = [ "wheel" "video" "networkmanager" ];
|
extraGroups = [ "wheel" "video" "networkmanager" ];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
alias.nix-env = "NIXPKGS_ALLOW_UNFREE=1 nix-env";
|
||||||
|
alias.nen = "nix-env";
|
||||||
|
alias.sc = "systemctl";
|
||||||
|
alias.ssc = "sudo systemctl";
|
||||||
|
alias.dots = "make -C ~/.dotfiles";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,17 +68,4 @@
|
||||||
LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
|
LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
|
||||||
WGETRC = "$XDG_CACHE_HOME/wgetrc";
|
WGETRC = "$XDG_CACHE_HOME/wgetrc";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Prevents ~/.esd_auth files by disabling the esound protocol module for
|
|
||||||
# pulseaudio, which I likely don't need. Is there a better way?
|
|
||||||
hardware.pulseaudio.configFile =
|
|
||||||
let paConfigFile =
|
|
||||||
with pkgs; runCommand "disablePulseaudioEsoundModule"
|
|
||||||
{ buildInputs = [ pulseaudio ]; } ''
|
|
||||||
mkdir "$out"
|
|
||||||
cp ${pulseaudio}/etc/pulse/default.pa "$out/default.pa"
|
|
||||||
sed -i -e 's|load-module module-esound-protocol-unix|# ...|' "$out/default.pa"
|
|
||||||
'';
|
|
||||||
in lib.mkIf config.hardware.pulseaudio.enable
|
|
||||||
"${paConfigFile}/default.pa";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,18 @@
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
# Prevents ~/.esd_auth files by disabling the esound protocol module for
|
||||||
|
# pulseaudio, which I likely don't need. Is there a better way?
|
||||||
|
hardware.pulseaudio.configFile =
|
||||||
|
let paConfigFile =
|
||||||
|
with pkgs; runCommand "disablePulseaudioEsoundModule"
|
||||||
|
{ buildInputs = [ pulseaudio ]; } ''
|
||||||
|
mkdir "$out"
|
||||||
|
cp ${pulseaudio}/etc/pulse/default.pa "$out/default.pa"
|
||||||
|
sed -i -e 's|load-module module-esound-protocol-unix|# ...|' "$out/default.pa"
|
||||||
|
'';
|
||||||
|
in lib.mkIf config.hardware.pulseaudio.enable
|
||||||
|
"${paConfigFile}/default.pa";
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver.enable = true;
|
xserver.enable = true;
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
env.EDITOR = "nvim";
|
env.EDITOR = "nvim";
|
||||||
env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC";
|
env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC";
|
||||||
|
|
||||||
|
alias.v = "nvim";
|
||||||
|
|
||||||
# My vim config is too stateful to manage with nix
|
# My vim config is too stateful to manage with nix
|
||||||
init = ''
|
init = ''
|
||||||
if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then
|
if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then
|
||||||
|
|
|
@ -24,6 +24,11 @@
|
||||||
source = <my/config/zsh>;
|
source = <my/config/zsh>;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
alias.exa = "exa --group-directories-first";
|
||||||
|
alias.l = "exa -1";
|
||||||
|
alias.ll = "exa -l";
|
||||||
|
alias.la = "LC_COLLATE=C exa -la";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
|
Loading…
Reference in a new issue