From 108bc9517b04869355dbfba26ab050f032d44d11 Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Sat, 23 Aug 2025 20:17:47 -0700 Subject: [PATCH 01/14] update fish config --- users/fish/cattop/configuration.nix | 12 ++++++++++-- users/fish/vim.nix | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index 66a59ef768a47e068342959655076b7c5807933f..fa420bb270358ab6bb1c7fd1846638db7e024c6c 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -93,9 +93,17 @@ fish ]; }; - + programs.git = { + enable = true; + extraConfig = { + push = { + autoSetupRemote = true; + }; + }; + }; programs.firefox.enable = true; - programs.neovim.defaultEditor.enable = true; + programs.neovim.enable = true; + #programs.neovim.defaultEditor.enable = true; # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). diff --git a/users/fish/vim.nix b/users/fish/vim.nix index 52c14b8cbb66a4eb826a85e044e9a453819720d1..80d61f494d953950672d228d2d0e6a78e541999d 100644 --- a/users/fish/vim.nix +++ b/users/fish/vim.nix @@ -1,3 +1,4 @@ { ... }: { + vim.languages.svelte.enable = true; } -- 2.54.0 From cf37c5191b1545f4832c9d599cc4c03ded15496f Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Sat, 30 Aug 2025 22:14:23 -0700 Subject: [PATCH 02/14] Enabled fish --- users/fish/cattop/configuration.nix | 13 ++++++++----- users/fish/cattop/home.nix | 23 +++++++++++++---------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index fa420bb270358ab6bb1c7fd1846638db7e024c6c..78af13bf3caa7a42e46288a964b0256d2ea453d5 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -81,6 +81,7 @@ # Define a user account. Don't forget to set a password with ‘passwd’. users.users.fish = { isNormalUser = true; + shell = pkgs.fish; extraGroups = [ "wheel" # Enable ‘sudo’ for the user. "dialout" # Enable serial access for the user. @@ -95,12 +96,13 @@ }; programs.git = { enable = true; - extraConfig = { - push = { - autoSetupRemote = true; - }; - }; + # extraConfig = { + # push = { + # autoSetupRemote = true; + # }; + # }; }; + programs.firefox.enable = true; programs.neovim.enable = true; #programs.neovim.defaultEditor.enable = true; @@ -114,6 +116,7 @@ # Some programs need SUID wrappers, can be configured further or are # started in user sessions. + programs.fish.enable = true; programs.mtr.enable = true; programs.gnupg.agent = { enable = true; diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index b6c57b95e5cb64e35358d29a20134960a543f379..1ca54a9b2c1c20c735e65d97826151cc3ebecc1d 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -1,13 +1,4 @@ -{ - inputs, - config, - pkgs, - lib, - userSettings, - systemSettings, - ... -}: - +{ pkgs, ... }: { home = { stateVersion = "23.05"; # Don't change this unless upgrading Home Manager versions @@ -54,6 +45,7 @@ programs = { btop.enable = true; + fish.enable = true; hyfetch.enable = true; gh = { @@ -61,6 +53,17 @@ gitCredentialHelper.enable = true; }; + ghostty = { + enable = true; + shader = "cursor-smear-black.glsl"; + settings = { + theme = "citruszest"; + adjust-cursor-thickness = 1; + background-opacity = 0.9; + background-blur = true; + }; + }; + # Uncomment if you want to use MangoHud system-wide # mangohud.enable = true; }; -- 2.54.0 From 852b4fdd53e8d4b18f02ccb1f72f66f1c4d4ee07 Mon Sep 17 00:00:00 2001 From: Julia <77413091+JulianBarbera@users.noreply.github.com> Date: Sun, 31 Aug 2025 16:54:23 -0700 Subject: [PATCH 03/14] Added gnome packages to exclude --- users/fish/cattop/configuration.nix | 85 +++++++++++++---------------- users/fish/cattop/home.nix | 25 +++------ users/fish/user.nix | 2 +- 3 files changed, 48 insertions(+), 64 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index 78af13bf3caa7a42e46288a964b0256d2ea453d5..b93180c6c3305e5f391db8139de7383536e597be 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -7,65 +7,66 @@ }: { imports = [ - # Include the results of the hardware scan. ./hardware-configuration.nix ]; - # Use the systemd-boot EFI boot loader. boot.loader.efi.canTouchEfiVariables = true; - # networking.hostName = "nixos"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.hostName = "cattop"; # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. # Set your time zone. - # time.timeZone = "Europe/Amsterdam"; + Time.timeZone = "America/Los_Angeles"; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - # Enable the X11 windowing system. services.xserver.enable = true; - # Enable the GNOME Desktop Environment. services.displayManager.gdm.enable = true; services.desktopManager.gnome.enable = true; environment.gnome.excludePackages = ( with pkgs; [ - atomix - cheese + adwaita-fonts + adwaita-icon-theme + baobab + decibels epiphany + evince + file-roller geary - gedit + gnome-backgrounds + gnome-calculator + gnome-calendar gnome-characters + gnome-clocks + gnome-connections + gnome-console + gnome-contacts + gnome-disk-utility + gnome-font-viewer + gnome-logs + gnome-maps gnome-music - gnome-photos - gnome-terminal + gnome-shell-extensions + gnome-system-monitor + gnome-screenshot + gnome-text-editor + gnome-themes-extra gnome-tour - hitori - iagno + gnome-user-docs + gnome-weather + loupe + nautilus + orca + seahorse + simple-scan + snapshot + sushi totem - + yelp ] ); - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - # services.printing.enable = true; + services.printing.enable = true; # Enable sound. # services.pulseaudio.enable = true; @@ -78,13 +79,12 @@ # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.fish = { isNormalUser = true; shell = pkgs.fish; extraGroups = [ - "wheel" # Enable ‘sudo’ for the user. - "dialout" # Enable serial access for the user. + "wheel" + "dialout" ]; packages = with pkgs; [ tree @@ -108,14 +108,11 @@ #programs.neovim.defaultEditor.enable = true; # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). environment.systemPackages = with pkgs; [ - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + vim wget ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. programs.fish.enable = true; programs.mtr.enable = true; programs.gnupg.agent = { @@ -128,12 +125,6 @@ # Enable the OpenSSH daemon. # services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index 1ca54a9b2c1c20c735e65d97826151cc3ebecc1d..fee99c66087e20c50a769208497aad0e37d8c6ac 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -6,17 +6,15 @@ packages = with pkgs; [ # General applications ghostty - stremio - julia - calibre - mpv signal-desktop - python3 - gh spotify + inputs.zen-browser.packages.x86_64-linux.default + legcord # Gaming (prismlauncher.override { gamemodeSupport = true; }) + bsdgames + space-cadet-pinball # System & desktop tools wofi @@ -28,18 +26,16 @@ ethtool grub2 efibootmgr - distrobox pqiv + imagemagick # Dev tools - legcord hyfetch - kicad + python3 + gh + cmake # Unsorted - ripgrep - busybox - imagemagick ]; }; @@ -59,12 +55,9 @@ settings = { theme = "citruszest"; adjust-cursor-thickness = 1; - background-opacity = 0.9; + background-opacity = 0.95; background-blur = true; }; }; - - # Uncomment if you want to use MangoHud system-wide - # mangohud.enable = true; }; } diff --git a/users/fish/user.nix b/users/fish/user.nix index 5d8338389ba3f2abd622dc14d693e60fb71c5156..ed9ab2ccd80dd7db9b1a9d6d20c536e028b63c49 100644 --- a/users/fish/user.nix +++ b/users/fish/user.nix @@ -4,7 +4,7 @@ rec { email = "77413091+JulianBarbera@users.noreply.github.com"; # email (used for certain configurations) dotfilesDir = "~/config"; # absolute path of the local repo theme = "catppuccin-mocha"; # name of theme that stylix will use - browser = "firefox"; # Default browser; must select one from ./user/app/browser/ + browser = "zen-browser"; # Default browser; must select one from ./user/app/browser/ term = "ghostty"; # Default terminal command; font = "iosevka"; # Selected font editor = "neovim"; # Default editor; -- 2.54.0 From 27868a5a06e85240e79662164b9be89c1e683fdc Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sun, 31 Aug 2025 21:30:48 -0700 Subject: [PATCH 04/14] chloe: change ghostty theme --- users/clover/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/clover/home.nix b/users/clover/home.nix index d256187bcf86ecfef122a919c5a267b79cf1739d..5ebf066d1c06a405cd19d06fca99618d6a85738f 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -49,7 +49,7 @@ in shader = "cursor-smear-black.glsl"; package = null; settings = { - theme = "light:catppuccin-latte,dark:catppuccin-macchiato"; + theme = "light:farmhouse-light,dark:ChallengerDeep"; font-family = "AT Name Mono"; adjust-cursor-thickness = 1; background-opacity = 0.9; -- 2.54.0 From 45482ab529279dbbd47b87a9603ebd2e129f01ff Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sun, 31 Aug 2025 21:30:48 -0700 Subject: [PATCH 05/14] add jujutsu --- modules/home/default.nix | 22 ++++++++++++++++++++++ modules/neovim/default.nix | 1 + users/clover/home.nix | 2 ++ 3 files changed, 25 insertions(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index 09ddaee898e5e9bfc907f4e79de87ce51af4f6ad..38811b880fb60af75ae564d2ba787a1a7c7f2dd7 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -77,6 +77,7 @@ in # ViM and Neovim ".*.swp" ".nvimlog" + ".jj" ]; }; @@ -134,6 +135,27 @@ in autocd = true; history.size = 10000; }; + jujutsu = { + settings = { + user = { + email = config.programs.git.userEmail; + name = config.programs.git.userName; + }; + signing = { + behavior = "own"; + backend = "ssh"; + key = "~/.ssh/id_ed25519.pub"; + }; + git = { + sign-on-push = true; + push-new-bookmarks = true; + }; + ui = { + default-command = "log"; + pager = "${pkgs.bat}/bin/bat --style=plain"; + }; + }; + }; ghostty.settings.custom-shader = lib.mkIf ( cfg.ghostty.shader != null diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index f982fab390bef61b56284ceb5d8d92281adfc658..6a31c91a848672da9814e0b6bd9e5c5ad48a29f8 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -131,6 +131,7 @@ hide_dotfiles = false; never_show = [ ".git" + ".jj" ".DS_Store" # macOS "thumbs.db" # Windows ]; diff --git a/users/clover/home.nix b/users/clover/home.nix index 5ebf066d1c06a405cd19d06fca99618d6a85738f..de5840b081b97253c5991ee78fac02dba651a767 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -81,6 +81,8 @@ in # use a git-specific email git.userEmail = "git@paperclover.net"; + jujutsu.enable = true; + ssh = { enable = true; matchBlocks = rec { -- 2.54.0 From 617dc280cb05d0d59c1e936d93e2d7bbe97cab65 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 1 Sep 2025 12:37:58 -0700 Subject: [PATCH 06/14] clover: remove chromium from laptop installation --- users/clover/paperback/configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/users/clover/paperback/configuration.nix b/users/clover/paperback/configuration.nix index 3d94126693f8ab3136a138d8b013d6491e67fee4..33d6590bbae174414152184a49ac07e49f4204a8 100644 --- a/users/clover/paperback/configuration.nix +++ b/users/clover/paperback/configuration.nix @@ -2,7 +2,6 @@ _: { homebrew = { enable = true; casks = [ - "eloston-chromium" "db-browser-for-sqlite" ]; }; -- 2.54.0 From ab4ae993dcea0f05f4a2236a79370096be97debf Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 1 Sep 2025 12:37:58 -0700 Subject: [PATCH 07/14] clover: configure jujutsu log to look really nice so far, part of my strategy has been tagging incomplete commits with "WIP" and then renaming them once i'm ready to push them. here, the default log revset will just show all WIPs, and the custom display template will very clearly highlight them along with the usual conventional commit stuff. --- modules/home/default.nix | 6 ++ users/clover/home.nix | 185 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 190 insertions(+), 1 deletion(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 38811b880fb60af75ae564d2ba787a1a7c7f2dd7..64fbd631b34421db740a329ea8f752b863bf684d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -152,6 +152,12 @@ in }; ui = { default-command = "log"; + diff-formatter = [ + "${pkgs.difftastic}/bin/difft" + "--color=always" + "$left" + "$right" + ]; pager = "${pkgs.bat}/bin/bat --style=plain"; }; }; diff --git a/users/clover/home.nix b/users/clover/home.nix index de5840b081b97253c5991ee78fac02dba651a767..363ad183b149b7a8458c18ac2840542d48f3782e 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -81,7 +81,190 @@ in # use a git-specific email git.userEmail = "git@paperclover.net"; - jujutsu.enable = true; + jujutsu = { + enable = true; + # my workflow is based on creating changes and editing them. while they + # are in progress the description starts with "WIP: " + settings = rec { + colors = { + bookmark = "green"; + bookmarks = colors.bookmark; + local_bookmarks = colors.bookmarks; + remote_bookmarks = colors.bookmark; + "working_copy bookmark" = "bright green"; + "working_copy bookmarks" = colors."working_copy bookmark"; + "working_copy local_bookmarks" = colors."working_copy bookmark"; + "working_copy remote_bookmarks" = colors."working_copy bookmark"; + + "author" = { + fg = "white"; + bold = false; + italic = true; + }; + "working_copy author" = colors.author; + + desc = { + bold = false; + fg = "bright white"; + }; + description = colors.desc; + cc_wip = { + fg = "bright yellow"; + bold = true; + reverse = true; + }; + cc_header = { + bold = true; + fg = "bright white"; + }; + cc_feat = "green"; + cc_fix = "red"; + cc_hotfix = "red"; + cc_chore = "yellow"; + cc_test = "blue"; + cc_other = "blue"; + cc_scope = { + fg = "cyan"; + bold = false; + italic = true; + }; + + active_marker = { + fg = "bright magenta"; + bold = true; + reverse = true; + }; + conflict_marker = { + fg = "bright red"; + bold = true; + reverse = true; + }; + + timestamp = "bright black"; + commit_id = { + fg = "bright black"; + bold = false; + }; + muted = "bright black"; + }; + ui.graph.style = "square"; + revsets = { + log = "ancestors(description(regex:\"^(WIP:|\\\\s*$)\"), 3) | ancestors(immutable_heads(), 2) | ancestors(visible_heads(), 2)"; + short-prefixes = "(trunk()..@)::"; + }; + templates.log = "hl_wip(self)"; + + template-aliases = { + # log template, highlighting the WIP commits by making everything else faded out + "hl_wip(commit)" = '' + if(commit.root(), format_root_commit(commit), + format_short_commit_header(commit) ++ "\n" ++ + format_commit_description(commit) + ) + ''; + + "format_commit_description(commit)" = '' + label("desc", format_commit_firstline(commit.description().first_line())) ++ + "\n" ++ if( + commit.description().starts_with("WIP:") || commit.current_working_copy(), + commit.description().remove_prefix(commit.description().first_line()).remove_prefix("\n").trim_end() ++ "\n ", + if(commit.description().remove_prefix(commit.description().first_line()).trim().len() > 0, + label("muted", lines_collapsed(commit.description().lines().filter(|x| x.trim().len() > 0).len() - 1)), + " " + ) + ) + ''; + "lines_collapsed(count)" = + ''("[" ++ stringify(count ++ " line" ++ if(count == 1, "", "s")) ++ " collapsed]\n")''; + "format_commit_firstline(line)" = '' + if(line.starts_with("WIP:"), + label("cc_wip", " WIP ") ++ " " ++ format_commit_firstline_a_wip(line.remove_prefix("WIP:").trim()), + format_commit_firstline_a_wip(line) + ) + ''; + "format_commit_firstline_a_wip(line)" = '' + if(line.starts_with("feat:") || line.starts_with("feat("), + label("cc_feat", "feat") ++ format_commit_firstline_a_cc_type(line.remove_prefix("feat")), + if(line.starts_with("fix:") || line.starts_with("fix("), + label("cc_fix", "fix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("fix")), + if(line.starts_with("hotfix:") || line.starts_with("hotfix("), + label("cc_hotfix", "hotfix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("hotfix")), + if(line.starts_with("chore:") || line.starts_with("chore("), + label("cc_chore", "chore") ++ format_commit_firstline_a_cc_type(line.remove_prefix("chore")), + if(line.starts_with("test:") || line.starts_with("test("), + label("cc_other", "test") ++ format_commit_firstline_a_cc_type(line.remove_prefix("test")), + if(line.starts_with("refactor:") || line.starts_with("refactor("), + label("cc_other", "refactor") ++ format_commit_firstline_a_cc_type(line.remove_prefix("refactor")), + if(line.starts_with("perf:") || line.starts_with("perf("), + label("cc_other", "perf") ++ format_commit_firstline_a_cc_type(line.remove_prefix("perf")), + if(line.starts_with("lib:") || line.starts_with("lib("), + label("cc_other", "lib") ++ format_commit_firstline_a_cc_type(line.remove_prefix("lib")), + label("cc_header", line) + )))))))) + ''; + "format_commit_firstline_a_cc_type(rest)" = '' + if(rest.starts_with("(") && rest.contains(")"), + format_firstline_cc_scope(rest, index_of_close_paren(rest)), + format_firstline_a_cc(rest)) + ''; + "format_firstline_cc_scope(rest, index)" = '' + label("cc_scope", rest.substr(0, index)) ++ format_firstline_a_cc(rest.substr(index, rest.len())) + ''; + "format_firstline_a_cc(rest)" = '' + if(rest.starts_with(":"), + label("muted", ":") ++ label("cc_header", rest.remove_prefix(":")), + label("cc_header", rest) + ) + ''; + # sorry! + "index_of_close_paren(line)" = '' + stringify(if(line.substr(1, 2) == ")", "A", + if(line.substr(2, 3) == ")", "AA", + if(line.substr(3, 4) == ")", "AAA", + if(line.substr(4, 5) == ")", "AAAA", + if(line.substr(5, 6) == ")", "AAAAA", + if(line.substr(6, 7) == ")", "AAAAAA", + if(line.substr(7, 8) == ")", "AAAAAAA", + if(line.substr(8, 9) == ")", "AAAAAAAA", + if(line.substr(9, 10) == ")","AAAAAAAAA", + if(line.substr(10, 11) == ")", "AAAAAAAAAA", + if(line.substr(11, 12) == ")", "AAAAAAAAAAA", + if(line.substr(12, 13) == ")", "AAAAAAAAAAAA", + if(line.substr(13, 14) == ")", "AAAAAAAAAAAAA", + if(line.substr(14, 15) == ")", "AAAAAAAAAAAAAA", + if(line.substr(15, 16) == ")", "AAAAAAAAAAAAAAA", + if(line.substr(16, 17) == ")", "AAAAAAAAAAAAAAAA", + if(line.substr(17, 18) == ")", "AAAAAAAAAAAAAAAAA", + if(line.substr(18, 19) == ")", "AAAAAAAAAAAAAAAAAA", + if(line.substr(19, 20) == ")", "AAAAAAAAAAAAAAAAAAA", + if(line.substr(20, 21) == ")", "AAAAAAAAAAAAAAAAAAAA", + "AAAAAAAAAAAAAAAAAAAAA" + ))))))))))))))))))))).len() + 1 + ''; + + "format_short_signature(signature)" = "signature.name()"; + "format_timestamp(timestamp)" = "timestamp.ago()"; + "format_short_commit_header(commit)" = '' + separate(" ", + if(commit.current_working_copy(), label("active_marker", " ACTIVE ")), + if(commit.conflict(), label("conflict_marker", " CONFLICT ")), + format_short_change_id_with_hidden_and_divergent_info(commit), + format_short_signature(commit.author()), + label("muted", "|"), + if(commit.description().trim().len() > 0, label("muted", format_timestamp(commit_timestamp(commit)))), + commit.bookmarks(), + commit.tags(), + commit.working_copies(), + label("muted", "(") ++ + format_short_commit_id(commit.commit_id()) ++ + label("muted", ")"), + if(config("ui.show-cryptographic-signatures").as_boolean(), + format_short_cryptographic_signature(commit.signature())), + ) + ''; + }; + }; + }; ssh = { enable = true; -- 2.54.0 From 5f1d042056d5926ca5f1e98920a2148aacc7adce Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Sun, 7 Sep 2025 22:45:11 -0700 Subject: [PATCH 08/14] Updates for OS reinstall --- users/fish/cattop/configuration.nix | 6 --- users/fish/cattop/hardware-configuration.nix | 48 +++++++------------- users/fish/cattop/home.nix | 4 +- 3 files changed, 18 insertions(+), 40 deletions(-) diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index b93180c6c3305e5f391db8139de7383536e597be..d455b262b7dd5253e88736b7c0d5f55cfb9a5e78 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -15,9 +15,6 @@ networking.hostName = "cattop"; # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - # Set your time zone. - Time.timeZone = "America/Los_Angeles"; - services.xserver.enable = true; services.displayManager.gdm.enable = true; @@ -81,7 +78,6 @@ users.users.fish = { isNormalUser = true; - shell = pkgs.fish; extraGroups = [ "wheel" "dialout" @@ -91,7 +87,6 @@ git nh vim - fish ]; }; programs.git = { @@ -113,7 +108,6 @@ wget ]; - programs.fish.enable = true; programs.mtr.enable = true; programs.gnupg.agent = { enable = true; diff --git a/users/fish/cattop/hardware-configuration.nix b/users/fish/cattop/hardware-configuration.nix index 7e98eeb8a81bcaa008732b48c6b2c13496ca1599..b16ddcb14f7da7960d16b1feb84affeece222af5 100644 --- a/users/fish/cattop/hardware-configuration.nix +++ b/users/fish/cattop/hardware-configuration.nix @@ -1,46 +1,32 @@ # 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, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ - "xhci_pci" - "thunderbolt" - "vmd" - "nvme" - ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/8eb0d6a2-b8cf-4ef2-ba2a-e25a5555b0bc"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/d434c90f-e135-426e-b237-ead2f44e37c6"; + fsType = "ext4"; + }; - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/3B51-4A1C"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" + fileSystems."/boot/EFI" = + { device = "/dev/disk/by-uuid/473A-B8FD"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/e0cac471-0e32-4d5a-bf85-e8f93b304356"; } ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/58ee9d19-292f-49b5-9979-341b42e8e09d"; } - ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index fee99c66087e20c50a769208497aad0e37d8c6ac..6cef84292dabfa59f7a19ca31c11d3c9628e4d73 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -8,12 +8,11 @@ ghostty signal-desktop spotify - inputs.zen-browser.packages.x86_64-linux.default legcord # Gaming (prismlauncher.override { gamemodeSupport = true; }) - bsdgames + #bsdgames space-cadet-pinball # System & desktop tools @@ -41,7 +40,6 @@ programs = { btop.enable = true; - fish.enable = true; hyfetch.enable = true; gh = { -- 2.54.0 From f4817e31485e763cdf2dad6b021895f964033aba Mon Sep 17 00:00:00 2001 From: clover caruso Date: Mon, 1 Sep 2025 12:37:58 -0700 Subject: [PATCH 09/14] clover: configure jujutsu log to look really nice so far, part of my strategy has been tagging incomplete commits with "WIP" and then renaming them once i'm ready to push them. here, the default log revset will just show all WIPs, and the custom display template will very clearly highlight them along with the usual conventional commit stuff. --- modules/home/default.nix | 6 ++ users/clover/home.nix | 187 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 192 insertions(+), 1 deletion(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 38811b880fb60af75ae564d2ba787a1a7c7f2dd7..64fbd631b34421db740a329ea8f752b863bf684d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -152,6 +152,12 @@ in }; ui = { default-command = "log"; + diff-formatter = [ + "${pkgs.difftastic}/bin/difft" + "--color=always" + "$left" + "$right" + ]; pager = "${pkgs.bat}/bin/bat --style=plain"; }; }; diff --git a/users/clover/home.nix b/users/clover/home.nix index de5840b081b97253c5991ee78fac02dba651a767..d8674c7e5fa8fa528ad15e36ffdd837513f16db1 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -81,7 +81,192 @@ in # use a git-specific email git.userEmail = "git@paperclover.net"; - jujutsu.enable = true; + jujutsu = { + enable = true; + # my workflow is based on creating changes and editing them. while they + # are in progress the description starts with "WIP: " + settings = rec { + colors = { + bookmark = "green"; + bookmarks = colors.bookmark; + local_bookmarks = colors.bookmarks; + remote_bookmarks = colors.bookmark; + "working_copy bookmark" = "bright green"; + "working_copy bookmarks" = colors."working_copy bookmark"; + "working_copy local_bookmarks" = colors."working_copy bookmark"; + "working_copy remote_bookmarks" = colors."working_copy bookmark"; + + "author" = { + fg = "white"; + bold = false; + italic = true; + }; + "working_copy author" = colors.author; + + desc = { + bold = false; + fg = "bright white"; + }; + description = colors.desc; + cc_wip = { + fg = "bright yellow"; + bold = true; + reverse = true; + }; + cc_header = { + bold = true; + fg = "bright white"; + }; + cc_feat = "green"; + cc_fix = "red"; + cc_hotfix = "red"; + cc_chore = "yellow"; + cc_test = "blue"; + cc_other = "blue"; + cc_scope = { + fg = "cyan"; + bold = false; + italic = true; + }; + + active_marker = { + fg = "bright magenta"; + bold = true; + reverse = true; + }; + conflict_marker = { + fg = "bright red"; + bold = true; + reverse = true; + }; + + timestamp = "bright black"; + commit_id = { + fg = "bright black"; + bold = false; + }; + muted = "bright black"; + }; + # ui.graph.style = "square"; + revsets = { + log = "ancestors(description(regex:\"^(WIP:|\\\\s*$)\"), 3) | ancestors(immutable_heads(), 2) | ancestors(visible_heads(), 2)"; + short-prefixes = "(trunk()..@)::"; + }; + templates.log = "hl_wip(self)"; + + template-aliases = { + # log template, highlighting the WIP commits by making everything else faded out + "hl_wip(commit)" = '' + if(commit.root(), format_root_commit(commit), + label("__commit__", + format_short_commit_header(commit) ++ "\n" ++ + format_commit_description(commit) + ) + ) + ''; + + "format_commit_description(commit)" = '' + label("desc", format_commit_firstline(commit.description().first_line())) ++ + "\n" ++ if( + commit.description().starts_with("WIP:") || commit.current_working_copy(), + commit.description().remove_prefix(commit.description().first_line()).remove_prefix("\n").trim_end() ++ "\n ", + if(commit.description().remove_prefix(commit.description().first_line()).trim().len() > 0, + label("muted", lines_collapsed(commit.description().lines().filter(|x| x.trim().len() > 0).len() - 1)), + " " + ) + ) + ''; + "lines_collapsed(count)" = + ''("[" ++ stringify(count ++ " line" ++ if(count == 1, "", "s")) ++ " collapsed]\n")''; + "format_commit_firstline(line)" = '' + if(line.starts_with("WIP:"), + label("cc_wip", " WIP ") ++ " " ++ format_commit_firstline_a_wip(line.remove_prefix("WIP:").trim()), + format_commit_firstline_a_wip(line) + ) + ''; + "format_commit_firstline_a_wip(line)" = '' + if(line.starts_with("feat:") || line.starts_with("feat("), + label("cc_feat", "feat") ++ format_commit_firstline_a_cc_type(line.remove_prefix("feat")), + if(line.starts_with("fix:") || line.starts_with("fix("), + label("cc_fix", "fix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("fix")), + if(line.starts_with("hotfix:") || line.starts_with("hotfix("), + label("cc_hotfix", "hotfix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("hotfix")), + if(line.starts_with("chore:") || line.starts_with("chore("), + label("cc_chore", "chore") ++ format_commit_firstline_a_cc_type(line.remove_prefix("chore")), + if(line.starts_with("test:") || line.starts_with("test("), + label("cc_other", "test") ++ format_commit_firstline_a_cc_type(line.remove_prefix("test")), + if(line.starts_with("refactor:") || line.starts_with("refactor("), + label("cc_other", "refactor") ++ format_commit_firstline_a_cc_type(line.remove_prefix("refactor")), + if(line.starts_with("perf:") || line.starts_with("perf("), + label("cc_other", "perf") ++ format_commit_firstline_a_cc_type(line.remove_prefix("perf")), + if(line.starts_with("lib:") || line.starts_with("lib("), + label("cc_other", "lib") ++ format_commit_firstline_a_cc_type(line.remove_prefix("lib")), + label("cc_header", line) + )))))))) + ''; + "format_commit_firstline_a_cc_type(rest)" = '' + if(rest.starts_with("(") && rest.contains(")"), + format_firstline_cc_scope(rest, index_of_close_paren(rest)), + format_firstline_a_cc(rest)) + ''; + "format_firstline_cc_scope(rest, index)" = '' + label("cc_scope", rest.substr(0, index)) ++ format_firstline_a_cc(rest.substr(index, rest.len())) + ''; + "format_firstline_a_cc(rest)" = '' + if(rest.starts_with(":"), + label("muted", ":") ++ label("cc_header", rest.remove_prefix(":")), + label("cc_header", rest) + ) + ''; + # sorry! + "index_of_close_paren(line)" = '' + stringify(if(line.substr(1, 2) == ")", "A", + if(line.substr(2, 3) == ")", "AA", + if(line.substr(3, 4) == ")", "AAA", + if(line.substr(4, 5) == ")", "AAAA", + if(line.substr(5, 6) == ")", "AAAAA", + if(line.substr(6, 7) == ")", "AAAAAA", + if(line.substr(7, 8) == ")", "AAAAAAA", + if(line.substr(8, 9) == ")", "AAAAAAAA", + if(line.substr(9, 10) == ")","AAAAAAAAA", + if(line.substr(10, 11) == ")", "AAAAAAAAAA", + if(line.substr(11, 12) == ")", "AAAAAAAAAAA", + if(line.substr(12, 13) == ")", "AAAAAAAAAAAA", + if(line.substr(13, 14) == ")", "AAAAAAAAAAAAA", + if(line.substr(14, 15) == ")", "AAAAAAAAAAAAAA", + if(line.substr(15, 16) == ")", "AAAAAAAAAAAAAAA", + if(line.substr(16, 17) == ")", "AAAAAAAAAAAAAAAA", + if(line.substr(17, 18) == ")", "AAAAAAAAAAAAAAAAA", + if(line.substr(18, 19) == ")", "AAAAAAAAAAAAAAAAAA", + if(line.substr(19, 20) == ")", "AAAAAAAAAAAAAAAAAAA", + if(line.substr(20, 21) == ")", "AAAAAAAAAAAAAAAAAAAA", + "AAAAAAAAAAAAAAAAAAAAA" + ))))))))))))))))))))).len() + 1 + ''; + + "format_short_signature(signature)" = "signature.name()"; + "format_timestamp(timestamp)" = "timestamp.ago()"; + "format_short_commit_header(commit)" = '' + separate(" ", + if(commit.current_working_copy(), label("active_marker", " ACTIVE ")), + if(commit.conflict(), label("conflict_marker", " CONFLICT ")), + format_short_change_id_with_hidden_and_divergent_info(commit), + format_short_signature(commit.author()), + label("muted", "|"), + if(commit.description().trim().len() > 0, label("muted", format_timestamp(commit_timestamp(commit)))), + commit.bookmarks(), + commit.tags(), + commit.working_copies(), + label("muted", "(") ++ + format_short_commit_id(commit.commit_id()) ++ + label("muted", ")"), + if(config("ui.show-cryptographic-signatures").as_boolean(), + format_short_cryptographic_signature(commit.signature())), + ) + ''; + }; + }; + }; ssh = { enable = true; -- 2.54.0 From 168c36042b1a70c406e4d195d34c20c482a3cde3 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 24 Sep 2025 11:59:26 -0700 Subject: [PATCH 10/14] clover: setup work environment switch command gets some new features to account for the fact my work device hostname contains info about the company i work for. --- .gitignore | 3 ++- flake.nix | 6 ++++++ switch | 21 ++++++++++++++++----- users/clover/home.nix | 12 ++---------- users/clover/paperback/home.nix | 4 ---- users/clover/work/home.nix | 23 +++++++++++++++++++++++ 6 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 users/clover/work/home.nix diff --git a/.gitignore b/.gitignore index b12e90ad5ad4ae77215e74cdf66de71da19ef3cc..fd9d1ca548f88694b09655ec42567e08161475b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -flake.lock .DS_STORE +.hostname +flake.lock result result-* diff --git a/flake.nix b/flake.nix index 28101b0755d19ad6d382be93307cd255f30fc903..cebe693a0da4cbaf4b7f067231349b803ff3d5b3 100644 --- a/flake.nix +++ b/flake.nix @@ -133,6 +133,12 @@ host = "paperback"; system = "aarch64-darwin"; }; + # clover's work macbook pro + darwinConfigurations.clover-work-mac = mkSystem "clover-work-mac" { + user = "clover"; + host = "work"; + system = "aarch64-darwin"; + }; # fish's cattop nixosConfigurations.cattop = mkSystem "cattop" { diff --git a/switch b/switch index 3c267596a89ce1a79011f5431c6d73cc4e2a25ec..bf5697d655d9362730c9db9854db34b7950154fc 100755 --- a/switch +++ b/switch @@ -1,12 +1,23 @@ #!/bin/sh nh_subcommand="os" fallback_command="nixos-rebuild" -if [ "$(uname -o)" = "darwin" ]; then - nh_subcommand="darwin" - fallback_command="nix run .#darwin-rebuild" +hostname_file="$(dirname "$0")/.hostname" +if [ -n "$1" ]; then + hostname="$1" +elif [ -f "$hostname_file" ]; then + hostname=$(cat "$hostname_file") +fi +if [ -z "$hostname" ]; then + hostname="$(hostname)" +fi +printf "%s" "$hostname" >"$hostname_file" +if [ "$(uname -o)" = "Darwin" ]; then + nh_subcommand="darwin" + fallback_command="nix run .#darwin-rebuild" + hostname="darwinConfigurations.$hostname" fi if command -v nh >/dev/null; then - nh $nh_subcommand switch . + nh $nh_subcommand switch '.#'"$hostname" else - $fallback_command -- switch --flake . + $fallback_command -- switch --flake '.#'"$hostname" fi diff --git a/users/clover/home.nix b/users/clover/home.nix index d8674c7e5fa8fa528ad15e36ffdd837513f16db1..8ac1b46d4bddc71134455dbb08b2264fb8be802a 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -10,9 +10,7 @@ in let # packages to always install all = [ - (ffmpeg.override { - withSvtav1 = true; - }) + ffmpeg-full ripgrep uv nh @@ -22,6 +20,7 @@ in desktop = [ git-town lazygit + jjui ]; # packages to install on all servers server = [ ]; @@ -278,12 +277,5 @@ in "nas.paperclover.net" = zenith; }; }; - neovide = { - enable = !hostServer; - settings = { - font.normal = "AT Name Mono"; - font.size = 13; - }; - }; }; } diff --git a/users/clover/paperback/home.nix b/users/clover/paperback/home.nix index 711130f295df837f03f7c41ca2efc7cc64491798..47d88a2034872f1efc7c06355eef2e3b004436b3 100644 --- a/users/clover/paperback/home.nix +++ b/users/clover/paperback/home.nix @@ -3,7 +3,6 @@ # these programs are not globally installed to reduce distractions. # most of these are needed for my work environment. programs = { - bun.enable = true; zsh.profileExtra = '' _bun() { local context state line @@ -12,7 +11,6 @@ ''; }; home.packages = with pkgs; [ - doppler deno nodejs_22 rustup @@ -22,7 +20,5 @@ yt-dlp spotdl zig - ssm-session-manager-plugin - awscli ]; } diff --git a/users/clover/work/home.nix b/users/clover/work/home.nix new file mode 100644 index 0000000000000000000000000000000000000000..5407bdbbc9bd19929d875a24a72da914e4233d31 --- /dev/null +++ b/users/clover/work/home.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +{ + programs = { + zsh.profileExtra = '' + _bun() { + local context state line + _arguments -C '*:file:_files' + } + ''; + }; + home.packages = with pkgs; [ + (bun.overrideAttrs (_: { + version = "1.1.17"; # blocked on bugs + })) + doppler + deno + nodejs_24 + rustup + typescript + ssm-session-manager-plugin + awscli + ]; +} -- 2.54.0 From 7dc7c912ee419bb57834d22886da8172ef691583 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 24 Sep 2025 12:22:26 -0700 Subject: [PATCH 11/14] clover: pin bun version --- users/clover/work/home.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/users/clover/work/home.nix b/users/clover/work/home.nix index 5407bdbbc9bd19929d875a24a72da914e4233d31..a5fb595349707f6b857c0e40e4208e08ccdeb756 100644 --- a/users/clover/work/home.nix +++ b/users/clover/work/home.nix @@ -9,8 +9,12 @@ ''; }; home.packages = with pkgs; [ - (bun.overrideAttrs (_: { - version = "1.1.17"; # blocked on bugs + (bun.overrideAttrs (_: rec { + version = "1.1.17"; + src = fetchurl { + url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip"; + hash = "sha256-aULgRZ9evcGUhKJ6slLJOg3IEzUeNfIkJF8RDP3YUlo="; + }; })) doppler deno -- 2.54.0 From 7fd3f19d2b7d0c7ccd42d903f574ccfab32ac07d Mon Sep 17 00:00:00 2001 From: clover caruso Date: Wed, 24 Sep 2025 13:52:21 -0700 Subject: [PATCH 12/14] clover: fix ghostty theme breaking change --- users/clover/home.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/clover/home.nix b/users/clover/home.nix index 8ac1b46d4bddc71134455dbb08b2264fb8be802a..4f799cb1e39b41021b6abfc173356266bfab50b0 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -48,7 +48,7 @@ in shader = "cursor-smear-black.glsl"; package = null; settings = { - theme = "light:farmhouse-light,dark:ChallengerDeep"; + theme = "light:Farmhouse Light,dark:Challenger Deep"; font-family = "AT Name Mono"; adjust-cursor-thickness = 1; background-opacity = 0.9; @@ -60,7 +60,7 @@ in zsh = { enable = true; shellAliases = { - switch = "nh darwin switch ~/config"; + switch = "~/config/switch"; gg = "lazygit"; ga = "git add"; g = "git status"; -- 2.54.0 From 94fcf2aaa0ea020ce7c3b9b0589b5eb39a738f62 Mon Sep 17 00:00:00 2001 From: Fish <77413091+JulianBarbera@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:51:58 -0700 Subject: [PATCH 13/14] Updated vim --- users/fish/cattop/configuration.nix | 15 +-- users/fish/cattop/home.nix | 5 +- users/fish/vim.nix | 40 ++++++- users/fish/vim/default.nix | 9 ++ users/fish/vim/languages.nix | 155 ++++++++++++++++++++++++++++ users/fish/vim/latex.nix | 118 +++++++++++++++++++++ users/fish/vim/mini.nix | 10 ++ users/fish/vim/visuals.nix | 27 +++++ 8 files changed, 370 insertions(+), 9 deletions(-) create mode 100644 users/fish/vim/default.nix create mode 100644 users/fish/vim/languages.nix create mode 100644 users/fish/vim/latex.nix create mode 100644 users/fish/vim/mini.nix create mode 100644 users/fish/vim/visuals.nix diff --git a/users/fish/cattop/configuration.nix b/users/fish/cattop/configuration.nix index d455b262b7dd5253e88736b7c0d5f55cfb9a5e78..510ebab44d3118f2dfbec63a6d960b799c4f099e 100644 --- a/users/fish/cattop/configuration.nix +++ b/users/fish/cattop/configuration.nix @@ -66,12 +66,14 @@ services.printing.enable = true; # Enable sound. - # services.pulseaudio.enable = true; - # OR - # services.pipewire = { - # enable = true; - # pulse.enable = true; - # }; + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; @@ -81,6 +83,7 @@ extraGroups = [ "wheel" "dialout" + "audio" ]; packages = with pkgs; [ tree diff --git a/users/fish/cattop/home.nix b/users/fish/cattop/home.nix index 6cef84292dabfa59f7a19ca31c11d3c9628e4d73..717ef04009d48832066d111b9c4df8fb9615b61c 100644 --- a/users/fish/cattop/home.nix +++ b/users/fish/cattop/home.nix @@ -8,7 +8,7 @@ ghostty signal-desktop spotify - legcord + equibop # Gaming (prismlauncher.override { gamemodeSupport = true; }) @@ -27,14 +27,17 @@ efibootmgr pqiv imagemagick + toybox # Dev tools hyfetch python3 gh cmake + ripgrep # Unsorted + kicad ]; }; diff --git a/users/fish/vim.nix b/users/fish/vim.nix index 80d61f494d953950672d228d2d0e6a78e541999d..9104cec4f818859d19d728dd01182ea540e9b9c7 100644 --- a/users/fish/vim.nix +++ b/users/fish/vim.nix @@ -1,4 +1,40 @@ -{ ... }: +{ pkgs, ... }: { - vim.languages.svelte.enable = true; + imports = [ + ./vim/default.nix + ]; + + vim = { + #enable python provider + withPython3 = true; + python3Packages = [ "pynvim" ]; + + autocmds = [ + #Autocommand to fall back to treesitter folding if LSP doesnt support it + { + event = [ "LspAttach" ]; + callback = pkgs.lib.generators.mkLuaInline '' + function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client:supports_method('textDocument/foldingRange') then + local win = vim.api.nvim_get_current_win() + vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()' + end + end + ''; + } + ]; + + tabline = { + nvimBufferline.enable = true; + }; + startPlugins = [ + "nui-nvim" + ]; + theme = { + name = "catppuccin"; + style = "mocha"; + }; + hideSearchHighlight = true; + }; } diff --git a/users/fish/vim/default.nix b/users/fish/vim/default.nix new file mode 100644 index 0000000000000000000000000000000000000000..9d7518bb41816b453399dd044663a511ba364078 --- /dev/null +++ b/users/fish/vim/default.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + imports = [ + ./languages.nix + ./latex.nix + ./visuals.nix + ./mini.nix + ]; +} diff --git a/users/fish/vim/languages.nix b/users/fish/vim/languages.nix new file mode 100644 index 0000000000000000000000000000000000000000..6c370854799533d6388b8eb992df055f6df93b7a --- /dev/null +++ b/users/fish/vim/languages.nix @@ -0,0 +1,155 @@ +{ + flake, + user, + host, + pkgs, + ... +}: +{ + vim = { + extraPackages = with pkgs; [ + python312Packages.pylatexenc + ]; + languages = { + lua.lsp.enable = true; + lua.lsp.lazydev.enable = true; + python = { + format.type = "ruff"; + }; + markdown = { + enable = true; + extensions.render-markdown-nvim = { + enable = true; + }; + }; + nix = { + lsp.servers = [ + "nil" + "nixd" + ]; + }; + }; + + formatter.conform-nvim = { + enable = true; + setupOpts = { + formatters_by_ft = { + fish = [ "fish_indent" ]; + tex = [ "latexindent" ]; + }; + }; + }; + diagnostics = { + enable = true; + config = { + virtual_text = { + format = pkgs.lib.generators.mkLuaInline '' + function(diagnostic) + return string.format("%s (%s)", diagnostic.message, diagnostic.source) + end + ''; + }; + }; + nvim-lint = { + enable = true; + linters_by_ft = { + nix = [ "statix" ]; + tex = [ "chktex" ]; + haskell = [ "hlint" ]; + }; + + linters = { + chktex = { + ignore_exitcode = true; + }; + }; + }; + }; + treesitter = { + enable = true; + fold = true; + addDefaultGrammars = true; + highlight = { + additionalVimRegexHighlighting = true; + }; + + grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + markdown_inline + markdown + ]; + + highlight.enable = true; + indent.enable = false; + }; + + visuals = { + fidget-nvim = { + setupOpts = { + logger.level = "trace"; + }; + }; + }; + + ui = { + nvim-ufo = { + enable = true; + }; + }; + autocomplete.blink-cmp = { + enable = true; + mappings = { + close = null; + complete = null; + confirm = null; + next = null; + previous = null; + scrollDocsDown = null; + scrollDocsUp = null; + }; + + setupOpts = { + keymap = { + preset = "super-tab"; + }; + completion = { + ghost_text.enabled = false; + list.selection.preselect = true; + trigger = { + show_in_snippet = true; + }; + accept.auto_brackets.enabled = true; + }; + signature = { + enabled = true; + }; + }; + }; + + lazy.plugins."blink.pairs" = { + enabled = true; + package = pkgs.vimPlugins.blink-pairs; + setupModule = "blink.pairs"; + setupOpts = { + mappings = { + # -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime + enabled = true; + # -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10 + pairs = [ ]; + }; + highlights = { + enabled = true; + groups = [ + "BlinkPairsOrange" + "BlinkPairsPurple" + "BlinkPairsBlue" + ]; + matchparen = { + enabled = true; + group = "MatchParen"; + }; + }; + debug = false; + }; + }; + }; +} diff --git a/users/fish/vim/latex.nix b/users/fish/vim/latex.nix new file mode 100644 index 0000000000000000000000000000000000000000..dd256a544add51076952ca5837f0ebc5631f0a06 --- /dev/null +++ b/users/fish/vim/latex.nix @@ -0,0 +1,118 @@ +{ pkgs, host, ... }: +{ + vim = { + extraPackages = with pkgs; [ + texliveFull + ]; + lazy.plugins.cmp-vimtex = { + enabled = true; + package = pkgs.vimPlugins.cmp-vimtex; + lazy = false; + + }; + lazy.plugins.vimtex = { + enabled = true; + package = pkgs.vimPlugins.vimtex; + lazy = false; + }; + + globals = { + tex_flavor = "latex"; + maplocalleader = "\\"; + vimtex_compiler_method = "latexmk"; + vimtex_view_method = if host.darwin then "skim" else "zathura"; + vimtex_view_automatic = 1; + vimtex_compiler_latexmk = { + callback = 1; + continuous = 1; + executable = "latexmk"; + hooks = [ ]; + options = [ + "-verbose" + "-file-line-error" + "-synctex=1" + "-interaction=nonstopmode" + "-shell-escape" + ]; + }; + vimtex_log_ignore = [ + "Underfull" + "Overfull" + "specifier changed to" + "Token not allowed in a PDF string" + ]; + vimtex_quickfix_ignore_filters = [ + "Underfull" + "Overfull" + ]; + }; + + autocomplete.blink-cmp = { + sourcePlugins = { + "blink.compat" = { + enable = true; + package = "blink-compat"; + module = "blink.compat.source"; + }; + }; + setupOpts = { + sources = { + default = [ "vimtex" ]; + providers = { + vimtex = { + name = "vimtex"; + module = "blink.compat.source"; + score_offset = 100; + }; + }; + }; + }; + }; + + augroups = [ + { + name = "VimTeX Events"; + } + ]; + autocmds = [ + { + pattern = [ "VimtexEventViewReverse" ]; + event = [ "User" ]; + desc = "Return to nvim after reverse search"; + command = "call b:vimtex.viewer.xdo_focus_vim()"; + group = "VimTeX Events"; + } + { + pattern = [ "VimtexEventQuit" ]; + event = [ "User" ]; + desc = "Close pdf after exiting nvim"; + command = "VimtexClean"; + group = "VimTeX Events"; + } + + { + pattern = [ "VimtexEventInitPost" ]; + event = [ "User" ]; + desc = "Start compiling when opening nvim to a tex file"; + command = "VimtexCompile"; + group = "VimTeX Events"; + } + + ]; + + lsp = { + servers = { + texlab = { + enable = true; + cmd = [ "${pkgs.texlab}/bin/texlab" ]; + filetypes = [ "tex" ]; + }; + }; + }; + treesitter = { + grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ + latex + ]; + }; + }; +} diff --git a/users/fish/vim/mini.nix b/users/fish/vim/mini.nix new file mode 100644 index 0000000000000000000000000000000000000000..b8119e7ae3dd250c84ec324309d6b0cbe8d30fc2 --- /dev/null +++ b/users/fish/vim/mini.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + vim = { + mini = { + icons.enable = true; + ai.enable = true; + surround.enable = true; + }; + }; +} diff --git a/users/fish/vim/visuals.nix b/users/fish/vim/visuals.nix new file mode 100644 index 0000000000000000000000000000000000000000..09759c3e78e9e3f9522cbc0a1ed03e17e2340614 --- /dev/null +++ b/users/fish/vim/visuals.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + vim = { + ui = { + noice = { + enable = true; + setupOpts = { + lsp = { + progress.enabled = false; + signature.enabled = true; + }; + presets = { + lsp_doc_border = true; + long_message_to_split = true; + inc_rename = false; + command_palette = false; + bottom_search = true; + }; + }; + }; + borders = { + enable = true; + }; + }; + + }; +} -- 2.54.0 From 4e0a082cfa9ce13e6bfe45fa93565226667b82fa Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sat, 4 Oct 2025 20:44:38 -0700 Subject: [PATCH 14/14] clover: stuff --- users/clover/configuration.nix | 8 ++++++++ users/clover/home.nix | 13 ++++++++----- users/clover/paperback/configuration.nix | 6 ------ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/users/clover/configuration.nix b/users/clover/configuration.nix index 103b011a987ed79def16b4bae7aef256192e681d..a02a361b99dede3b63eeef4c137f3f6e12e9e63e 100644 --- a/users/clover/configuration.nix +++ b/users/clover/configuration.nix @@ -17,6 +17,14 @@ ]; }; + homebrew = { + enable = true; + casks = [ + "db-browser-for-sqlite" + "alt-tab" + ]; + }; + # system preferences system.defaults = { NSGlobalDomain = { diff --git a/users/clover/home.nix b/users/clover/home.nix index 4f799cb1e39b41021b6abfc173356266bfab50b0..bf3d6838a0719a93f9c88a12d087b6345d6b36cd 100644 --- a/users/clover/home.nix +++ b/users/clover/home.nix @@ -18,7 +18,6 @@ in ]; # packages to install for desktop environments (non-server) desktop = [ - git-town lazygit jjui ]; @@ -30,7 +29,6 @@ in ]; # packages to install on linux desktops linux = [ - reaper # TODO: why does this break on macOS ]; in all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop); @@ -66,7 +64,9 @@ in g = "git status"; gp = "git pull --rebase && git push"; }; - profileExtra = '' + initContent = '' + export PS1="%{$(tput setaf 207)%}%m%{$(tput setaf 15)%}:%{$(tput setaf 87)%}%~ %{$(tput sgr0)%}$ " + function python() { dirname=$(dirname $1 2>/dev/null) if [ -z "$dirname" ]; then @@ -148,10 +148,10 @@ in }; # ui.graph.style = "square"; revsets = { - log = "ancestors(description(regex:\"^(WIP:|\\\\s*$)\"), 3) | ancestors(immutable_heads(), 2) | ancestors(visible_heads(), 2)"; + log = "ancestors(description(regex:\"^(WIP:|\\\\s+$)\"):: | working_copies() | bookmarks(\"master\")::remote_bookmarks(\"master\") | bookmarks(glob:\"clo/*\")::, 5)"; short-prefixes = "(trunk()..@)::"; }; - templates.log = "hl_wip(self)"; + # templates.log = "hl_wip(self)"; template-aliases = { # log template, highlighting the WIP commits by making everything else faded out @@ -269,6 +269,9 @@ in ssh = { enable = true; + extraConfig = '' + SetEnv TERM=xterm-color + ''; matchBlocks = rec { zenith = { user = "clo"; diff --git a/users/clover/paperback/configuration.nix b/users/clover/paperback/configuration.nix index 33d6590bbae174414152184a49ac07e49f4204a8..87a13d7f8638f6a81a6931539129b22e07a0512c 100644 --- a/users/clover/paperback/configuration.nix +++ b/users/clover/paperback/configuration.nix @@ -1,8 +1,2 @@ _: { - homebrew = { - enable = true; - casks = [ - "db-browser-for-sqlite" - ]; - }; } -- 2.54.0