mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
added agdsn zsh config
This commit is contained in:
parent
671f4eb06c
commit
5f4dce9a04
|
@ -11,7 +11,6 @@
|
||||||
];
|
];
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
fuzzyCompletion = true;
|
|
||||||
keybindings = true;
|
keybindings = true;
|
||||||
};
|
};
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
@ -32,14 +31,11 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
highlightStyle = "fg=#00bbbb,bold";
|
highlightStyle = "fg=#00bbbb,bold";
|
||||||
};
|
};
|
||||||
|
shellInit = ''
|
||||||
|
zsh-newuser-install () {}
|
||||||
|
'';
|
||||||
|
|
||||||
ohMyZsh = {
|
interactiveShellInit =
|
||||||
enable = true;
|
|
||||||
plugins = [ "gh" ];
|
|
||||||
theme = "agnoster";
|
|
||||||
};
|
|
||||||
|
|
||||||
shellInit =
|
|
||||||
''
|
''
|
||||||
export MCFLY_KEY_SCHEME=vim
|
export MCFLY_KEY_SCHEME=vim
|
||||||
export MCFLY_FUZZY=2
|
export MCFLY_FUZZY=2
|
||||||
|
@ -48,6 +44,8 @@
|
||||||
export MCFLY_INTERFACE_VIEW=BOTTOM
|
export MCFLY_INTERFACE_VIEW=BOTTOM
|
||||||
export MCFLY_PROMPT="❯"
|
export MCFLY_PROMPT="❯"
|
||||||
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
|
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
|
||||||
|
source ${pkgs.agdsn-zsh-config}/etc/zsh/zshrc
|
||||||
|
|
||||||
function svpn() {
|
function svpn() {
|
||||||
unit=$(systemctl list-unit-files | grep "openconnect\|wg-quick\|wireguard\|openvpn" | cut -d "." -f1 | fzf --preview 'systemctl status {}')
|
unit=$(systemctl list-unit-files | grep "openconnect\|wg-quick\|wireguard\|openvpn" | cut -d "." -f1 | fzf --preview 'systemctl status {}')
|
||||||
if [ $(systemctl is-active $unit) = "inactive" ]; then
|
if [ $(systemctl is-active $unit) = "inactive" ]; then
|
||||||
|
@ -61,12 +59,10 @@
|
||||||
prompt_segment blue $CURRENT_FG '%c'
|
prompt_segment blue $CURRENT_FG '%c'
|
||||||
}
|
}
|
||||||
|
|
||||||
zsh-newuser-install () {}
|
|
||||||
|
|
||||||
switch() {
|
switch() {
|
||||||
sudo true # ask the password so we can leave during the (sometimes quite long) build process
|
sudo true # ask the password so we can leave during the (sometimes quite long) build process
|
||||||
OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s)
|
OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s)
|
||||||
${lib.getExe pkgs.nix-output-monitor} build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH
|
${lib.getExe pkgs.nix-output-monitor} build /etc/nixos\#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH
|
||||||
sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH
|
sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH
|
||||||
sudo $OUT_PATH/bin/switch-to-configuration switch
|
sudo $OUT_PATH/bin/switch-to-configuration switch
|
||||||
unlink $OUT_PATH
|
unlink $OUT_PATH
|
||||||
|
|
Loading…
Reference in a new issue