From 1cfc1e074a28531b3d21457efe7fd2808a158101 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Thu, 8 Jan 2026 23:36:08 -0700 Subject: [PATCH 01/10] Playing around with window managers. Trying out niri and hyprland. Getting some gnome settings in the config. adding my hardware nix config. moving mac-specific ghostty settings to the mac file --- configuration.pc.nix | 25 ++++------- hardware-configuration.pc.nix | 54 +++++++++++++++++++++++ home-gui.nix | 3 +- home-linux.nix | 83 ++++++++++++++++++++++++++++++++++- home-mac.nix | 3 ++ 5 files changed, 147 insertions(+), 21 deletions(-) create mode 100644 hardware-configuration.pc.nix diff --git a/configuration.pc.nix b/configuration.pc.nix index f2466c4..5947aa2 100644 --- a/configuration.pc.nix +++ b/configuration.pc.nix @@ -134,23 +134,23 @@ description = "Dustin Swan"; extraGroups = [ "networkmanager" "wheel" ]; shell = pkgs.fish; - packages = with pkgs; [ - # thunderbird - ]; + # packages = with pkgs; [ ]; }; programs.fish.enable = true; programs.steam.enable = true; + # programs.xwayland.enable = true; + # programs.hyprland.enable = true; + # programs.niri.enable = true; + # programs.dms-shell.enable = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget + # List packages installed in system profile environment.systemPackages = with pkgs; [ - vim - git - # wget + vim + git ]; # Some programs need SUID wrappers, can be configured further or are @@ -170,21 +170,12 @@ networking.firewall.allowedTCPPorts = [ 24800 # Deskflow 24801 # Deskflow - # 47984 # Sunshine - # 47989 # Sunshine - # 47990 # Sunshine - # 48010 # Sunshine 53317 # LocalSend ]; networking.firewall.allowedUDPPorts = [ 24800 # Deskflow 24801 # Deskflow - # 47998 # Sunshine - # 47999 # Sunshine - # 48000 # Sunshine - # 48002 # Sunshine - # 48010 # Sunshine 53317 # LocalSend ]; # Or disable the firewall altogether. diff --git a/hardware-configuration.pc.nix b/hardware-configuration.pc.nix new file mode 100644 index 0000000..8d7137e --- /dev/null +++ b/hardware-configuration.pc.nix @@ -0,0 +1,54 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + # Trying to get suspend working.. + # boot.kernelParams = [ "processor.max_cstate=1" ]; + boot.kernelParams = [ + # "mem_sleep_default=deep" # forces S3 suspend instead of s2idle + # "processor.max_cstate=5" # prevents CPU from going into deep C-states that break resume + # "amd_iommu=off" # optional, can help on some ASUS boards + "btusb.enable_autosuspend=0" + "usbcore.autosuspend=-1" + "btmtk.disable_sco_esco=Y" + ]; + boot.kernelModules = [ "kvm-amd" "btusb" "btmtk" ]; + + fileSystems."/" = + { device = "/dev/mapper/luks-78910c3e-3aec-4122-af7b-8a6e55005f1b"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-78910c3e-3aec-4122-af7b-8a6e55005f1b".device = "/dev/disk/by-uuid/78910c3e-3aec-4122-af7b-8a6e55005f1b"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B0C0-690A"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # Trying to get Bluetooth working.. + boot.kernelPackages = pkgs.linuxPackages_latest; + hardware.enableRedistributableFirmware = true; + hardware.firmware = with pkgs; [ + linux-firmware + ]; + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + # services.blueman.enable = true; +} diff --git a/home-gui.nix b/home-gui.nix index 8eb44f3..9d4125a 100644 --- a/home-gui.nix +++ b/home-gui.nix @@ -24,11 +24,10 @@ programs.ghostty = { enable = true; installBatSyntax = false; - package = pkgs.ghostty-bin; settings = { font-family = "Iosevka NFM"; - font-size = 16; + font-size = 12; font-thicken = true; # theme = "dark:catppuccin-mocha,light:catppuccin-latte"; # TODO: waiting on all cli apps to handle auto switching too theme = "catppuccin-mocha"; diff --git a/home-linux.nix b/home-linux.nix index e6335ec..545d566 100644 --- a/home-linux.nix +++ b/home-linux.nix @@ -6,18 +6,59 @@ home.packages = with pkgs; [ # retroarch gimp blender brave - ghostty + # ghostty bitwarden-desktop nerd-fonts.iosevka high-tide tidal-hifi deskflow sunshine + # steam # added as a system package, so it actually works + # wl-clipboard # For Wayland clipboard (wl-copy, wl-paste) ]; - # home.keyboard.options = [ "ctrl:nocaps" "compose:ralt" ]; + programs.gnome-shell = { + enable = true; + extensions = with pkgs.gnomeExtensions; [ + { package = caffeine; } + { package = vitals; } + { package = appindicator; } + { package = syncthing-indicator; } + { package = blur-my-shell; } + { package = media-controls; } + ]; + }; + + dconf.settings = { + # Custom keybinding for Vicinae + "org/gnome/settings-daemon/plugins/media-keys" = { + custom-keybindings = [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + ]; + }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + name = "Vicinae"; + command = "vicinae toggle"; + binding = "space"; + }; + + # Extension settings + "org/gnome/shell/extensions/vitals" = { + show-gpu = true; + }; + "org/gnome/shell/extensions/caffeine" = { + show-indicator = "always"; + }; + "org/gnome/shell/extensions/blur-my-shell" = { + settings-version = 2; + }; + }; programs.vicinae = { enable = true; + systemd = { + enable = true; + autoStart = true; + }; }; services.syncthing = { @@ -34,5 +75,43 @@ pinentry.package = pkgs.pinentry-all; }; + # Niri config - imported from separate file + # xdg.configFile."niri/config.kdl".source = ./niri-config.kdl; + + # wayland.windowManager.hyprland = { + # enable = true; + # settings = { + # "$mod" = "ALT"; + # input = { + # kb_layout = "us"; + # kb_variant = "dvorak"; + # }; + # # general = { + # # gaps_in = 0; + # # gaps_out = 0; + # # border_size = 2; + # # "col.active_border" = "rgba(89b4faaa)"; # Example color + # # "col.inactive_border" = "rgba(303030aa)"; + # # }; + # # decoration = { + # # shadow_offset = "0 5"; + # # "col.shadow" = "rgba(00000099)"; + # # }; + # # bindm = [ # Mouse bindings + # # "$mod, mouse:272, movewindow" + # # "$mod, mouse:273, resizewindow" + # # ]; + # bind = [ # Keyboard bindings + # # "$mod, Q, killactive," + # # "$mod, M, exit," # Exit Hyprland + # # "$mod, E, exec, firefox" # Open Firefox + # "$mod, Enter, exec, ghostty" + # ]; + # exec-once = [ # Run once on startup + # "vicinae server &" + # ]; + # }; + # }; + imports = [ ./home-cli.nix ./home-gui.nix ./home-mail.nix ]; } diff --git a/home-mac.nix b/home-mac.nix index 3529b84..8ab6439 100644 --- a/home-mac.nix +++ b/home-mac.nix @@ -8,6 +8,9 @@ terminal-notifier ]; + programs.ghostty.package = pkgs.ghostty-bin; + programs.ghostty.settings.font-size = 16; + home.file.gpg-agent = { target = ".gnupg/gpg-agent.conf"; text = '' From bd36e83523d94959f4847a6e7305a42545399fdc Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Sat, 10 Jan 2026 16:32:55 -0700 Subject: [PATCH 02/10] Getting syncthing working. Removing ctrl-A key binding for now --- configuration.pc.nix | 2 +- home-linux.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configuration.pc.nix b/configuration.pc.nix index 5947aa2..fc02a8f 100644 --- a/configuration.pc.nix +++ b/configuration.pc.nix @@ -73,7 +73,7 @@ # macOS-style Super/Cmd shortcuts (Dvorak physical positions) meta = { - a = "C-a"; # Cmd+a → select all + # a = "C-a"; # Cmd+a → select all i = "C-i"; # Cmd+c → copy (dvorak 'c' = qwerty 'i') k = "C-k"; # Cmd+t → new tab (dvorak 't' = qwerty 'k') l = "C-l"; # Cmd+n → new window (dvorak 'n' = qwerty 'l') diff --git a/home-linux.nix b/home-linux.nix index 545d566..fadc34a 100644 --- a/home-linux.nix +++ b/home-linux.nix @@ -1,5 +1,9 @@ {pkgs, lib, ... }: +let + secrets = import ./secrets.nix; +in + { home.homeDirectory = "/home/dustinswan"; @@ -63,6 +67,22 @@ services.syncthing = { enable = true; + settings = { + devices = { + "Laptop" = { id = secrets.syncthing.laptop; }; + "Phone" = { id = secrets.syncthing.phone; }; + }; + folders = { + "Camera" = { + path = "~/Camera"; + devices = [ "Laptop" "Phone" ]; + }; + "Sync" = { + path = "~/Sync"; + devices = [ "Laptop" "Phone" ]; + }; + }; + }; }; services.gpg-agent = { From 72b6cc0d4bc84518f4357748ba41e3f1fd8bf592 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Tue, 13 Jan 2026 17:51:50 -0700 Subject: [PATCH 03/10] mail, contacts, pass, linux and mac mbsync and vdirsyncer services, adding Passwords for these services to pass and syncthing, upping gpg agent timeout to infinity.. --- home-cli.nix | 7 +++++++ home-gui.nix | 36 ++++++++++++++++++------------------ home-linux.nix | 22 ++++++++++++++++++---- home-mac.nix | 24 ++++++++++++++++++++++-- home-mail.nix | 25 +++++++++++++++++++++++-- 5 files changed, 88 insertions(+), 26 deletions(-) diff --git a/home-cli.nix b/home-cli.nix index 27d0ec7..5bffc77 100644 --- a/home-cli.nix +++ b/home-cli.nix @@ -245,6 +245,13 @@ in programs.gpg.enable = true; + programs.password-store = { + enable = true; + settings = { + PASSWORD_STORE_DIR = "$HOME/.password-store"; + }; + }; + programs.keychain = { enable = true; keys = [ "id_rsa" "id_rsa_mr" "2B3A6377" ]; diff --git a/home-gui.nix b/home-gui.nix index 9d4125a..886f192 100644 --- a/home-gui.nix +++ b/home-gui.nix @@ -42,22 +42,22 @@ }; }; - programs.zed-editor = { - enable = true; - userSettings = { - vim_mode = true; - theme = { - mode = "system"; - light = "Catppuccin Latte"; - dark = "Catppuccin Frappé"; - }; - buffer_font_size = 16; - buffer_font_family = "Iosevka Nerd Font Mono"; - vim = { - enable_vim_sneak = true; - use_smartcase_find = true; - }; - format_on_save = "off"; - }; - }; + # programs.zed-editor = { + # enable = true; + # userSettings = { + # vim_mode = true; + # theme = { + # mode = "system"; + # light = "Catppuccin Latte"; + # dark = "Catppuccin Frappé"; + # }; + # buffer_font_size = 16; + # buffer_font_family = "Iosevka Nerd Font Mono"; + # vim = { + # enable_vim_sneak = true; + # use_smartcase_find = true; + # }; + # format_on_save = "off"; + # }; + # }; } diff --git a/home-linux.nix b/home-linux.nix index fadc34a..ff8f1e4 100644 --- a/home-linux.nix +++ b/home-linux.nix @@ -81,6 +81,10 @@ in path = "~/Sync"; devices = [ "Laptop" "Phone" ]; }; + "Passwords" = { + path = "~/.password-store"; + devices = [ "Laptop" ]; # just Mac, not phone + }; }; }; }; @@ -88,13 +92,23 @@ in services.gpg-agent = { enable = true; enableSshSupport = true; - defaultCacheTtl = 86400; - maxCacheTtl = 86400; - defaultCacheTtlSsh = 86400; - maxCacheTtlSsh = 86400; + defaultCacheTtl = 34560000; + maxCacheTtl = 34560000; + defaultCacheTtlSsh = 34560000; + maxCacheTtlSsh = 34560000; pinentry.package = pkgs.pinentry-all; }; + services.mbsync = { + enable = true; + frequency = "*:0/5"; # every 5 minutes + }; + + services.vdirsyncer = { + enable = true; + frequency = "*:0/15"; # every 15 minutes + }; + # Niri config - imported from separate file # xdg.configFile."niri/config.kdl".source = ./niri-config.kdl; diff --git a/home-mac.nix b/home-mac.nix index 8ab6439..b28c8ba 100644 --- a/home-mac.nix +++ b/home-mac.nix @@ -15,11 +15,31 @@ target = ".gnupg/gpg-agent.conf"; text = '' pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac - default-cache-ttl 86400 - max-cache-ttl 86400 + default-cache-ttl 34560000 + max-cache-ttl 34560000 ''; }; + launchd.agents.mbsync = { + enable = true; + config = { + ProgramArguments = [ "${pkgs.isync}/bin/mbsync" "-a" ]; + StartInterval = 300; # every 5 minutes + StandardOutPath = "/tmp/mbsync.log"; + StandardErrorPath = "/tmp/mbsync.err"; + }; + }; + + launchd.agents.vdirsyncer = { + enable = true; + config = { + ProgramArguments = [ "${pkgs.vdirsyncer}/bin/vdirsyncer" "sync" ]; + StartInterval = 900; # every 15 minutes + StandardOutPath = "/tmp/vdirsyncer.log"; + StandardErrorPath = "/tmp/vdirsyncer.err"; + }; + }; + # https://codeberg.org/adamcstephens/dotfiles/src/commit/e14f35f6e9a9cb9174016948c512c0db364e0dec/apps/fish/init.fish programs.fish.shellInit = '' fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" diff --git a/home-mail.nix b/home-mail.nix index 24ce671..df56c52 100644 --- a/home-mail.nix +++ b/home-mail.nix @@ -5,6 +5,7 @@ programs.msmtp.enable = true; programs.himalaya.enable = true; programs.vdirsyncer.enable = true; + programs.khard.enable = true; programs.aerc = { enable = true; extraConfig.general.unsafe-accounts-conf = true; @@ -32,7 +33,7 @@ signByDefault = true; key = "AD11750151C10881970BD943AB49BD6B2B3A6377"; }; - passwordCommand = "gpg -dq ${builtins.getEnv "HOME"}/.dustinswan@fastmail.com-password.gpg"; + passwordCommand = "pass show email/fastmail"; mbsync = { enable = true; create = "maildir"; @@ -69,13 +70,33 @@ }; primary = true; remote = { - passwordCommand = ["~/dotfiles/bin/decrypt-password" "dustinswan@fastmail.com"]; + passwordCommand = ["pass" "show" "email/fastmail"]; type = "caldav"; url = "https://caldav.fastmail.com/dav/"; userName = "dustinswan@fastmail.com"; }; vdirsyncer = { enable = true; + collections = ["from a" "from b"]; + }; + }; + }; + }; + + accounts.contact = { + basePath = "Contacts"; + accounts = { + FastMail = { + khard.enable = true; + remote = { + passwordCommand = ["pass" "show" "email/fastmail"]; + type = "carddav"; + url = "https://carddav.fastmail.com/dav/"; + userName = "dustinswan@fastmail.com"; + }; + vdirsyncer = { + enable = true; + collections = ["from a" "from b"]; }; }; }; From 0b5f35d274c1843717c55d1c83f3c56bde614143 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Tue, 13 Jan 2026 17:52:11 -0700 Subject: [PATCH 04/10] oops uncommenting out zed --- home-gui.nix | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/home-gui.nix b/home-gui.nix index 886f192..9d4125a 100644 --- a/home-gui.nix +++ b/home-gui.nix @@ -42,22 +42,22 @@ }; }; - # programs.zed-editor = { - # enable = true; - # userSettings = { - # vim_mode = true; - # theme = { - # mode = "system"; - # light = "Catppuccin Latte"; - # dark = "Catppuccin Frappé"; - # }; - # buffer_font_size = 16; - # buffer_font_family = "Iosevka Nerd Font Mono"; - # vim = { - # enable_vim_sneak = true; - # use_smartcase_find = true; - # }; - # format_on_save = "off"; - # }; - # }; + programs.zed-editor = { + enable = true; + userSettings = { + vim_mode = true; + theme = { + mode = "system"; + light = "Catppuccin Latte"; + dark = "Catppuccin Frappé"; + }; + buffer_font_size = 16; + buffer_font_family = "Iosevka Nerd Font Mono"; + vim = { + enable_vim_sneak = true; + use_smartcase_find = true; + }; + format_on_save = "off"; + }; + }; } From 8cf5f022a54bcdfce501d6827c29704e9cece9cc Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Wed, 14 Jan 2026 10:45:25 -0700 Subject: [PATCH 05/10] imapnotify. aerc settings. other misc mail stuff --- home-linux.nix | 2 +- home-mac.nix | 15 ++++++++++++++- home-mail.nix | 37 +++++++++++++++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/home-linux.nix b/home-linux.nix index ff8f1e4..2fbb6fd 100644 --- a/home-linux.nix +++ b/home-linux.nix @@ -101,7 +101,7 @@ in services.mbsync = { enable = true; - frequency = "*:0/5"; # every 5 minutes + frequency = "*:0/15"; # every 15 minutes }; services.vdirsyncer = { diff --git a/home-mac.nix b/home-mac.nix index b28c8ba..751fe30 100644 --- a/home-mac.nix +++ b/home-mac.nix @@ -20,13 +20,23 @@ ''; }; + services.imapnotify.enable = true; + + # Add PATH to imapnotify service so it can find pass + launchd.agents.imapnotify-FastMail.config.EnvironmentVariables = { + PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin"; + }; + launchd.agents.mbsync = { enable = true; config = { ProgramArguments = [ "${pkgs.isync}/bin/mbsync" "-a" ]; - StartInterval = 300; # every 5 minutes + StartInterval = 900; # every 15 minutes StandardOutPath = "/tmp/mbsync.log"; StandardErrorPath = "/tmp/mbsync.err"; + EnvironmentVariables = { + PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin"; + }; }; }; @@ -37,6 +47,9 @@ StartInterval = 900; # every 15 minutes StandardOutPath = "/tmp/vdirsyncer.log"; StandardErrorPath = "/tmp/vdirsyncer.err"; + EnvironmentVariables = { + PATH = "${pkgs.pass}/bin:${pkgs.gnupg}/bin:/usr/bin:/bin"; + }; }; }; diff --git a/home-mail.nix b/home-mail.nix index df56c52..b03c7e3 100644 --- a/home-mail.nix +++ b/home-mail.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs.mbsync.enable = true; @@ -6,9 +6,32 @@ programs.himalaya.enable = true; programs.vdirsyncer.enable = true; programs.khard.enable = true; + programs.notmuch = { + enable = true; + new = { + tags = [ "new" ]; + }; + hooks = { + preNew = "mbsync -a"; + }; + }; + + accounts.email.accounts.FastMail.notmuch.enable = true; programs.aerc = { enable = true; - extraConfig.general.unsafe-accounts-conf = true; + extraConfig = { + general.unsafe-accounts-conf = true; + ui = { + mouse-enabled = true; + threading-enabled = true; + }; + compose = { + address-book-cmd = "khard email --parsable '%s'"; + }; + filters = { + "text/html" = "${pkgs.w3m}/bin/w3m -T text/html -cols $(tput cols) -dump -o display_image=false -o display_link_number=true"; + }; + }; }; accounts.email = { @@ -39,6 +62,16 @@ create = "maildir"; expunge = "maildir"; }; + imapnotify = { + enable = true; + boxes = [ "INBOX" ]; + onNotify = "${pkgs.isync}/bin/mbsync FastMail:INBOX"; + onNotifyPost = let + notifyCmd = if pkgs.stdenv.isDarwin + then "${pkgs.terminal-notifier}/bin/terminal-notifier -title 'New Mail' -message 'FastMail INBOX' -sound default" + else "${pkgs.libnotify}/bin/notify-send 'New Mail' 'FastMail INBOX'"; + in notifyCmd; + }; msmtp.enable = true; aerc.enable = true; himalaya = { From 1f391e674794f7af1ca64e081ca6ee5c356b4f4f Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Fri, 16 Jan 2026 09:29:05 -0700 Subject: [PATCH 06/10] sioyek, and more aerc config --- home-gui.nix | 2 ++ home-mail.nix | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/home-gui.nix b/home-gui.nix index 9d4125a..c41b663 100644 --- a/home-gui.nix +++ b/home-gui.nix @@ -7,6 +7,8 @@ localsend ]; + programs.sioyek.enable = true; + programs.halloy = { enable = true; settings = { diff --git a/home-mail.nix b/home-mail.nix index b03c7e3..d955674 100644 --- a/home-mail.nix +++ b/home-mail.nix @@ -1,4 +1,9 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: + +let + # Cross-platform opener command + openCmd = if pkgs.stdenv.isDarwin then "open" else "${pkgs.xdg-utils}/bin/xdg-open"; +in { programs.mbsync.enable = true; @@ -28,9 +33,19 @@ compose = { address-book-cmd = "khard email --parsable '%s'"; }; + # viewer = { + # alternatives = "text/html,text/plain"; + # }; filters = { + "text/plain" = "cat"; "text/html" = "${pkgs.w3m}/bin/w3m -T text/html -cols $(tput cols) -dump -o display_image=false -o display_link_number=true"; }; + openers = { + "text/html" = "${openCmd}"; + "text/plain" = "less -R"; + "application/pdf" = "${openCmd}"; + "image/*" = "${openCmd}"; + }; }; }; From 81db7e0703f55a3a9671642a70b2d061a4534af1 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Sat, 17 Jan 2026 12:42:51 -0700 Subject: [PATCH 07/10] Changing my mind yet again on these mac keybindings in linux. adding this Desktop device to syncthing --- configuration.pc.nix | 42 +++++++++++++++++++++--------------------- home-linux.nix | 4 +++- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/configuration.pc.nix b/configuration.pc.nix index fc02a8f..212befe 100644 --- a/configuration.pc.nix +++ b/configuration.pc.nix @@ -62,28 +62,28 @@ # Emacs bindings (Dvorak physical positions) # Use Alt-Backspace for delete-word (works everywhere natively) - control = { - a = "home"; # C-a → Home - d = "end"; # C-e → End (dvorak 'e' = qwerty 'd') - r = "up"; # C-p → Up (dvorak 'p' = qwerty 'r') - l = "down"; # C-n → Down (dvorak 'n' = qwerty 'l') - j = "backspace"; # C-h → Backspace (dvorak 'h' = qwerty 'j') - m = "enter"; # C-m → Enter - }; + # control = { + # # a = "home"; # C-a → Home + # d = "end"; # C-e → End (dvorak 'e' = qwerty 'd') + # r = "up"; # C-p → Up (dvorak 'p' = qwerty 'r') + # l = "down"; # C-n → Down (dvorak 'n' = qwerty 'l') + # j = "backspace"; # C-h → Backspace (dvorak 'h' = qwerty 'j') + # m = "enter"; # C-m → Enter + # }; - # macOS-style Super/Cmd shortcuts (Dvorak physical positions) - meta = { - # a = "C-a"; # Cmd+a → select all - i = "C-i"; # Cmd+c → copy (dvorak 'c' = qwerty 'i') - k = "C-k"; # Cmd+t → new tab (dvorak 't' = qwerty 'k') - l = "C-l"; # Cmd+n → new window (dvorak 'n' = qwerty 'l') - comma = "C-comma"; # Cmd+w → close tab (dvorak 'w' = qwerty ',') - period = "C-period"; # Cmd+v → paste (dvorak 'v' = qwerty '.') - semicolon = "C-semicolon"; # Cmd+s → save (dvorak 's' = qwerty ';') - slash = "C-slash"; # Cmd+z → undo (dvorak 'z' = qwerty '/') - x = "C-x"; # Cmd+q → quit (dvorak 'q' = qwerty 'x') - b = "C-b"; # Cmd+x → cut (dvorak 'x' = qwerty 'b') - }; + # # macOS-style Super/Cmd shortcuts (Dvorak physical positions) + # meta = { + # # a = "C-a"; # Cmd+a → select all + # i = "C-i"; # Cmd+c → copy (dvorak 'c' = qwerty 'i') + # k = "C-k"; # Cmd+t → new tab (dvorak 't' = qwerty 'k') + # l = "C-l"; # Cmd+n → new window (dvorak 'n' = qwerty 'l') + # comma = "C-comma"; # Cmd+w → close tab (dvorak 'w' = qwerty ',') + # period = "C-period"; # Cmd+v → paste (dvorak 'v' = qwerty '.') + # semicolon = "C-semicolon"; # Cmd+s → save (dvorak 's' = qwerty ';') + # slash = "C-slash"; # Cmd+z → undo (dvorak 'z' = qwerty '/') + # x = "C-x"; # Cmd+q → quit (dvorak 'q' = qwerty 'x') + # b = "C-b"; # Cmd+x → cut (dvorak 'x' = qwerty 'b') + # }; }; }; }; diff --git a/home-linux.nix b/home-linux.nix index 2fbb6fd..a7447ae 100644 --- a/home-linux.nix +++ b/home-linux.nix @@ -69,11 +69,13 @@ in enable = true; settings = { devices = { + "Desktop" = { id = secrets.syncthing.desktop; }; "Laptop" = { id = secrets.syncthing.laptop; }; "Phone" = { id = secrets.syncthing.phone; }; }; folders = { "Camera" = { + id = "sm-n950u-photos"; path = "~/Camera"; devices = [ "Laptop" "Phone" ]; }; @@ -83,7 +85,7 @@ in }; "Passwords" = { path = "~/.password-store"; - devices = [ "Laptop" ]; # just Mac, not phone + devices = [ "Laptop" ]; }; }; }; From 0d7c4df7ab1849810cca6312b95a4a0c78c41a42 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Fri, 6 Feb 2026 16:25:55 -0700 Subject: [PATCH 08/10] Fixing himalaya. removing markview nvim plugin. adding xx for Trouble --- home-cli.nix | 4 ++-- home-mail.nix | 9 ++++----- home-nvim.nix | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/home-cli.nix b/home-cli.nix index 5bffc77..7fd475b 100644 --- a/home-cli.nix +++ b/home-cli.nix @@ -32,14 +32,14 @@ in poppler-utils # pdftotext xan # e.g. xan slice 3,2 file.csv | xan behead | xan view -An; see also: csvi doxx # read docx files - sqlit-tui # see also: harlequin; lazysql; gobang; dblab + sqlit-tui # see also: pam; harlequin; lazysql; gobang; dblab # snitch # see also: bandwhich epy # ebook reader. see also: erp; bookokrat; lue # mimic # tts engine, used by epy posting # see also: httpie, yapi, sled, Yaak (GUI), Bruno (GUI) croc magic-wormhole # transfer files # calcure # calendar cli app, can point to ics files or URL - dust duf dua # disk usage + dust duf dua # disk usage. see also: cull doggo # dig ddev ngrok diff --git a/home-mail.nix b/home-mail.nix index d955674..398bb96 100644 --- a/home-mail.nix +++ b/home-mail.nix @@ -92,11 +92,10 @@ in himalaya = { enable = true; settings = { - # backend = "imap"; - # maildir.root-dir = "/Users/dustinswan/Mail/FastMail"; - # message.send.backend = "smtp"; - # sent-folder = "Sent"; - # draft-folder = "Drafts"; + backend = { + type = "maildir"; + root-dir = "${builtins.getEnv "HOME"}/Mail/FastMail"; + }; }; }; signature = { diff --git a/home-nvim.nix b/home-nvim.nix index bb0efd7..d8b5444 100644 --- a/home-nvim.nix +++ b/home-nvim.nix @@ -37,6 +37,7 @@ { key = "/"; action = "Tv text"; } { key = "bd"; action = "bdelete"; } { key = "nd"; action = "NoiceDismiss"; } + { key = "xx"; action = "Trouble diagnostics toggle"; } { key = ""; action = "bnext"; } { key = ""; action = "bprev"; } ]; @@ -100,7 +101,7 @@ }; # lsp-format.enable = true; lsp-lines.enable = true; - markview.enable = true; + # markview.enable = true; neo-tree.enable = true; notify.enable = true; nix.enable = true; From e75193acbd0b4d559cb114745c49875d2e454eee Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Wed, 11 Feb 2026 14:07:58 -0700 Subject: [PATCH 09/10] fixing tab completion. fixing flash jumping, adding s/S, and / search labeling. adding CG formatting, 2 spaces --- home-nvim.nix | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/home-nvim.nix b/home-nvim.nix index d8b5444..b4d2350 100644 --- a/home-nvim.nix +++ b/home-nvim.nix @@ -31,6 +31,14 @@ maplocalleader = " "; }; + autoCmd = [ + { + event = [ "BufRead" "BufNewFile" ]; + pattern = [ "*.cg" ]; + command = "setlocal tabstop=2 shiftwidth=2"; + } + ]; + keymaps = [ { key = "e"; action = "Neotree toggle"; } { key = "f"; action = "Tv files"; } @@ -40,6 +48,8 @@ { key = "xx"; action = "Trouble diagnostics toggle"; } { key = ""; action = "bnext"; } { key = ""; action = "bprev"; } + { key = "s"; mode = [ "n" "x" "o" ]; action.__raw = "function() require('flash').jump() end"; options.desc = "Flash"; } + { key = "S"; mode = [ "n" "x" "o" ]; action.__raw = "function() require('flash').treesitter() end"; options.desc = "Flash Treesitter"; } ]; plugins = { @@ -48,11 +58,19 @@ cmp = { enable = true; autoEnableSources = true; - settings.sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } - ]; + settings = { + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + mapping = { + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.confirm({ select = false })"; + "" = "cmp.mapping.abort()"; + }; + }; }; cmp-nvim-lsp.enable = true; cmp-buffer.enable = true; @@ -70,7 +88,11 @@ csvview.enable = true; dashboard.enable = true; emmet.enable = true; - flash.enable = true; + flash = { + enable = true; + settings.jump.autojump = true; + settings.modes.search.enabled = true; + }; gitsigns.enable = true; lazygit.enable = true; lint.enable = true; From 243c6008c65429d5dee7e16fe9a2237042ea1a3c Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Thu, 12 Mar 2026 20:20:26 -0600 Subject: [PATCH 10/10] de-catppuccining --- home-cli.nix | 30 ++++++++++++++++++++++-------- home-gui.nix | 40 ++++++++++++++++++++-------------------- home-nvim.nix | 22 ++-------------------- 3 files changed, 44 insertions(+), 48 deletions(-) diff --git a/home-cli.nix b/home-cli.nix index 7fd475b..48a4288 100644 --- a/home-cli.nix +++ b/home-cli.nix @@ -16,7 +16,6 @@ in }; imports = [ - nixvim.homeModules.nixvim ./home-nvim.nix ]; @@ -89,11 +88,6 @@ in xdg.enable = true; - catppuccin = { - enable = true; - flavor = "mocha"; - zed.enable = false; - }; programs.home-manager.enable = true; @@ -117,12 +111,29 @@ in # 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 - fingers # prefix F -> copy/open/edit items on screen by letter + # 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" + + # Status bar - inherits terminal fg/bg so it follows light/dark mode + set -g status-style "bg=default,fg=default" + set -g status-justify centre + set -g status-left "" + set -g status-right "" + set -g window-status-format " #I " + set -g window-status-current-format " #I " + set -g window-status-current-style "bold,reverse" + set -g window-status-style "dim" + + # Pane borders + set -g pane-border-style "fg=brightblack" + set -g pane-active-border-style "fg=white" + + # Messages + set -g message-style "bg=default,fg=default,bold" ''; }; @@ -159,7 +170,10 @@ in programs.nix-search-tv.enable = true; # programs.fzf.enable = true; # used by other apps, tmux, etc. programs.zoxide.enable = true; - programs.bat.enable = true; + programs.bat = { + enable = true; + config.theme = "ansi"; + }; programs.ripgrep.enable = true; programs.ripgrep-all.enable = true; programs.yazi.enable = true; diff --git a/home-gui.nix b/home-gui.nix index c41b663..41e68ae 100644 --- a/home-gui.nix +++ b/home-gui.nix @@ -31,35 +31,35 @@ font-family = "Iosevka NFM"; font-size = 12; font-thicken = true; - # theme = "dark:catppuccin-mocha,light:catppuccin-latte"; # TODO: waiting on all cli apps to handle auto switching too - theme = "catppuccin-mocha"; + theme = "dark:One Half Dark,light:One Half Light"; background-opacity = 0.95; background-blur-radius = 15; window-padding-x = 12; window-padding-y = 8; window-padding-balance = true; macos-titlebar-style = "tabs"; + window-theme = "auto"; macos-option-as-alt = "left"; copy-on-select = "clipboard"; }; }; - programs.zed-editor = { - enable = true; - userSettings = { - vim_mode = true; - theme = { - mode = "system"; - light = "Catppuccin Latte"; - dark = "Catppuccin Frappé"; - }; - buffer_font_size = 16; - buffer_font_family = "Iosevka Nerd Font Mono"; - vim = { - enable_vim_sneak = true; - use_smartcase_find = true; - }; - format_on_save = "off"; - }; - }; + # programs.zed-editor = { + # enable = true; + # userSettings = { + # vim_mode = true; + # theme = { + # mode = "system"; + # light = "Catppuccin Latte"; + # dark = "Catppuccin Frappé"; + # }; + # buffer_font_size = 16; + # buffer_font_family = "Iosevka Nerd Font Mono"; + # vim = { + # enable_vim_sneak = true; + # use_smartcase_find = true; + # }; + # format_on_save = "off"; + # }; + # }; } diff --git a/home-nvim.nix b/home-nvim.nix index b4d2350..ebc3284 100644 --- a/home-nvim.nix +++ b/home-nvim.nix @@ -8,10 +8,6 @@ withNodeJs = true; withRuby = true; - colorschemes.catppuccin.enable = true; - colorschemes.catppuccin.settings.transparent_background = true; - colorschemes.catppuccin.settings.flavour = "auto"; - opts = { number = true; ignorecase = true; @@ -91,7 +87,7 @@ flash = { enable = true; settings.jump.autojump = true; - settings.modes.search.enabled = true; + # settings.modes.search.enabled = true; }; gitsigns.enable = true; lazygit.enable = true; @@ -144,6 +140,7 @@ settings = { highlight = true; trim_on_write = false; + ft_blocklist = [ "dashboard" ]; }; }; trouble.enable = true; @@ -152,20 +149,5 @@ 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() - # ''; }; }