summary refs log tree commit diff stats
path: root/user/settings
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings')
-rw-r--r--user/settings/darwin.nix43
-rw-r--r--user/settings/development/base.nix6
-rw-r--r--user/settings/development/javascript.nix1
-rw-r--r--user/settings/fish.nix6
-rw-r--r--user/settings/satoshipay.nix21
-rw-r--r--user/settings/shell.nix7
-rw-r--r--user/settings/zsh.nix127
7 files changed, 9 insertions, 202 deletions
diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix
index adb69b9f..df12f1fc 100644
--- a/user/settings/darwin.nix
+++ b/user/settings/darwin.nix
@@ -3,43 +3,7 @@
 , lib
 , ...
 }: {
-  nixpkgs.overlays = [
-    (self: super: {
-      darwin-zsh-completions =
-        super.runCommand "darwin-zsh-completions-0.0.0"
-          {
-            preferLocalBuild = true;
-          } ''
-          mkdir -p $out/share/zsh/site-functions
-          cat <<-'EOF' > $out/share/zsh/site-functions/_darwin-rebuild
-          #compdef darwin-rebuild
-          #autoload
-          _nix-common-options
-          local -a _1st_arguments
-          _1st_arguments=(
-          'switch:Build, activate, and update the current generation'\
-          'build:Build without activating or updating the current generation'\
-          'check:Build and run the activation sanity checks'\
-          'changelog:Show most recent entries in the changelog'\
-          )
-          _arguments \
-          '--list-generations[Print a list of all generations in the active profile]'\
-          '--rollback[Roll back to the previous configuration]'\
-          {--switch-generation,-G}'[Activate specified generation]'\
-          '(--profile-name -p)'{--profile-name,-p}'[Profile to use to track current and previous system configurations]:Profile:_nix_profiles'\
-          '1:: :->subcmds' && return 0
-          case $state in
-          subcmds)
-          _describe -t commands 'darwin-rebuild subcommands' _1st_arguments
-          ;;
-          esac
-          EOF
-        '';
-    })
-
-  ];
   home.packages = with pkgs; [
-    darwin-zsh-completions
     darwin.trash
   ];
 
@@ -134,9 +98,6 @@
     };
   };
 
-  programs.zsh.dirHashes = {
-    icloud = "$HOME/Library/Mobile\ Documents/com~apple~CloudDocs";
-  };
   home.shellAliases = {
     rb = "darwin-rebuild";
     rbs = "darwin-rebuild switch --flake $(ghq list -p nixfiles)";
@@ -153,10 +114,6 @@
     IdentityAgent ${config.home.sessionVariables.SSH_AUTH_SOCK}
   '';
 
-  programs.zsh.envExtra = ''
-    SHELL_SESSIONS_DISABLE=1
-    path+=($HOME/Library/Python/3.9/bin)
-  '';
   home.activation.linkStrongboxSSHAgentSocket = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
     if [[ ! -d ~/.strongbox ]]
     then
diff --git a/user/settings/development/base.nix b/user/settings/development/base.nix
index f619324f..d8628f0f 100644
--- a/user/settings/development/base.nix
+++ b/user/settings/development/base.nix
@@ -4,8 +4,8 @@
 , ...
 }:
 let
-  direnvHook = pkgs.runCommandLocal "direnv_hook" { } ''
-    ${pkgs.direnv}/bin/direnv hook zsh > $out
+  direnvHook = pkgs.runCommandLocal "direnv_hook_fish" { } ''
+    ${pkgs.direnv}/bin/direnv hook fish > $out
   '';
 in
 {
@@ -59,7 +59,7 @@ in
       enable = true;
     };
   };
-  programs.zsh.initExtra = ''
+  programs.fish.shellInit = ''
     source ${direnvHook}
   '';
   xdg.configFile."direnv/direnvrc".text = ''
diff --git a/user/settings/development/javascript.nix b/user/settings/development/javascript.nix
index b06f5abd..4e6722f9 100644
--- a/user/settings/development/javascript.nix
+++ b/user/settings/development/javascript.nix
@@ -123,7 +123,6 @@ in
     prefix=''${HOME}/.local
     cache=${config.xdg.cacheHome}/npm/
     store-dir=${config.xdg.cacheHome}/pnpm/
-    script-shell=${pkgs.zsh}/bin/zsh
     always-auth=true
     sign-git-tag=true
     rebuild-bundle=false
diff --git a/user/settings/fish.nix b/user/settings/fish.nix
index b548c71c..e9e7de82 100644
--- a/user/settings/fish.nix
+++ b/user/settings/fish.nix
@@ -36,6 +36,12 @@
     interactiveShellInit = ''
       bind \es __ghq_repository_search
     '';
+    shellInit = ''
+      if test -n $KITTY_INSTALLATION_DIR
+      then
+        set -x KITTY_SHELL_INTEGRATION no-cursor
+      fi
+    '';
     functions = {
       ds = "du -hd1 $argv[1] | sort -h";
     };
diff --git a/user/settings/satoshipay.nix b/user/settings/satoshipay.nix
index 91170c2c..798960bb 100644
--- a/user/settings/satoshipay.nix
+++ b/user/settings/satoshipay.nix
@@ -73,27 +73,6 @@ in
     ks = "echo $(kubectx -c):$(kubens -c)";
     klot = "kubetail";
   };
-  programs.zsh = {
-    plugins = [
-      {
-        name = "kubectl-aliases";
-        src = pkgs.fetchFromGitHub {
-          owner = "alanpearce";
-          repo = "kubectl-aliases";
-          rev = "fb43d6ca209d88e7cda5ea437bf9429645f6818f";
-          # date = 2020-11-18T14:20:16+01:00;
-          sha256 = "1xlq0vzxaiv2ciwifamr29lcqdyg44dra48c5ad29rj973vvy97z";
-        };
-      }
-    ];
-    initExtra = ''
-      if [[ -n $commands[helm] ]]
-      then
-      autoload _helm
-      compdef _helm helm
-      fi
-    '';
-  };
 
   accounts.email.accounts.satoshipay =
     let
diff --git a/user/settings/shell.nix b/user/settings/shell.nix
index 46d3f37b..637ad6fc 100644
--- a/user/settings/shell.nix
+++ b/user/settings/shell.nix
@@ -133,11 +133,4 @@ in
     gitstatus
     up
   ];
-  programs.zsh = {
-    shellAliases = {
-      history = "fc -l $(( $LINES - 2 ))";
-
-      hor = "$(nix-shell -p home-manager --run 'home-manager generations' | head -n 2 | tail -n 1 | f 7)/activate";
-    };
-  };
 }
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
deleted file mode 100644
index 32070518..00000000
--- a/user/settings/zsh.nix
+++ /dev/null
@@ -1,127 +0,0 @@
-{ config
-, lib
-, pkgs
-, ...
-}:
-let
-  inherit (pkgs) stdenv;
-  zshrc = ".config/zsh/.zshrc";
-  mkZshPlugin = attrs@{ name, file ? "${name}.plugin.zsh", ... }: {
-    inherit name file;
-    src = stdenv.mkDerivation {
-      inherit (attrs) src;
-      name = "zsh-plugin-${attrs.name}";
-      buildInputs = [ pkgs.zsh ];
-      buildPhase = ''
-        zsh -c 'for f in **/*.zsh; zcompile "$f"'
-      '';
-      installPhase = ''
-        cp -a $PWD $out/
-      '';
-    };
-  };
-in
-{
-  home.packages = with pkgs; [
-    zsh-completions
-  ];
-
-  home.sessionVariables = {
-    GHQ_ROOT = lib.mkDefault "${config.home.homeDirectory}/projects";
-  };
-
-  programs.zsh = {
-    enable = true;
-
-    enableAutosuggestions = true;
-    enableCompletion = true;
-    defaultKeymap = "emacs";
-
-    dotDir = ".config/zsh";
-
-    history = {
-      expireDuplicatesFirst = true;
-      extended = true;
-      path = "${config.home.homeDirectory}/.local/share/zsh/history";
-      save = 200000;
-      size = 100000;
-      share = false;
-      ignorePatterns = [
-        "rm *"
-        "trash *"
-        "pkill *"
-        "* aria2c *"
-      ];
-    };
-
-    localVariables = {
-      ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=8";
-    };
-
-    plugins = map mkZshPlugin [
-      {
-        name = "zsh-bd";
-        file = "bd.plugin.zsh";
-        src = pkgs.zsh-bd.src;
-      }
-      {
-        name = "zsh-autopair";
-        src = pkgs.zsh-autopair.src;
-      }
-      {
-        name = "anyframe";
-        src = pkgs.fetchFromGitHub {
-          owner = "mollifier";
-          repo = "anyframe";
-          rev = "598675303044df8e9d04722f3adff4f63a238922";
-          # date = 2017-07-19T21:59:49+09:00;
-          sha256 = "08bjm1dd2mpv8rk8x6yvm6gj490rgimmiq7ln4jr5hik2k3mm82r";
-        };
-      }
-      {
-        name = "zsh-powerlevel10k";
-        src = pkgs.zsh-powerlevel10k.src;
-        file = "dummy";
-      }
-    ];
-
-    # Put this in /etc/paths.d/ on Darwin instead
-    envExtra = lib.optionalString (!stdenv.isDarwin) ''
-      if [[ ''${path[(I)$HOME/.local/bin ]} ]]
-      then
-        path=($HOME/.local/bin $path)
-      fi
-    '';
-
-    initExtraFirst = ''
-      if [[ $TERM != "dumb" ]]
-      then
-        if [[ -r "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
-          source "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh"
-        fi
-        typeset -g POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
-        source $ZDOTDIR/plugins/zsh-powerlevel10k/powerlevel10k.zsh-theme
-      fi
-    '';
-    initExtra =
-      ''
-        typeset -T GHQ_ROOT ghq_root
-
-        function hist-freq-subcommands () {
-          fc -l -m "$1*" -10000 | cut -d' ' -f4- | sort | uniq -c | sort -gr | head -n100 | less
-        }
-
-        source ${pkgs.fzf}/share/fzf/key-bindings.zsh
-        source ${pkgs.fzf}/share/fzf/completion.zsh
-
-      ''
-      + builtins.readFile ../zsh/zshrc
-      + (
-        if stdenv.isDarwin
-        then builtins.readFile ../zsh/zshrc.darwin
-        else ""
-      );
-  };
-
-  home.file."${config.xdg.configHome}/zsh/.p10k.zsh".source = ../zsh/p10k.zsh;
-}