From 2daf7f4a126e3a8bf92f448070ad4f18705fedf9 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Sat, 1 Mar 2025 18:37:12 -0700 Subject: [PATCH] Cleaning. Removing a lot of unused stuff --- home-cli.nix | 102 +++++++++++++----------------------------- home-gui.nix | 43 +++++++++--------- home-mail.nix | 121 ++------------------------------------------------ home-nvim.nix | 29 +++++++++++- 4 files changed, 84 insertions(+), 211 deletions(-) diff --git a/home-cli.nix b/home-cli.nix index d91714a..05bfb42 100644 --- a/home-cli.nix +++ b/home-cli.nix @@ -9,6 +9,7 @@ in home.username = "dustinswan"; home.homeDirectory = "/Users/dustinswan"; + home.shell.enableShellIntegration = true; nix = { package = pkgs.nix; @@ -22,42 +23,19 @@ in ]; home.packages = with pkgs; [ - fd # `fd PATTERN`; `fd` is like ls-R; `-e ext` searches by extension; `-g` for glob; `-H` searches hidden files; `-u` for unrestricted; `fd -e jpg -x convert {} {.}.png` - mosh # like ssh but better on spotty networks - aider-chat - w3m - wget - httpie # HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more - monolith # CLI tool for saving complete web pages as a single HTML file supabase-cli + bitwarden-cli + fd ngrok ddev - # bitwarden-cli mkcert gnupg - gitu # A TUI Git client inspired by Magit - rage # A simple, secure and modern file encryption tool (and Rust library) with small explicit keys, no config options, and UNIX-style composability - sd - jq - sq cacert - weechat - sttr # string operations. e.g. sttr md5 "Hello World"; sttr snake "ChangeCase" - imagemagick - # visidata - magic-wormhole - termscp # SCP/SFTP/FTP/S3 nodejs - pipx - yarn - # php83 - stack - cargo - ruby - llvm + typescript + pnpm + uv blade-formatter - # haskellPackages.ghcup - # php83Packages.composer nodePackages.typescript-language-server nodePackages.stylelint nodePackages.js-beautify @@ -84,7 +62,6 @@ in "$HOME/.cargo/bin" "$HOME/.npm-global/bin" "/opt/homebrew/bin" - "/Users/dustinswan/Downloads/roc_nightly-macos_apple_silicon-2024-10-09-bf5b13e237f" ]; xdg.enable = true; @@ -107,7 +84,7 @@ in terminal = "tmux-256color"; plugins = with pkgs.tmuxPlugins; [ sensible - resurrect # prefix ctrl-s to save sessions; prefix ctrl-r to restore + # resurrect # prefix ctrl-s to save sessions; prefix ctrl-r to restore continuum # automatically save the session every 15 minutes sessionist # prefix g to switch sessions; prefix C to create; prefix X to kill; prefix S to switch back; prefix @ to promote; prefix t f to join marked pane pain-control # prefix |, -, \, _ to split; prefix h, j, k, l to switch; prefix H, J, K, L to resize; prefix <, > to move windows @@ -115,37 +92,27 @@ in yank # prefix y -> copy command line to clipboard; prefix Y -> copy pwd to clipboard; search + y -> copy to clipboard # open # highlight: o -> open; ctrl-o -> $EDITOR; S -> web search vim-tmux-navigator # ctrl-h, -j, -k, -l -> move between tmux and vim splits - extrakto # prefix tab -> fuzzy find text on screen; enter to copy; tab to paste + extrakto # prefix tab -> fuzzy find text on screen; enter to copy; tab to paste fingers # prefix F -> copy/open/edit items on screen by letter ]; + # Remove that SHELL thing when fixed upstream extraConfig = '' set -ag terminal-overrides ",xterm-256color:RGB" + set -g default-command "$SHELL" ''; }; programs.eza = { enable = true; - enableZshIntegration = true; enableFishIntegration = true; git = true; }; programs.zoxide = { enable = true; - enableZshIntegration = true; enableFishIntegration = true; }; - programs.zsh = { - enable = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - oh-my-zsh = { - enable = true; - plugins = [ "git" "httpie" "aws" "mosh" "npm" "rsync" "sudo" "yarn" "vi-mode" ]; - }; - }; - programs.fish = { enable = true; plugins = [ @@ -164,36 +131,19 @@ in } ]; + interactiveShellInit = "set fish_greeting"; + # https://codeberg.org/adamcstephens/dotfiles/src/commit/e14f35f6e9a9cb9174016948c512c0db364e0dec/apps/fish/init.fish shellInit = '' fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" - source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish + fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh source /nix/var/nix/profiles/default/etc/profile.d/nix.fish ''; }; - programs.direnv = { - enable = true; - enableZshIntegration = true; - # enableFishIntegration = true; - }; - - programs.starship = { - enable = true; - enableZshIntegration = true; - enableFishIntegration = true; - }; - - # programs.skim = { - # enable = true; - # enableFishIntegration = true; - # enableZshIntegration = true; - # }; - programs.fzf = { - enable = true; - enableFishIntegration = true; - enableZshIntegration = true; - }; + programs.direnv.enable = true; + programs.starship.enable = true; + programs.fzf.enable = true; programs.ssh = { enable = true; @@ -223,6 +173,20 @@ in identityFile = "/Users/dustinswan/.ssh/id_rsa_mr"; identitiesOnly = true; }; + + mr-prod3 = { + inherit (secrets.mr-prod3) user; + inherit (secrets.mr-prod3) hostname; + identityFile = "/Users/dustinswan/.ssh/id_rsa_mr"; + identitiesOnly = true; + }; + + mr-prod4 = { + inherit (secrets.mr-prod4) user; + inherit (secrets.mr-prod4) hostname; + identityFile = "/Users/dustinswan/.ssh/id_rsa_mr"; + identitiesOnly = true; + }; }; }; @@ -237,17 +201,13 @@ in delta.enable = true; }; - programs.lazygit.enable = true; programs.gitui.enable = true; - - programs.bat.enable = true; + programs.bat.enable = true; programs.gpg.enable = true; - programs.tealdeer.enable = true; programs.ripgrep.enable = true; programs.keychain = { enable = true; - enableZshIntegration = true; enableFishIntegration = true; inheritType = "any"; agents = [ "gpg" "ssh" ]; diff --git a/home-gui.nix b/home-gui.nix index 6847b0a..a4616d4 100644 --- a/home-gui.nix +++ b/home-gui.nix @@ -1,25 +1,28 @@ -{ pkgs, ... }: +{ ... }: { fonts.fontconfig.enable = true; - programs.alacritty = { - enable = true; - settings = { - window = { - decorations = "buttonless"; - padding = { - x = 12; - y = 12; - }; - opacity = 0.95; - }; - font = { - normal.family = "Iosevka NF"; - bold.family = "Iosevka NF"; - italic.family = "Iosevka NF"; - size = 16.0; - }; - }; - }; + # not building on my mac at the moment + # programs.ghostty = { + # enable = true; + # installBatSyntax = false; + + # settings = { + # font-family = "Iosevka NFM"; + # font-size = 16; + # font-thicken = true; + # # theme = "dark:catppuccin-mocha,light:catppuccin-latte"; + # theme = "catppuccin-mocha"; + # background-opacity = 0.95; + # background-blur-radius = 15; + # window-padding-x = 12; + # window-padding-y = 8; + # window-padding-balance = true; + # macos-titlebar-style = "tabs"; + # macos-option-as-alt = "left"; + # copy-on-select = "clipboard"; + # # keybind = "global:cmd+grave_accent=toggle_quick_terminal"; + # }; + # }; } diff --git a/home-mail.nix b/home-mail.nix index 4a12b4e..768e478 100644 --- a/home-mail.nix +++ b/home-mail.nix @@ -1,17 +1,9 @@ -{ pkgs, ... }: +{ ... }: -let - secrets = import ./secrets.nix; -in { programs.mbsync.enable = true; programs.msmtp.enable = true; programs.himalaya.enable = true; - # programs.notmuch.enable = true; - programs.aerc.enable = true; - programs.aerc.extraConfig.general.unsafe-accounts-conf = true; - programs.khal.enable = true; - programs.khard.enable = true; programs.vdirsyncer.enable = true; accounts.email = { @@ -42,21 +34,13 @@ in create = "maildir"; expunge = "maildir"; }; - # imapnotify = { - # enable = true; - # boxes = [ "INBOX" ]; - # onNotify = "\${pkgs.isync}/bin/mbsync -a"; - # onNotifyPost = { mail = "\${pkgs.noti}/bin/noti 'New mail'"; }; - # }; - # notmuch.enable = true; msmtp.enable = true; - aerc.enable = true; himalaya = { enable = true; settings = { # backend = "imap"; # maildir.root-dir = "/Users/dustinswan/Mail/FastMail"; - message.send.backend = "smtp"; + # message.send.backend = "smtp"; # sent-folder = "Sent"; # draft-folder = "Drafts"; }; @@ -86,7 +70,6 @@ in expunge = "maildir"; }; msmtp.enable = true; - # notmuch.enable = true; aerc.enable = true; # himalaya = { # enable = true; @@ -112,7 +95,7 @@ in remote = { passwordCommand = ["~/dotfiles/bin/decrypt-password" "dustinswan@fastmail.com"]; type = "caldav"; - url = "https://caldav.fastmail.com/"; + url = "https://caldav.fastmail.com/dav/"; userName = "dustinswan@fastmail.com"; }; vdirsyncer = { @@ -122,101 +105,3 @@ in }; }; } - -# TODO: home-manager now supports all this, don't need to do custom config files - -# -# home.file.vdirsyncer = { -# target = ".config/vdirsyncer/config"; -# text = ''[general] -# status_path = "~/.vdirsyncer/status/" -# -# [pair fastmail_contacts] -# a = "fastmail_contacts_local" -# b = "fastmail_contacts_remote" -# collections = ["from b"] -# conflict_resolution = "b wins" -# -# [storage fastmail_contacts_local] -# type = "filesystem" -# path = "~/Contacts/" -# fileext = ".vcf" -# -# [storage fastmail_contacts_remote] -# type = "carddav" -# url = "https://carddav.messagingengine.com/" -# username = "dustinswan@fastmail.com" -# password.fetch = ["command", "~/dotfiles/bin/decrypt-password", "dustinswan@fastmail.com"] -# -# -# [pair fastmail_calendar] -# a = "fastmail_calendar_local" -# b = "fastmail_calendar_remote" -# collections = ["from b"] -# conflict_resolution = "b wins" -# metadata = ["color", "displayname"] -# -# [storage fastmail_calendar_local] -# type = "filesystem" -# path = "~/Calendars/Fastmail" -# fileext = ".ics" -# -# [storage fastmail_calendar_remote] -# type = "caldav" -# url = "https://caldav.messagingengine.com/" -# username = "dustinswan@fastmail.com" -# password.fetch = ["command", "~/dotfiles/bin/decrypt-password", "dustinswan@fastmail.com"] -# -# -# [pair google_calendar] -# a = "google_calendar_local" -# b = "google_calendar_remote" -# collections = null -# # conflict_resolution = "b wins" -# # metadata = ["color", "displayname"] -# -# [storage google_calendar_local] -# type = "filesystem" -# path = "~/Calendars/Google" -# fileext = ".ics" -# -# [storage google_calendar_remote] -# type = "http" -# url = "${secrets.google-calendar.our-stuff}" -# # type = "google_calendar" -# # token_file = "~/token_file" -# # client_id = "${secrets.google-vdirsyncer.id}" -# # client_secret = "${secrets.google-vdirsyncer.secret}" -# ''; -# }; -# -# home.file.khard = { -# target = ".config/khard/khard.conf"; -# text = ''[addressbooks] -# [[contacts]] -# path = ~/Contacts/Default -# -# [general] -# default_action = list''; -# }; -# -# home.file.khal = { -# target = ".config/khal/config"; -# text = ''[calendars] -# [[Fastmail]] -# path = ~/Calendars/Fastmail/* -# color = light green -# type = discover -# -# [[Google]] -# path = ~/Calendars/Google -# color = light blue -# type = discover -# -# [locale] -# timeformat = %H:%M -# dateformat = %Y-%m-%d -# longdateformat = %Y-%m-%d -# datetimeformat = %Y-%m-%d %H:%M -# longdatetimeformat = %Y-%m-%d %H:%M''; -# }; diff --git a/home-nvim.nix b/home-nvim.nix index c879124..74296ed 100644 --- a/home-nvim.nix +++ b/home-nvim.nix @@ -10,6 +10,7 @@ colorschemes.catppuccin.enable = true; colorschemes.catppuccin.settings.transparent_background = true; + colorschemes.catppuccin.settings.flavour = "auto"; opts = { number = true; @@ -55,21 +56,22 @@ cmp-nvim-lsp.enable = true; cmp-buffer.enable = true; cmp-path.enable = true; - codeium-nvim.enable = true; commentary.enable = true; # conform-nvim.enable = true; dashboard.enable = true; emmet.enable = true; + flash.enable = true; gitsigns.enable = true; lazygit.enable = true; lint.enable = true; lualine.enable = true; luasnip.enable = true; - lsp = { + lsp = { enable = true; inlayHints = true; servers = { eslint.enable = true; + elixirls.enable = true; html.enable = true; lua_ls.enable = true; nil_ls.enable = true; @@ -89,6 +91,7 @@ }; # lsp-format.enable = true; lsp-lines.enable = true; + markview.enable = true; neo-tree.enable = true; notify.enable = true; nix.enable = true; @@ -106,10 +109,32 @@ tmux-navigator.enable = true; todo-comments.enable = true; treesitter.enable = true; + trim = { + enable = true; + settings = { + highlight = true; + trim_on_write = false; + }; + }; trouble.enable = true; ts-autotag.enable = true; web-devicons.enable = true; which-key.enable = true; }; + + # extraPlugins = [(pkgs.vimUtils.buildVimPlugin { + # name = "vim-lumen"; + # src = pkgs.fetchFromGitHub { + # owner = "f-person"; + # repo = "auto-dark-mode.nvim"; + # rev = "4531f8b2b09ed8f0b8875a706419f9cecda1d969"; + # hash = "sha256-JPoyRRwDJ9KOGWnqOEG4VkEX4rJHFhFYV3bwS9F2f9E="; + # }; + # })]; + + # extraConfigLua = '' + # local auto_dark_mode = require('auto-dark-mode') + # auto_dark_mode.setup() + # ''; }; }