From 59dcb0c9989902c66765fd959309b14f802dbef5 Mon Sep 17 00:00:00 2001 From: kat witch Date: Mon, 23 Aug 2021 03:34:06 +0100 Subject: [PATCH] nixfmt + zsh changes --- config/users/kat/base/zsh.nix | 33 +++++++++++------------ config/users/kat/dev/rustfmt.nix | 8 +++--- config/users/kat/gui/foot.nix | 1 + overlays/default.nix | 46 ++++++++++++++++---------------- 4 files changed, 43 insertions(+), 45 deletions(-) diff --git a/config/users/kat/base/zsh.nix b/config/users/kat/base/zsh.nix index 966e6d88..a39f1712 100644 --- a/config/users/kat/base/zsh.nix +++ b/config/users/kat/base/zsh.nix @@ -55,15 +55,17 @@ in "listrowsfirst" ]; in '' - zmodload -i zsh/complist - zstyle ':completion:*' list-colors "" - zstyle ':completion:*:*:*:*:*' menu select - zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories - zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' - zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" - zstyle ':completion:*:complete:pass:*:*' matcher 'r:|[./_-]=** r:|=*' 'l:|=* r:|=*' - ${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)} - bindkey '^ ' autosuggest-accept + ZSH_TAB_TITLE_ADDITIONAL_TERMS='foot' + ZSH_TAB_TITLE_ENABLE_FULL_COMMAND=true + zmodload -i zsh/complist + zstyle ':completion:*' list-colors "" + zstyle ':completion:*:*:*:*:*' menu select + zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories + zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" + zstyle ':completion:*:complete:pass:*:*' matcher 'r:|[./_-]=** r:|=*' 'l:|=* r:|=*' + ${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)} + bindkey '^ ' autosuggest-accept ''; shellAliases = { nixdirfmt = "fd --color=never .nix | xargs nixpkgs-fmt"; @@ -83,19 +85,14 @@ in ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold"; ZSH_AUTOSUGGEST_USE_ASYNC = 1; }; - plugins = [ + plugins = with pkgs.zsh-plugins; [ (with pkgs.zsh-syntax-highlighting; { name = "zsh-syntax-highlighting"; inherit src; }) - (with pkgs.zsh-plugins.vim-mode; { - name = "zsh-vim-mode"; - inherit src; - }) - (with pkgs.zsh-plugins.evil-registers; { - name = "evil-registers"; - inherit src; - }) + tab-title.zshPlugin + vim-mode.zshPlugin + evil-registers.zshPlugin { name = "z"; file = "z.sh"; diff --git a/config/users/kat/dev/rustfmt.nix b/config/users/kat/dev/rustfmt.nix index 8644c676..61202ac3 100644 --- a/config/users/kat/dev/rustfmt.nix +++ b/config/users/kat/dev/rustfmt.nix @@ -2,11 +2,11 @@ { xdg.configFile."rustfmt/rustfmt.toml".text = '' -# SPDX-FileCopyrightText: V -# SPDX-License-Identifier: OSL-3.0 + # SPDX-FileCopyrightText: V + # SPDX-License-Identifier: OSL-3.0 -hard_tabs = true -imports_granularity = "One" + hard_tabs = true + imports_granularity = "One" ''; home.packages = with pkgs; [ diff --git a/config/users/kat/gui/foot.nix b/config/users/kat/gui/foot.nix index 8fb83542..704a8a78 100644 --- a/config/users/kat/gui/foot.nix +++ b/config/users/kat/gui/foot.nix @@ -8,6 +8,7 @@ with lib; settings = { main = { term = "foot"; + locked-title = false; font = "${config.kw.font.name}:size=${toString config.kw.font.size}, Twitter Color Emoji:size=8"; font-bold = "${config.kw.font.name}:size=${toString config.kw.font.size}:style=Bold"; font-italic = "${config.kw.font.name}:size=${toString config.kw.font.size}:style=Italic"; diff --git a/overlays/default.nix b/overlays/default.nix index de612b77..419f6738 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -6,30 +6,30 @@ let nurpkgs = self; pkgs = self; }; - rustfmt = super.rustfmt.overrideAttrs ({ patches ? [], ... }: { + rustfmt = super.rustfmt.overrideAttrs ({ patches ? [ ], ... }: { patches = patches ++ [ - # Adds an option variant that merges all use statements into a single block. - # Taken from https://github.com/rust-lang/rustfmt/pull/4680 - ./Implement-One-option-for-imports_granularity-4669.patch - ]; - }); - linuxPackagesFor = kernel: (super.linuxPackagesFor kernel).extend (_: ksuper: { - zfsUnstable = ksuper.zfsUnstable.overrideAttrs (old: { meta = old.meta // { broken = false; }; }); - }); - }; - pkgs = import sources.nixpkgs { - overlays = [ - (import (sources.arcexprs + "/overlay.nix")) - (import (sources.katexprs + "/overlay.nix")) - (import sources.emacs-overlay) - overlay + # Adds an option variant that merges all use statements into a single block. + # Taken from https://github.com/rust-lang/rustfmt/pull/4680 + ./Implement-One-option-for-imports_granularity-4669.patch + ]; + }); + linuxPackagesFor = kernel: (super.linuxPackagesFor kernel).extend (_: ksuper: { + zfsUnstable = ksuper.zfsUnstable.overrideAttrs (old: { meta = old.meta // { broken = false; }; }); + }); + }; + pkgs = import sources.nixpkgs { + overlays = [ + (import (sources.arcexprs + "/overlay.nix")) + (import (sources.katexprs + "/overlay.nix")) + (import sources.emacs-overlay) + overlay + ]; + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "ffmpeg-3.4.8" ]; - config = { - allowUnfree = true; - permittedInsecurePackages = [ - "ffmpeg-3.4.8" - ]; - }; }; + }; in - pkgs +pkgs