diff options
Diffstat (limited to 'user/settings')
-rw-r--r-- | user/settings/base.nix | 3 | ||||
-rw-r--r-- | user/settings/darwin.nix | 17 | ||||
-rw-r--r-- | user/settings/development/javascript.nix | 1 | ||||
-rw-r--r-- | user/settings/development/vlang.nix | 10 | ||||
-rw-r--r-- | user/settings/development/web.nix | 1 | ||||
-rw-r--r-- | user/settings/emacs.nix | 26 | ||||
-rw-r--r-- | user/settings/fish.nix | 30 | ||||
-rw-r--r-- | user/settings/fish/functions/tmp.fish | 30 | ||||
-rw-r--r-- | user/settings/git.nix | 1 | ||||
-rw-r--r-- | user/settings/nix.nix | 1 | ||||
-rw-r--r-- | user/settings/shell.nix | 2 |
11 files changed, 71 insertions, 51 deletions
diff --git a/user/settings/base.nix b/user/settings/base.nix index 82f92535..edfe692b 100644 --- a/user/settings/base.nix +++ b/user/settings/base.nix @@ -14,6 +14,9 @@ }; home.preferXdgDirectories = true; nix.settings.use-xdg-base-directories = true; + home.shell = { + enableShellIntegration = false; + }; home.sessionVariables = let conf = config.xdg.configHome; diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix index 6571e6d8..6c03852a 100644 --- a/user/settings/darwin.nix +++ b/user/settings/darwin.nix @@ -73,20 +73,9 @@ MODE="light" fi emacsclient="${config.programs.emacs.finalPackage}/bin/emacsclient" - emacsSwitchTheme () { - if pgrep -q Emacs; then - if [[ $MODE == "dark" ]]; then - $emacsclient \ - --eval "(stimmung-themes-load-dark)" \ - --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" - elif [[ $MODE == "light" ]]; then - $emacsclient \ - --eval "(stimmung-themes-load-light)" \ - --eval "(modify-all-frames-parameters '((ns-appearance '$MODE)))" - fi - fi - } - emacsSwitchTheme + if pgrep -q Emacs; then + $emacsclient --eval "(my/switch-theme-variant '$MODE)" + fi '' ) ) diff --git a/user/settings/development/javascript.nix b/user/settings/development/javascript.nix index fa418cc1..81d8c631 100644 --- a/user/settings/development/javascript.nix +++ b/user/settings/development/javascript.nix @@ -5,7 +5,6 @@ { home.packages = with pkgs.nodePackages; [ node2nix - javascript-typescript-langserver typescript-language-server ]; diff --git a/user/settings/development/vlang.nix b/user/settings/development/vlang.nix new file mode 100644 index 00000000..6d31634d --- /dev/null +++ b/user/settings/development/vlang.nix @@ -0,0 +1,10 @@ +{ pkgs +, ... +}: { + home.packages = with pkgs; [ + vlang + ]; + programs.emacs.extraPackages = epkgs: (with epkgs; [ + v-mode + ]); +} diff --git a/user/settings/development/web.nix b/user/settings/development/web.nix index 24da1604..13b0ea5c 100644 --- a/user/settings/development/web.nix +++ b/user/settings/development/web.nix @@ -9,7 +9,6 @@ stylelint ] ++ (with pkgs; [ flyctl - prettierd personal.htmlformat ]); home.shellAliases = { diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index e6114e2a..72c2ee52 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -84,6 +84,7 @@ in crux dired-git-info docker-compose-mode + doom-themes dtrt-indent envrc editorconfig @@ -159,6 +160,7 @@ in treesit-grammars.with-all-grammars treesit-auto try + ultra-scroll vc-msg vertico vertico-prescient @@ -169,13 +171,23 @@ in yasnippet-capf ]); overrides = self: super: { - apheleia = self.melpaPackages.apheleia.overrideAttrs - (old: { - patchPhase = '' - substituteInPlace apheleia-formatters.el \ - --replace-fail '"prettier"' '"prettierd"' - ''; - }); + ultra-scroll = self.melpaBuild rec { + pname = "ultra-scroll"; + version = "0.3.1"; + + src = pkgs.fetchFromGitHub { + owner = "jdtsmith"; + repo = pname; + rev = "2e3b9997ae1a469e878feaa0af23a23685a0fbed"; + hash = "sha256-9+3T5tXPRuRtENt/Rr0Ss3LZJlTOwpGePbREqofN2j0="; + }; + + meta = { + homepage = "https://github.com/jdtsmith/ultra-scroll"; + description = "scroll emacs like lightning"; + license = pkgs.lib.licenses.gpl3; + }; + }; treemacs-nerd-icons = self.melpaPackages.treemacs-nerd-icons.overrideAttrs (old: { src = pkgs.fetchFromGitHub { owner = "aaronmiller"; diff --git a/user/settings/fish.nix b/user/settings/fish.nix index 480c9ade..574c74d3 100644 --- a/user/settings/fish.nix +++ b/user/settings/fish.nix @@ -2,6 +2,7 @@ , lib , ... }: { + home.shell.enableFishIntegration = true; programs.fish = { enable = true; plugins = @@ -11,15 +12,7 @@ with pkgs.fishPlugins; [ (fromNixpkgs fzf-fish) (fromNixpkgs autopair) - { - name = "fishplugin-hydro"; - src = pkgs.fetchFromGitHub { - owner = "jorgebucaran"; - repo = "hydro"; - hash = "sha256-QYq4sU41/iKvDUczWLYRGqDQpVASF/+6brJJ8IxypjE="; - rev = "9c93b89573bd722f766f2190a862ae55e728f6ba"; - }; - } + (fromNixpkgs hydro) { name = "ghq"; src = pkgs.fetchFromGitHub { @@ -59,24 +52,7 @@ functions = { ds = "du -hd1 $argv[1] | sort -h"; last_history_item = "echo $history[1]"; - } // (lib.attrsets.optionalAttrs pkgs.stdenv.isLinux { - open = '' - argparse h/help a/application -- $argv - or return - - if set -ql _flag_help - echo "open [-h|--help] [-a application] [arguments...]" - return 1 - end - - if set -ql _flag_application - # TODO: support reverse-domain- named files (e.g. org.kde.kate.desktop) - ${pkgs.gtk3}/bin/gtk-launch $argv[1] - else - xdg-open $argv - end - ''; - }); + }; }; xdg.configFile."fish/completions" = { recursive = true; diff --git a/user/settings/fish/functions/tmp.fish b/user/settings/fish/functions/tmp.fish new file mode 100644 index 00000000..af87c325 --- /dev/null +++ b/user/settings/fish/functions/tmp.fish @@ -0,0 +1,30 @@ +# source: https://github.com/ansemjo/dotfiles/blob/debfb84d2574985daeac0d85a66002081b59a569/fish/functions/tmpdir.fish +function tmp --description "Create and switch into an emphemeral directory" + + # create a tmpdir and cd into it + set -l tmpdir (mktemp --tmpdir -d tmpdir-XXXXXX) + cd $tmpdir; and echo >&2 \ + (set_color yellow)"tmpdir:" $tmpdir "will be removed on exit" \ + (set_color normal) + + # spawn a new shell, store the exit status and return to previous dir + fish $argv + set -l ret $status + cd $dirprev[-1] + + # after exit, check if there are mounts inside tmpdir + if test -e /etc/mtab && awk '{ print $2 }' /etc/mtab | grep $tmpdir + echo >&2 \ + (set_color red)"refusing to purge $tmpdir due to mounts!" \ + (set_color normal) + else + # if clear, purge directory + echo >&2 \ + (set_color red)"purge $tmpdir ..." \ + (set_color normal) + rm -rf $tmpdir + end + + # return subshell exit status + return $ret +end diff --git a/user/settings/git.nix b/user/settings/git.nix index 6d119411..3fb6d19c 100644 --- a/user/settings/git.nix +++ b/user/settings/git.nix @@ -125,6 +125,7 @@ in }; home.packages = with pkgs; [ git-extras # delete-merged-branches and friends + git-worktree-switcher ghq delta gitui diff --git a/user/settings/nix.nix b/user/settings/nix.nix index 6eabeae8..b20ae466 100644 --- a/user/settings/nix.nix +++ b/user/settings/nix.nix @@ -18,6 +18,7 @@ in age agenix cached-nix-shell + nixd nil nix-prefetch-scripts nix-init diff --git a/user/settings/shell.nix b/user/settings/shell.nix index 41805a44..446c9fd4 100644 --- a/user/settings/shell.nix +++ b/user/settings/shell.nix @@ -64,7 +64,7 @@ in dp = "docker ps"; dps = "docker ps"; - dc = "docker-compose"; + dc = "docker compose"; dcb = "dc build"; dcd = "dc down"; dcj = "dc pull"; |