get the flags right
This commit is contained in:
parent
25403ef67d
commit
7d4a067aad
|
@ -57,12 +57,6 @@
|
||||||
'' + builtins.readFile ./dotfiles/zsh-prompt.sh;
|
'' + builtins.readFile ./dotfiles/zsh-prompt.sh;
|
||||||
shellInit = builtins.readFile ./dotfiles/zsh-init.sh;
|
shellInit = builtins.readFile ./dotfiles/zsh-init.sh;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
nixos-edit = "(cd ~/nixos-config && vim configuration.nix)";
|
|
||||||
nixos-apply = "sudo nixos-rebuild switch --flake ~/nixos-config#$HOST";
|
|
||||||
ls = "ls --group-directories-first --color=auto";
|
|
||||||
ll = "ls -lh";
|
|
||||||
lh = "ll -ab";
|
|
||||||
l = "ls -ab";
|
|
||||||
grep = "grep --color=auto";
|
grep = "grep --color=auto";
|
||||||
egrep = "egrep --color=auto";
|
egrep = "egrep --color=auto";
|
||||||
objdump = "objdump -M intel";
|
objdump = "objdump -M intel";
|
||||||
|
|
|
@ -68,6 +68,24 @@ fi
|
||||||
|
|
||||||
# standard functions
|
# standard functions
|
||||||
|
|
||||||
|
function nixos-edit() {
|
||||||
|
(cd ~/nixos-config && vim configuration.nix)
|
||||||
|
}
|
||||||
|
|
||||||
|
function nixos-apply() {
|
||||||
|
sudo nixos-rebuild switch --flake ~/nixos-config#$HOST "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
lsflags=()
|
||||||
|
if ls --group-directories-first &>/dev/null; then
|
||||||
|
lsflags+=("--group-directories-first")
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ls="ls ${lsflags[@]} --color=auto";
|
||||||
|
alias ll="ls -lh";
|
||||||
|
alias lh="ll -ab";
|
||||||
|
alias l="ls -ab";
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/6250698/how-to-decode-url-encoded-string-in-shell
|
# https://stackoverflow.com/questions/6250698/how-to-decode-url-encoded-string-in-shell
|
||||||
function urldecode() {
|
function urldecode() {
|
||||||
python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"
|
python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));"
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
forBuildSystem = platform: let
|
forBuildSystem = platform: let
|
||||||
toBuildSystem = config: config.extendModules { modules = [ { nixpkgs.buildPlatform = platform; } ]; };
|
toBuildSystem = config: config.extendModules { modules = [ { nixpkgs.buildPlatform = platform; } ]; };
|
||||||
toToplevel = extended: {
|
toToplevel = extended: {
|
||||||
|
inherit (extended) config;
|
||||||
system = extended.config.system.build.toplevel;
|
system = extended.config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
toSystem = name: config: toToplevel (toBuildSystem config);
|
toSystem = name: config: toToplevel (toBuildSystem config);
|
||||||
|
|
Loading…
Reference in New Issue