authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-10-17 14:27:07-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-10-17 14:27:07-07:00
logaf005a3fd7925b855dda0128e71b245ba844d2b8
treee3f26c3de63869ca81cf4540dfcabefed7a1c04f
parent091bca5c8f57bbdb3031ef1d5d748ea9331d3677
parent4e0a082cfa9ce13e6bfe45fa93565226667b82fa
signature Commit is signed but in an unrecognized format.

Merge branch 'main' of paperclover.dev:nix/config


20 files changed, 737 insertions(+), 146 deletions(-)

.gitignore+2-1
......@@ -1,4 +1,5 @@
1flake.lock
21.DS_STORE
2.hostname
3flake.lock
34result
45result-*
flake.nix+6
......@@ -134,6 +134,12 @@
134134 host = "paperback";
135135 system = "aarch64-darwin";
136136 };
137 # clover's work macbook pro
138 darwinConfigurations.clover-work-mac = mkSystem "clover-work-mac" {
139 user = "clover";
140 host = "work";
141 system = "aarch64-darwin";
142 };
137143
138144 # fish's cattop
139145 nixosConfigurations.cattop = mkSystem "cattop" {
modules/home/default.nix+28
......@@ -77,6 +77,7 @@ in
7777 # ViM and Neovim
7878 ".*.swp"
7979 ".nvimlog"
80 ".jj"
8081 ];
8182 };
8283
......@@ -134,6 +135,33 @@ in
134135 autocd = true;
135136 history.size = 10000;
136137 };
138 jujutsu = {
139 settings = {
140 user = {
141 email = config.programs.git.userEmail;
142 name = config.programs.git.userName;
143 };
144 signing = {
145 behavior = "own";
146 backend = "ssh";
147 key = "~/.ssh/id_ed25519.pub";
148 };
149 git = {
150 sign-on-push = true;
151 push-new-bookmarks = true;
152 };
153 ui = {
154 default-command = "log";
155 diff-formatter = [
156 "${pkgs.difftastic}/bin/difft"
157 "--color=always"
158 "$left"
159 "$right"
160 ];
161 pager = "${pkgs.bat}/bin/bat --style=plain";
162 };
163 };
164 };
137165
138166 ghostty.settings.custom-shader = lib.mkIf (
139167 cfg.ghostty.shader != null
modules/neovim/default.nix+1
......@@ -131,6 +131,7 @@
131131 hide_dotfiles = false;
132132 never_show = [
133133 ".git"
134 ".jj"
134135 ".DS_Store" # macOS
135136 "thumbs.db" # Windows
136137 ];
switch+16-5
......@@ -1,12 +1,23 @@
11#!/bin/sh
22nh_subcommand="os"
33fallback_command="nixos-rebuild"
4if [ "$(uname -o)" = "darwin" ]; then
5 nh_subcommand="darwin"
6 fallback_command="nix run .#darwin-rebuild"
4hostname_file="$(dirname "$0")/.hostname"
5if [ -n "$1" ]; then
6 hostname="$1"
7elif [ -f "$hostname_file" ]; then
8 hostname=$(cat "$hostname_file")
9fi
10if [ -z "$hostname" ]; then
11 hostname="$(hostname)"
12fi
13printf "%s" "$hostname" >"$hostname_file"
14if [ "$(uname -o)" = "Darwin" ]; then
15 nh_subcommand="darwin"
16 fallback_command="nix run .#darwin-rebuild"
17 hostname="darwinConfigurations.$hostname"
718fi
819if command -v nh >/dev/null; then
9 nh $nh_subcommand switch .
20 nh $nh_subcommand switch '.#'"$hostname"
1021else
11 $fallback_command -- switch --flake .
22 $fallback_command -- switch --flake '.#'"$hostname"
1223fi
users/clover/configuration.nix+8
......@@ -17,6 +17,14 @@
1717 ];
1818 };
1919
20 homebrew = {
21 enable = true;
22 casks = [
23 "db-browser-for-sqlite"
24 "alt-tab"
25 ];
26 };
27
2028 # system preferences
2129 system.defaults = {
2230 NSGlobalDomain = {
users/clover/home.nix+197-15
......@@ -10,9 +10,7 @@ in
1010 let
1111 # packages to always install
1212 all = [
13 (ffmpeg.override {
14 withSvtav1 = true;
15 })
13 ffmpeg-full
1614 ripgrep
1715 uv
1816 nh
......@@ -20,8 +18,8 @@ in
2018 ];
2119 # packages to install for desktop environments (non-server)
2220 desktop = [
23 git-town
2421 lazygit
22 jjui
2523 ];
2624 # packages to install on all servers
2725 server = [ ];
......@@ -31,7 +29,6 @@ in
3129 ];
3230 # packages to install on linux desktops
3331 linux = [
34 reaper # TODO: why does this break on macOS
3532 ];
3633 in
3734 all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop);
......@@ -49,7 +46,7 @@ in
4946 shader = "cursor-smear-black.glsl";
5047 package = null;
5148 settings = {
52 theme = "light:catppuccin-latte,dark:catppuccin-macchiato";
49 theme = "light:Farmhouse Light,dark:Challenger Deep";
5350 font-family = "AT Name Mono";
5451 adjust-cursor-thickness = 1;
5552 background-opacity = 0.9;
......@@ -61,13 +58,15 @@ in
6158 zsh = {
6259 enable = true;
6360 shellAliases = {
64 switch = "nh darwin switch ~/config";
61 switch = "~/config/switch";
6562 gg = "lazygit";
6663 ga = "git add";
6764 g = "git status";
6865 gp = "git pull --rebase && git push";
6966 };
70 profileExtra = ''
67 initContent = ''
68 export PS1="%{$(tput setaf 207)%}%m%{$(tput setaf 15)%}:%{$(tput setaf 87)%}%~ %{$(tput sgr0)%}$ "
69
7170 function python() {
7271 dirname=$(dirname $1 2>/dev/null)
7372 if [ -z "$dirname" ]; then
......@@ -81,8 +80,198 @@ in
8180 # use a git-specific email
8281 git.userEmail = "git@paperclover.net";
8382
83 jujutsu = {
84 enable = true;
85 # my workflow is based on creating changes and editing them. while they
86 # are in progress the description starts with "WIP: "
87 settings = rec {
88 colors = {
89 bookmark = "green";
90 bookmarks = colors.bookmark;
91 local_bookmarks = colors.bookmarks;
92 remote_bookmarks = colors.bookmark;
93 "working_copy bookmark" = "bright green";
94 "working_copy bookmarks" = colors."working_copy bookmark";
95 "working_copy local_bookmarks" = colors."working_copy bookmark";
96 "working_copy remote_bookmarks" = colors."working_copy bookmark";
97
98 "author" = {
99 fg = "white";
100 bold = false;
101 italic = true;
102 };
103 "working_copy author" = colors.author;
104
105 desc = {
106 bold = false;
107 fg = "bright white";
108 };
109 description = colors.desc;
110 cc_wip = {
111 fg = "bright yellow";
112 bold = true;
113 reverse = true;
114 };
115 cc_header = {
116 bold = true;
117 fg = "bright white";
118 };
119 cc_feat = "green";
120 cc_fix = "red";
121 cc_hotfix = "red";
122 cc_chore = "yellow";
123 cc_test = "blue";
124 cc_other = "blue";
125 cc_scope = {
126 fg = "cyan";
127 bold = false;
128 italic = true;
129 };
130
131 active_marker = {
132 fg = "bright magenta";
133 bold = true;
134 reverse = true;
135 };
136 conflict_marker = {
137 fg = "bright red";
138 bold = true;
139 reverse = true;
140 };
141
142 timestamp = "bright black";
143 commit_id = {
144 fg = "bright black";
145 bold = false;
146 };
147 muted = "bright black";
148 };
149 # ui.graph.style = "square";
150 revsets = {
151 log = "ancestors(description(regex:\"^(WIP:|\\\\s+$)\"):: | working_copies() | bookmarks(\"master\")::remote_bookmarks(\"master\") | bookmarks(glob:\"clo/*\")::, 5)";
152 short-prefixes = "(trunk()..@)::";
153 };
154 # templates.log = "hl_wip(self)";
155
156 template-aliases = {
157 # log template, highlighting the WIP commits by making everything else faded out
158 "hl_wip(commit)" = ''
159 if(commit.root(), format_root_commit(commit),
160 label("__commit__",
161 format_short_commit_header(commit) ++ "\n" ++
162 format_commit_description(commit)
163 )
164 )
165 '';
166
167 "format_commit_description(commit)" = ''
168 label("desc", format_commit_firstline(commit.description().first_line())) ++
169 "\n" ++ if(
170 commit.description().starts_with("WIP:") || commit.current_working_copy(),
171 commit.description().remove_prefix(commit.description().first_line()).remove_prefix("\n").trim_end() ++ "\n ",
172 if(commit.description().remove_prefix(commit.description().first_line()).trim().len() > 0,
173 label("muted", lines_collapsed(commit.description().lines().filter(|x| x.trim().len() > 0).len() - 1)),
174 " "
175 )
176 )
177 '';
178 "lines_collapsed(count)" =
179 ''("[" ++ stringify(count ++ " line" ++ if(count == 1, "", "s")) ++ " collapsed]\n")'';
180 "format_commit_firstline(line)" = ''
181 if(line.starts_with("WIP:"),
182 label("cc_wip", " WIP ") ++ " " ++ format_commit_firstline_a_wip(line.remove_prefix("WIP:").trim()),
183 format_commit_firstline_a_wip(line)
184 )
185 '';
186 "format_commit_firstline_a_wip(line)" = ''
187 if(line.starts_with("feat:") || line.starts_with("feat("),
188 label("cc_feat", "feat") ++ format_commit_firstline_a_cc_type(line.remove_prefix("feat")),
189 if(line.starts_with("fix:") || line.starts_with("fix("),
190 label("cc_fix", "fix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("fix")),
191 if(line.starts_with("hotfix:") || line.starts_with("hotfix("),
192 label("cc_hotfix", "hotfix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("hotfix")),
193 if(line.starts_with("chore:") || line.starts_with("chore("),
194 label("cc_chore", "chore") ++ format_commit_firstline_a_cc_type(line.remove_prefix("chore")),
195 if(line.starts_with("test:") || line.starts_with("test("),
196 label("cc_other", "test") ++ format_commit_firstline_a_cc_type(line.remove_prefix("test")),
197 if(line.starts_with("refactor:") || line.starts_with("refactor("),
198 label("cc_other", "refactor") ++ format_commit_firstline_a_cc_type(line.remove_prefix("refactor")),
199 if(line.starts_with("perf:") || line.starts_with("perf("),
200 label("cc_other", "perf") ++ format_commit_firstline_a_cc_type(line.remove_prefix("perf")),
201 if(line.starts_with("lib:") || line.starts_with("lib("),
202 label("cc_other", "lib") ++ format_commit_firstline_a_cc_type(line.remove_prefix("lib")),
203 label("cc_header", line)
204 ))))))))
205 '';
206 "format_commit_firstline_a_cc_type(rest)" = ''
207 if(rest.starts_with("(") && rest.contains(")"),
208 format_firstline_cc_scope(rest, index_of_close_paren(rest)),
209 format_firstline_a_cc(rest))
210 '';
211 "format_firstline_cc_scope(rest, index)" = ''
212 label("cc_scope", rest.substr(0, index)) ++ format_firstline_a_cc(rest.substr(index, rest.len()))
213 '';
214 "format_firstline_a_cc(rest)" = ''
215 if(rest.starts_with(":"),
216 label("muted", ":") ++ label("cc_header", rest.remove_prefix(":")),
217 label("cc_header", rest)
218 )
219 '';
220 # sorry!
221 "index_of_close_paren(line)" = ''
222 stringify(if(line.substr(1, 2) == ")", "A",
223 if(line.substr(2, 3) == ")", "AA",
224 if(line.substr(3, 4) == ")", "AAA",
225 if(line.substr(4, 5) == ")", "AAAA",
226 if(line.substr(5, 6) == ")", "AAAAA",
227 if(line.substr(6, 7) == ")", "AAAAAA",
228 if(line.substr(7, 8) == ")", "AAAAAAA",
229 if(line.substr(8, 9) == ")", "AAAAAAAA",
230 if(line.substr(9, 10) == ")","AAAAAAAAA",
231 if(line.substr(10, 11) == ")", "AAAAAAAAAA",
232 if(line.substr(11, 12) == ")", "AAAAAAAAAAA",
233 if(line.substr(12, 13) == ")", "AAAAAAAAAAAA",
234 if(line.substr(13, 14) == ")", "AAAAAAAAAAAAA",
235 if(line.substr(14, 15) == ")", "AAAAAAAAAAAAAA",
236 if(line.substr(15, 16) == ")", "AAAAAAAAAAAAAAA",
237 if(line.substr(16, 17) == ")", "AAAAAAAAAAAAAAAA",
238 if(line.substr(17, 18) == ")", "AAAAAAAAAAAAAAAAA",
239 if(line.substr(18, 19) == ")", "AAAAAAAAAAAAAAAAAA",
240 if(line.substr(19, 20) == ")", "AAAAAAAAAAAAAAAAAAA",
241 if(line.substr(20, 21) == ")", "AAAAAAAAAAAAAAAAAAAA",
242 "AAAAAAAAAAAAAAAAAAAAA"
243 ))))))))))))))))))))).len() + 1
244 '';
245
246 "format_short_signature(signature)" = "signature.name()";
247 "format_timestamp(timestamp)" = "timestamp.ago()";
248 "format_short_commit_header(commit)" = ''
249 separate(" ",
250 if(commit.current_working_copy(), label("active_marker", " ACTIVE ")),
251 if(commit.conflict(), label("conflict_marker", " CONFLICT ")),
252 format_short_change_id_with_hidden_and_divergent_info(commit),
253 format_short_signature(commit.author()),
254 label("muted", "|"),
255 if(commit.description().trim().len() > 0, label("muted", format_timestamp(commit_timestamp(commit)))),
256 commit.bookmarks(),
257 commit.tags(),
258 commit.working_copies(),
259 label("muted", "(") ++
260 format_short_commit_id(commit.commit_id()) ++
261 label("muted", ")"),
262 if(config("ui.show-cryptographic-signatures").as_boolean(),
263 format_short_cryptographic_signature(commit.signature())),
264 )
265 '';
266 };
267 };
268 };
269
84270 ssh = {
85271 enable = true;
272 extraConfig = ''
273 SetEnv TERM=xterm-color
274 '';
86275 matchBlocks = rec {
87276 zenith = {
88277 user = "clo";
......@@ -91,12 +280,5 @@ in
91280 "nas.paperclover.net" = zenith;
92281 };
93282 };
94 neovide = {
95 enable = !hostServer;
96 settings = {
97 font.normal = "AT Name Mono";
98 font.size = 13;
99 };
100 };
101283 };
102284}
users/clover/paperback/configuration.nix-7
......@@ -1,9 +1,2 @@
11_: {
2 homebrew = {
3 enable = true;
4 casks = [
5 "eloston-chromium"
6 "db-browser-for-sqlite"
7 ];
8 };
92}
users/clover/paperback/home.nix-4
......@@ -3,7 +3,6 @@
33 # these programs are not globally installed to reduce distractions.
44 # most of these are needed for my work environment.
55 programs = {
6 bun.enable = true;
76 zsh.profileExtra = ''
87 _bun() {
98 local context state line
......@@ -12,7 +11,6 @@
1211 '';
1312 };
1413 home.packages = with pkgs; [
15 doppler
1614 deno
1715 nodejs_22
1816 rustup
......@@ -22,7 +20,5 @@
2220 yt-dlp
2321 spotdl
2422 zig
25 ssm-session-manager-plugin
26 awscli
2723 ];
2824}
users/clover/work/home.nix created+27
......@@ -0,0 +1,27 @@
1{ pkgs, ... }:
2{
3 programs = {
4 zsh.profileExtra = ''
5 _bun() {
6 local context state line
7 _arguments -C '*:file:_files'
8 }
9 '';
10 };
11 home.packages = with pkgs; [
12 (bun.overrideAttrs (_: rec {
13 version = "1.1.17";
14 src = fetchurl {
15 url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip";
16 hash = "sha256-aULgRZ9evcGUhKJ6slLJOg3IEzUeNfIkJF8RDP3YUlo=";
17 };
18 }))
19 doppler
20 deno
21 nodejs_24
22 rustup
23 typescript
24 ssm-session-manager-plugin
25 awscli
26 ];
27}
users/fish/cattop/configuration.nix+56-57
......@@ -7,105 +7,110 @@
77}:
88{
99 imports = [
10 # Include the results of the hardware scan.
1110 ./hardware-configuration.nix
1211 ];
1312
14 # Use the systemd-boot EFI boot loader.
1513 boot.loader.efi.canTouchEfiVariables = true;
1614
17 # networking.hostName = "nixos"; # Define your hostname.
18 # Pick only one of the below networking options.
19 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
15 networking.hostName = "cattop";
2016 # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
2117
22 # Set your time zone.
23 # time.timeZone = "Europe/Amsterdam";
24
25 # Configure network proxy if necessary
26 # networking.proxy.default = "http://user:password@proxy:port/";
27 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
28
29 # Select internationalisation properties.
30 # i18n.defaultLocale = "en_US.UTF-8";
31 # console = {
32 # font = "Lat2-Terminus16";
33 # keyMap = "us";
34 # useXkbConfig = true; # use xkb.options in tty.
35 # };
36
37 # Enable the X11 windowing system.
3818 services.xserver.enable = true;
3919
40 # Enable the GNOME Desktop Environment.
4120 services.displayManager.gdm.enable = true;
4221 services.desktopManager.gnome.enable = true;
4322 environment.gnome.excludePackages = (
4423 with pkgs;
4524 [
46 atomix
47 cheese
25 adwaita-fonts
26 adwaita-icon-theme
27 baobab
28 decibels
4829 epiphany
30 evince
31 file-roller
4932 geary
50 gedit
33 gnome-backgrounds
34 gnome-calculator
35 gnome-calendar
5136 gnome-characters
37 gnome-clocks
38 gnome-connections
39 gnome-console
40 gnome-contacts
41 gnome-disk-utility
42 gnome-font-viewer
43 gnome-logs
44 gnome-maps
5245 gnome-music
53 gnome-photos
54 gnome-terminal
46 gnome-shell-extensions
47 gnome-system-monitor
48 gnome-screenshot
49 gnome-text-editor
50 gnome-themes-extra
5551 gnome-tour
56 hitori
57 iagno
52 gnome-user-docs
53 gnome-weather
54 loupe
55 nautilus
56 orca
57 seahorse
58 simple-scan
59 snapshot
60 sushi
5861 totem
59
62 yelp
6063 ]
6164 );
6265
63 # Configure keymap in X11
64 # services.xserver.xkb.layout = "us";
65 # services.xserver.xkb.options = "eurosign:e,caps:escape";
66
67 # Enable CUPS to print documents.
68 # services.printing.enable = true;
66 services.printing.enable = true;
6967
7068 # Enable sound.
71 # services.pulseaudio.enable = true;
72 # OR
73 # services.pipewire = {
74 # enable = true;
75 # pulse.enable = true;
76 # };
69 services.pulseaudio.enable = false;
70 security.rtkit.enable = true;
71 services.pipewire = {
72 enable = true;
73 alsa.enable = true;
74 alsa.support32Bit = true;
75 pulse.enable = true;
76 };
7777
7878 # Enable touchpad support (enabled default in most desktopManager).
7979 # services.libinput.enable = true;
8080
81 # Define a user account. Don't forget to set a password with ‘passwd’.
8281 users.users.fish = {
8382 isNormalUser = true;
8483 extraGroups = [
85 "wheel" # Enable ‘sudo’ for the user.
86 "dialout" # Enable serial access for the user.
84 "wheel"
85 "dialout"
86 "audio"
8787 ];
8888 packages = with pkgs; [
8989 tree
9090 git
9191 nh
9292 vim
93 fish
9493 ];
9594 };
95 programs.git = {
96 enable = true;
97 # extraConfig = {
98 # push = {
99 # autoSetupRemote = true;
100 # };
101 # };
102 };
96103
97104 programs.firefox.enable = true;
98 programs.neovim.defaultEditor.enable = true;
105 programs.neovim.enable = true;
106 #programs.neovim.defaultEditor.enable = true;
99107
100108 # List packages installed in system profile.
101 # You can use https://search.nixos.org/ to find more packages (and options).
102109 environment.systemPackages = with pkgs; [
103 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
110 vim
104111 wget
105112 ];
106113
107 # Some programs need SUID wrappers, can be configured further or are
108 # started in user sessions.
109114 programs.mtr.enable = true;
110115 programs.gnupg.agent = {
111116 enable = true;
......@@ -117,12 +122,6 @@
117122 # Enable the OpenSSH daemon.
118123 # services.openssh.enable = true;
119124
120 # Open ports in the firewall.
121 # networking.firewall.allowedTCPPorts = [ ... ];
122 # networking.firewall.allowedUDPPorts = [ ... ];
123 # Or disable the firewall altogether.
124 # networking.firewall.enable = false;
125
126125 # Copy the NixOS configuration file and link it from the resulting system
127126 # (/run/current-system/configuration.nix). This is useful in case you
128127 # accidentally delete configuration.nix.
users/fish/cattop/hardware-configuration.nix+17-31
......@@ -1,46 +1,32 @@
11# Do not modify this file! It was generated by ‘nixos-generate-config’
22# and may be overwritten by future invocations. Please make changes
33# to /etc/nixos/configuration.nix instead.
4{
5 config,
6 lib,
7 pkgs,
8 modulesPath,
9 ...
10}:
4{ config, lib, pkgs, modulesPath, ... }:
115
126{
13 imports = [
14 (modulesPath + "/installer/scan/not-detected.nix")
15 ];
7 imports =
8 [ (modulesPath + "/installer/scan/not-detected.nix")
9 ];
1610
17 boot.initrd.availableKernelModules = [
18 "xhci_pci"
19 "thunderbolt"
20 "vmd"
21 "nvme"
22 ];
11 boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" ];
2312 boot.initrd.kernelModules = [ ];
2413 boot.kernelModules = [ "kvm-intel" ];
2514 boot.extraModulePackages = [ ];
2615
27 fileSystems."/" = {
28 device = "/dev/disk/by-uuid/8eb0d6a2-b8cf-4ef2-ba2a-e25a5555b0bc";
29 fsType = "ext4";
30 };
16 fileSystems."/" =
17 { device = "/dev/disk/by-uuid/d434c90f-e135-426e-b237-ead2f44e37c6";
18 fsType = "ext4";
19 };
3120
32 fileSystems."/boot/efi" = {
33 device = "/dev/disk/by-uuid/3B51-4A1C";
34 fsType = "vfat";
35 options = [
36 "fmask=0077"
37 "dmask=0077"
38 ];
39 };
21 fileSystems."/boot/EFI" =
22 { device = "/dev/disk/by-uuid/473A-B8FD";
23 fsType = "vfat";
24 options = [ "fmask=0077" "dmask=0077" ];
25 };
4026
41 swapDevices = [
42 { device = "/dev/disk/by-uuid/58ee9d19-292f-49b5-9979-341b42e8e09d"; }
43 ];
27 swapDevices =
28 [ { device = "/dev/disk/by-uuid/e0cac471-0e32-4d5a-bf85-e8f93b304356"; }
29 ];
4430
4531 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
4632 # (the default) this is the recommended approach. When using systemd-networkd it's
users/fish/cattop/home.nix+21-24
......@@ -1,13 +1,4 @@
1{
2 inputs,
3 config,
4 pkgs,
5 lib,
6 userSettings,
7 systemSettings,
8 ...
9}:
10
1{ pkgs, ... }:
112{
123 home = {
134 stateVersion = "23.05"; # Don't change this unless upgrading Home Manager versions
......@@ -15,17 +6,14 @@
156 packages = with pkgs; [
167 # General applications
178 ghostty
18 stremio
19 julia
20 calibre
21 mpv
229 signal-desktop
23 python3
24 gh
2510 spotify
11 equibop
2612
2713 # Gaming
2814 (prismlauncher.override { gamemodeSupport = true; })
15 #bsdgames
16 space-cadet-pinball
2917
3018 # System & desktop tools
3119 wofi
......@@ -37,18 +25,19 @@
3725 ethtool
3826 grub2
3927 efibootmgr
40 distrobox
4128 pqiv
29 imagemagick
30 toybox
4231
4332 # Dev tools
44 legcord
4533 hyfetch
46 kicad
34 python3
35 gh
36 cmake
37 ripgrep
4738
4839 # Unsorted
49 ripgrep
50 busybox
51 imagemagick
40 kicad
5241 ];
5342 };
5443
......@@ -61,7 +50,15 @@
6150 gitCredentialHelper.enable = true;
6251 };
6352
64 # Uncomment if you want to use MangoHud system-wide
65 # mangohud.enable = true;
53 ghostty = {
54 enable = true;
55 shader = "cursor-smear-black.glsl";
56 settings = {
57 theme = "citruszest";
58 adjust-cursor-thickness = 1;
59 background-opacity = 0.95;
60 background-blur = true;
61 };
62 };
6663 };
6764}
users/fish/user.nix+1-1
......@@ -4,7 +4,7 @@ rec {
44 email = "77413091+JulianBarbera@users.noreply.github.com"; # email (used for certain configurations)
55 dotfilesDir = "~/config"; # absolute path of the local repo
66 theme = "catppuccin-mocha"; # name of theme that stylix will use
7 browser = "firefox"; # Default browser; must select one from ./user/app/browser/
7 browser = "zen-browser"; # Default browser; must select one from ./user/app/browser/
88 term = "ghostty"; # Default terminal command;
99 font = "iosevka"; # Selected font
1010 editor = "neovim"; # Default editor;
users/fish/vim.nix+38-1
......@@ -1,3 +1,40 @@
1{ ... }:
1{ pkgs, ... }:
22{
3 imports = [
4 ./vim/default.nix
5 ];
6
7 vim = {
8 #enable python provider
9 withPython3 = true;
10 python3Packages = [ "pynvim" ];
11
12 autocmds = [
13 #Autocommand to fall back to treesitter folding if LSP doesnt support it
14 {
15 event = [ "LspAttach" ];
16 callback = pkgs.lib.generators.mkLuaInline ''
17 function(args)
18 local client = vim.lsp.get_client_by_id(args.data.client_id)
19 if client:supports_method('textDocument/foldingRange') then
20 local win = vim.api.nvim_get_current_win()
21 vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()'
22 end
23 end
24 '';
25 }
26 ];
27
28 tabline = {
29 nvimBufferline.enable = true;
30 };
31 startPlugins = [
32 "nui-nvim"
33 ];
34 theme = {
35 name = "catppuccin";
36 style = "mocha";
37 };
38 hideSearchHighlight = true;
39 };
340}
users/fish/vim/default.nix created+9
......@@ -0,0 +1,9 @@
1{ ... }:
2{
3 imports = [
4 ./languages.nix
5 ./latex.nix
6 ./visuals.nix
7 ./mini.nix
8 ];
9}
users/fish/vim/languages.nix created+155
......@@ -0,0 +1,155 @@
1{
2 flake,
3 user,
4 host,
5 pkgs,
6 ...
7}:
8{
9 vim = {
10 extraPackages = with pkgs; [
11 python312Packages.pylatexenc
12 ];
13 languages = {
14 lua.lsp.enable = true;
15 lua.lsp.lazydev.enable = true;
16 python = {
17 format.type = "ruff";
18 };
19 markdown = {
20 enable = true;
21 extensions.render-markdown-nvim = {
22 enable = true;
23 };
24 };
25 nix = {
26 lsp.servers = [
27 "nil"
28 "nixd"
29 ];
30 };
31 };
32
33 formatter.conform-nvim = {
34 enable = true;
35 setupOpts = {
36 formatters_by_ft = {
37 fish = [ "fish_indent" ];
38 tex = [ "latexindent" ];
39 };
40 };
41 };
42 diagnostics = {
43 enable = true;
44 config = {
45 virtual_text = {
46 format = pkgs.lib.generators.mkLuaInline ''
47 function(diagnostic)
48 return string.format("%s (%s)", diagnostic.message, diagnostic.source)
49 end
50 '';
51 };
52 };
53 nvim-lint = {
54 enable = true;
55 linters_by_ft = {
56 nix = [ "statix" ];
57 tex = [ "chktex" ];
58 haskell = [ "hlint" ];
59 };
60
61 linters = {
62 chktex = {
63 ignore_exitcode = true;
64 };
65 };
66 };
67 };
68 treesitter = {
69 enable = true;
70 fold = true;
71 addDefaultGrammars = true;
72 highlight = {
73 additionalVimRegexHighlighting = true;
74 };
75
76 grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
77 markdown_inline
78 markdown
79 ];
80
81 highlight.enable = true;
82 indent.enable = false;
83 };
84
85 visuals = {
86 fidget-nvim = {
87 setupOpts = {
88 logger.level = "trace";
89 };
90 };
91 };
92
93 ui = {
94 nvim-ufo = {
95 enable = true;
96 };
97 };
98 autocomplete.blink-cmp = {
99 enable = true;
100 mappings = {
101 close = null;
102 complete = null;
103 confirm = null;
104 next = null;
105 previous = null;
106 scrollDocsDown = null;
107 scrollDocsUp = null;
108 };
109
110 setupOpts = {
111 keymap = {
112 preset = "super-tab";
113 };
114 completion = {
115 ghost_text.enabled = false;
116 list.selection.preselect = true;
117 trigger = {
118 show_in_snippet = true;
119 };
120 accept.auto_brackets.enabled = true;
121 };
122 signature = {
123 enabled = true;
124 };
125 };
126 };
127
128 lazy.plugins."blink.pairs" = {
129 enabled = true;
130 package = pkgs.vimPlugins.blink-pairs;
131 setupModule = "blink.pairs";
132 setupOpts = {
133 mappings = {
134 # -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime
135 enabled = true;
136 # -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10
137 pairs = [ ];
138 };
139 highlights = {
140 enabled = true;
141 groups = [
142 "BlinkPairsOrange"
143 "BlinkPairsPurple"
144 "BlinkPairsBlue"
145 ];
146 matchparen = {
147 enabled = true;
148 group = "MatchParen";
149 };
150 };
151 debug = false;
152 };
153 };
154 };
155}
users/fish/vim/latex.nix created+118
......@@ -0,0 +1,118 @@
1{ pkgs, host, ... }:
2{
3 vim = {
4 extraPackages = with pkgs; [
5 texliveFull
6 ];
7 lazy.plugins.cmp-vimtex = {
8 enabled = true;
9 package = pkgs.vimPlugins.cmp-vimtex;
10 lazy = false;
11
12 };
13 lazy.plugins.vimtex = {
14 enabled = true;
15 package = pkgs.vimPlugins.vimtex;
16 lazy = false;
17 };
18
19 globals = {
20 tex_flavor = "latex";
21 maplocalleader = "\\";
22 vimtex_compiler_method = "latexmk";
23 vimtex_view_method = if host.darwin then "skim" else "zathura";
24 vimtex_view_automatic = 1;
25 vimtex_compiler_latexmk = {
26 callback = 1;
27 continuous = 1;
28 executable = "latexmk";
29 hooks = [ ];
30 options = [
31 "-verbose"
32 "-file-line-error"
33 "-synctex=1"
34 "-interaction=nonstopmode"
35 "-shell-escape"
36 ];
37 };
38 vimtex_log_ignore = [
39 "Underfull"
40 "Overfull"
41 "specifier changed to"
42 "Token not allowed in a PDF string"
43 ];
44 vimtex_quickfix_ignore_filters = [
45 "Underfull"
46 "Overfull"
47 ];
48 };
49
50 autocomplete.blink-cmp = {
51 sourcePlugins = {
52 "blink.compat" = {
53 enable = true;
54 package = "blink-compat";
55 module = "blink.compat.source";
56 };
57 };
58 setupOpts = {
59 sources = {
60 default = [ "vimtex" ];
61 providers = {
62 vimtex = {
63 name = "vimtex";
64 module = "blink.compat.source";
65 score_offset = 100;
66 };
67 };
68 };
69 };
70 };
71
72 augroups = [
73 {
74 name = "VimTeX Events";
75 }
76 ];
77 autocmds = [
78 {
79 pattern = [ "VimtexEventViewReverse" ];
80 event = [ "User" ];
81 desc = "Return to nvim after reverse search";
82 command = "call b:vimtex.viewer.xdo_focus_vim()";
83 group = "VimTeX Events";
84 }
85 {
86 pattern = [ "VimtexEventQuit" ];
87 event = [ "User" ];
88 desc = "Close pdf after exiting nvim";
89 command = "VimtexClean";
90 group = "VimTeX Events";
91 }
92
93 {
94 pattern = [ "VimtexEventInitPost" ];
95 event = [ "User" ];
96 desc = "Start compiling when opening nvim to a tex file";
97 command = "VimtexCompile";
98 group = "VimTeX Events";
99 }
100
101 ];
102
103 lsp = {
104 servers = {
105 texlab = {
106 enable = true;
107 cmd = [ "${pkgs.texlab}/bin/texlab" ];
108 filetypes = [ "tex" ];
109 };
110 };
111 };
112 treesitter = {
113 grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
114 latex
115 ];
116 };
117 };
118}
users/fish/vim/mini.nix created+10
......@@ -0,0 +1,10 @@
1{ pkgs, ... }:
2{
3 vim = {
4 mini = {
5 icons.enable = true;
6 ai.enable = true;
7 surround.enable = true;
8 };
9 };
10}
users/fish/vim/visuals.nix created+27
......@@ -0,0 +1,27 @@
1{ pkgs, ... }:
2{
3 vim = {
4 ui = {
5 noice = {
6 enable = true;
7 setupOpts = {
8 lsp = {
9 progress.enabled = false;
10 signature.enabled = true;
11 };
12 presets = {
13 lsp_doc_border = true;
14 long_message_to_split = true;
15 inc_rename = false;
16 command_palette = false;
17 bottom_search = true;
18 };
19 };
20 };
21 borders = {
22 enable = true;
23 };
24 };
25
26 };
27}