Update zsh config
This commit is contained in:
parent
a21f1cc14d
commit
2f90786d28
@ -17,6 +17,7 @@
|
|||||||
bigScreen = true;
|
bigScreen = true;
|
||||||
ram = 32;
|
ram = 32;
|
||||||
};
|
};
|
||||||
|
deviceSpecific.isHost = true;
|
||||||
services.apcupsd.enable = true;
|
services.apcupsd.enable = true;
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ with types; {
|
|||||||
};
|
};
|
||||||
isHost = mkOption {
|
isHost = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = with config.deviceSpecific; goodMachine;
|
default = false;
|
||||||
};
|
};
|
||||||
bigScreen = mkOption {
|
bigScreen = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
|
@ -66,6 +66,7 @@ in {
|
|||||||
dnsBlacklistOverrides = ''
|
dnsBlacklistOverrides = ''
|
||||||
balsoft.ru OK
|
balsoft.ru OK
|
||||||
192.168.0.0/16 OK
|
192.168.0.0/16 OK
|
||||||
|
${lib.concatMapStringsSep "\n" (machine: "${machine}.lan OK") (builtins.attrNames inputs.self.nixosConfigurations)}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
mailserver = {
|
mailserver = {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
theme = "agnoster";
|
theme = "agnoster";
|
||||||
plugins = [ "git" "dirhistory" ];
|
plugins = [ "git" "dirhistory" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
history = rec {
|
history = rec {
|
||||||
size = 1000000;
|
size = 1000000;
|
||||||
save = size;
|
save = size;
|
||||||
@ -48,20 +49,17 @@
|
|||||||
shellAliases = {
|
shellAliases = {
|
||||||
"b" = ''nix-build "<nixpkgs>" --no-out-link -A'';
|
"b" = ''nix-build "<nixpkgs>" --no-out-link -A'';
|
||||||
"p" = "nix-shell --run zsh -p";
|
"p" = "nix-shell --run zsh -p";
|
||||||
|
"s" = "nix shell";
|
||||||
|
"ss" = "nix shell self#";
|
||||||
|
"d" = "nix develop";
|
||||||
|
"ds" = "nix develop self#";
|
||||||
|
"e" = "nix edit self#";
|
||||||
"o" = "xdg-open";
|
"o" = "xdg-open";
|
||||||
"post" = ''curl -F"file=@-" https://0x0.st'';
|
"post" = ''curl -F"file=@-" https://0x0.st'';
|
||||||
"cat" = "${pkgs.bat}/bin/bat";
|
"cat" = "${pkgs.bat}/bin/bat";
|
||||||
};
|
};
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
r(){nix run nixpkgs.$1 -c $@ }
|
|
||||||
cmdignore=(htop tmux top vim)
|
cmdignore=(htop tmux top vim)
|
||||||
function active_window_id () {
|
|
||||||
if [[ -n $DISPLAY ]] ; then
|
|
||||||
${pkgs.xorg.xprop}/bin/xprop -root _NET_ACTIVE_WINDOW | awk '{print $5}'
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
echo nowindowid
|
|
||||||
}
|
|
||||||
|
|
||||||
# end and compare timer, notify-send if needed
|
# end and compare timer, notify-send if needed
|
||||||
function notifyosd-precmd() {
|
function notifyosd-precmd() {
|
||||||
@ -75,7 +73,7 @@
|
|||||||
else
|
else
|
||||||
cmdstat="✘"
|
cmdstat="✘"
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$cmd" -a ! $term_window = $(active_window_id) ]; then
|
if [ ! -z "$cmd" ]; then
|
||||||
${pkgs.libnotify}/bin/notify-send -i utilities-terminal -u low "$cmdstat $cmd" "in `date -u -d @$cmd_time +'%T'`"
|
${pkgs.libnotify}/bin/notify-send -i utilities-terminal -u low "$cmdstat $cmd" "in `date -u -d @$cmd_time +'%T'`"
|
||||||
fi
|
fi
|
||||||
unset cmd
|
unset cmd
|
||||||
@ -87,7 +85,6 @@
|
|||||||
# get command name and start the timer
|
# get command name and start the timer
|
||||||
function notifyosd-preexec() {
|
function notifyosd-preexec() {
|
||||||
cmd=$1
|
cmd=$1
|
||||||
term_window=$(active_window_id)
|
|
||||||
cmd_start=`date +%s`
|
cmd_start=`date +%s`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user