Flake for my NixOS devices

Start On

bwc9876.dev 28474349 70c47090

verified
+509 -6
-5
base/shell.nix
··· 43 enable = true; 44 extraPackages = with pkgs.bat-extras; [prettybat batman batgrep batwatch]; 45 }; 46 - neovim = { 47 - enable = true; 48 - defaultEditor = true; 49 - catppuccin.enable = false; 50 - }; 51 }; 52 }
··· 43 enable = true; 44 extraPackages = with pkgs.bat-extras; [prettybat batman batgrep batwatch]; 45 }; 46 }; 47 }
+265
flake.lock
··· 50 "type": "github" 51 } 52 }, 53 "flake-compat": { 54 "flake": false, 55 "locked": { ··· 66 "type": "github" 67 } 68 }, 69 "flake-parts": { 70 "inputs": { 71 "nixpkgs-lib": [ ··· 87 "type": "github" 88 } 89 }, 90 "gh-grader-preview": { 91 "inputs": { 92 "nixpkgs": [ ··· 107 "type": "github" 108 } 109 }, 110 "gitignore": { 111 "inputs": { 112 "nixpkgs": [ ··· 129 "type": "github" 130 } 131 }, 132 "hm": { 133 "inputs": { 134 "nixpkgs": [ ··· 149 "type": "github" 150 } 151 }, 152 "lanzaboote": { 153 "inputs": { 154 "crane": "crane", ··· 174 "type": "github" 175 } 176 }, 177 "nix-index-db": { 178 "inputs": { 179 "nixpkgs": [ ··· 242 "type": "github" 243 } 244 }, 245 "ow-mod-man": { 246 "inputs": { 247 "nixpkgs": [ ··· 299 "nix-index-db": "nix-index-db", 300 "nixos-hardware": "nixos-hardware", 301 "nixpkgs": "nixpkgs", 302 "ow-mod-man": "ow-mod-man", 303 "rust-overlay": "rust-overlay_2", 304 "wayland-mpris-idle-inhibit": "wayland-mpris-idle-inhibit" ··· 342 "original": { 343 "owner": "oxalica", 344 "repo": "rust-overlay", 345 "type": "github" 346 } 347 },
··· 50 "type": "github" 51 } 52 }, 53 + "devshell": { 54 + "inputs": { 55 + "nixpkgs": [ 56 + "nixvim", 57 + "nixpkgs" 58 + ] 59 + }, 60 + "locked": { 61 + "lastModified": 1728330715, 62 + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", 63 + "owner": "numtide", 64 + "repo": "devshell", 65 + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", 66 + "type": "github" 67 + }, 68 + "original": { 69 + "owner": "numtide", 70 + "repo": "devshell", 71 + "type": "github" 72 + } 73 + }, 74 "flake-compat": { 75 "flake": false, 76 "locked": { ··· 87 "type": "github" 88 } 89 }, 90 + "flake-compat_2": { 91 + "locked": { 92 + "lastModified": 1696426674, 93 + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 94 + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 95 + "revCount": 57, 96 + "type": "tarball", 97 + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" 98 + }, 99 + "original": { 100 + "type": "tarball", 101 + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" 102 + } 103 + }, 104 "flake-parts": { 105 "inputs": { 106 "nixpkgs-lib": [ ··· 122 "type": "github" 123 } 124 }, 125 + "flake-parts_2": { 126 + "inputs": { 127 + "nixpkgs-lib": [ 128 + "nixvim", 129 + "nixpkgs" 130 + ] 131 + }, 132 + "locked": { 133 + "lastModified": 1730504689, 134 + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", 135 + "owner": "hercules-ci", 136 + "repo": "flake-parts", 137 + "rev": "506278e768c2a08bec68eb62932193e341f55c90", 138 + "type": "github" 139 + }, 140 + "original": { 141 + "owner": "hercules-ci", 142 + "repo": "flake-parts", 143 + "type": "github" 144 + } 145 + }, 146 + "flake-utils": { 147 + "inputs": { 148 + "systems": "systems" 149 + }, 150 + "locked": { 151 + "lastModified": 1731533236, 152 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 153 + "owner": "numtide", 154 + "repo": "flake-utils", 155 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 156 + "type": "github" 157 + }, 158 + "original": { 159 + "owner": "numtide", 160 + "repo": "flake-utils", 161 + "type": "github" 162 + } 163 + }, 164 "gh-grader-preview": { 165 "inputs": { 166 "nixpkgs": [ ··· 181 "type": "github" 182 } 183 }, 184 + "git-hooks": { 185 + "inputs": { 186 + "flake-compat": [ 187 + "nixvim", 188 + "flake-compat" 189 + ], 190 + "gitignore": "gitignore_2", 191 + "nixpkgs": [ 192 + "nixvim", 193 + "nixpkgs" 194 + ], 195 + "nixpkgs-stable": [ 196 + "nixvim", 197 + "nixpkgs" 198 + ] 199 + }, 200 + "locked": { 201 + "lastModified": 1732021966, 202 + "narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=", 203 + "owner": "cachix", 204 + "repo": "git-hooks.nix", 205 + "rev": "3308484d1a443fc5bc92012435d79e80458fe43c", 206 + "type": "github" 207 + }, 208 + "original": { 209 + "owner": "cachix", 210 + "repo": "git-hooks.nix", 211 + "type": "github" 212 + } 213 + }, 214 "gitignore": { 215 "inputs": { 216 "nixpkgs": [ ··· 233 "type": "github" 234 } 235 }, 236 + "gitignore_2": { 237 + "inputs": { 238 + "nixpkgs": [ 239 + "nixvim", 240 + "git-hooks", 241 + "nixpkgs" 242 + ] 243 + }, 244 + "locked": { 245 + "lastModified": 1709087332, 246 + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 247 + "owner": "hercules-ci", 248 + "repo": "gitignore.nix", 249 + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 250 + "type": "github" 251 + }, 252 + "original": { 253 + "owner": "hercules-ci", 254 + "repo": "gitignore.nix", 255 + "type": "github" 256 + } 257 + }, 258 "hm": { 259 "inputs": { 260 "nixpkgs": [ ··· 275 "type": "github" 276 } 277 }, 278 + "ixx": { 279 + "inputs": { 280 + "flake-utils": [ 281 + "nixvim", 282 + "nuschtosSearch", 283 + "flake-utils" 284 + ], 285 + "nixpkgs": [ 286 + "nixvim", 287 + "nuschtosSearch", 288 + "nixpkgs" 289 + ] 290 + }, 291 + "locked": { 292 + "lastModified": 1729958008, 293 + "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", 294 + "owner": "NuschtOS", 295 + "repo": "ixx", 296 + "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", 297 + "type": "github" 298 + }, 299 + "original": { 300 + "owner": "NuschtOS", 301 + "ref": "v0.0.6", 302 + "repo": "ixx", 303 + "type": "github" 304 + } 305 + }, 306 "lanzaboote": { 307 "inputs": { 308 "crane": "crane", ··· 328 "type": "github" 329 } 330 }, 331 + "nix-darwin": { 332 + "inputs": { 333 + "nixpkgs": [ 334 + "nixvim", 335 + "nixpkgs" 336 + ] 337 + }, 338 + "locked": { 339 + "lastModified": 1733105089, 340 + "narHash": "sha256-Qs3YmoLYUJ8g4RkFj2rMrzrP91e4ShAioC9s+vG6ENM=", 341 + "owner": "lnl7", 342 + "repo": "nix-darwin", 343 + "rev": "c6b65d946097baf3915dd51373251de98199280d", 344 + "type": "github" 345 + }, 346 + "original": { 347 + "owner": "lnl7", 348 + "repo": "nix-darwin", 349 + "type": "github" 350 + } 351 + }, 352 "nix-index-db": { 353 "inputs": { 354 "nixpkgs": [ ··· 417 "type": "github" 418 } 419 }, 420 + "nixvim": { 421 + "inputs": { 422 + "devshell": "devshell", 423 + "flake-compat": "flake-compat_2", 424 + "flake-parts": "flake-parts_2", 425 + "git-hooks": "git-hooks", 426 + "home-manager": [ 427 + "hm" 428 + ], 429 + "nix-darwin": "nix-darwin", 430 + "nixpkgs": [ 431 + "nixpkgs" 432 + ], 433 + "nuschtosSearch": "nuschtosSearch", 434 + "treefmt-nix": "treefmt-nix" 435 + }, 436 + "locked": { 437 + "lastModified": 1733132296, 438 + "narHash": "sha256-fYEf0IgsNJp/hcb+C3FKtJvVabPDQs64hdL0izNBwXc=", 439 + "owner": "nix-community", 440 + "repo": "nixvim", 441 + "rev": "e680b367c726e2ae37d541328fe81f8daaf49a6c", 442 + "type": "github" 443 + }, 444 + "original": { 445 + "owner": "nix-community", 446 + "repo": "nixvim", 447 + "type": "github" 448 + } 449 + }, 450 + "nuschtosSearch": { 451 + "inputs": { 452 + "flake-utils": "flake-utils", 453 + "ixx": "ixx", 454 + "nixpkgs": [ 455 + "nixvim", 456 + "nixpkgs" 457 + ] 458 + }, 459 + "locked": { 460 + "lastModified": 1733006402, 461 + "narHash": "sha256-BC1CecAQISV5Q4LZK72Gx0+faemOwaChiD9rMVfDPoA=", 462 + "owner": "NuschtOS", 463 + "repo": "search", 464 + "rev": "16307548b7a1247291c84ae6a12c0aacb07dfba2", 465 + "type": "github" 466 + }, 467 + "original": { 468 + "owner": "NuschtOS", 469 + "repo": "search", 470 + "type": "github" 471 + } 472 + }, 473 "ow-mod-man": { 474 "inputs": { 475 "nixpkgs": [ ··· 527 "nix-index-db": "nix-index-db", 528 "nixos-hardware": "nixos-hardware", 529 "nixpkgs": "nixpkgs", 530 + "nixvim": "nixvim", 531 "ow-mod-man": "ow-mod-man", 532 "rust-overlay": "rust-overlay_2", 533 "wayland-mpris-idle-inhibit": "wayland-mpris-idle-inhibit" ··· 571 "original": { 572 "owner": "oxalica", 573 "repo": "rust-overlay", 574 + "type": "github" 575 + } 576 + }, 577 + "systems": { 578 + "locked": { 579 + "lastModified": 1681028828, 580 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 581 + "owner": "nix-systems", 582 + "repo": "default", 583 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 584 + "type": "github" 585 + }, 586 + "original": { 587 + "owner": "nix-systems", 588 + "repo": "default", 589 + "type": "github" 590 + } 591 + }, 592 + "treefmt-nix": { 593 + "inputs": { 594 + "nixpkgs": [ 595 + "nixvim", 596 + "nixpkgs" 597 + ] 598 + }, 599 + "locked": { 600 + "lastModified": 1732894027, 601 + "narHash": "sha256-2qbdorpq0TXHBWbVXaTqKoikN4bqAtAplTwGuII+oAc=", 602 + "owner": "numtide", 603 + "repo": "treefmt-nix", 604 + "rev": "6209c381904cab55796c5d7350e89681d3b2a8ef", 605 + "type": "github" 606 + }, 607 + "original": { 608 + "owner": "numtide", 609 + "repo": "treefmt-nix", 610 "type": "github" 611 } 612 },
+4
flake.nix
··· 21 catppuccin.url = "github:catppuccin/nix"; 22 catppuccin-vsc.url = "github:catppuccin/vscode"; 23 catppuccin-vsc.inputs.nixpkgs.follows = "nixpkgs"; 24 }; 25 26 outputs = inputs @ { ··· 36 rust-overlay, 37 catppuccin, 38 catppuccin-vsc, 39 }: let 40 lib = (import ./lib.nix) nixpkgs.lib; 41 pkgsForWithOverlays = system: overlays:
··· 21 catppuccin.url = "github:catppuccin/nix"; 22 catppuccin-vsc.url = "github:catppuccin/vscode"; 23 catppuccin-vsc.inputs.nixpkgs.follows = "nixpkgs"; 24 + nixvim.url = "github:nix-community/nixvim"; 25 + nixvim.inputs.nixpkgs.follows = "nixpkgs"; 26 + nixvim.inputs.home-manager.follows = "hm"; 27 }; 28 29 outputs = inputs @ { ··· 39 rust-overlay, 40 catppuccin, 41 catppuccin-vsc, 42 + nixvim, 43 }: let 44 lib = (import ./lib.nix) nixpkgs.lib; 45 pkgsForWithOverlays = system: overlays:
+23
roles/dev+graphics/nvim.nix
···
··· 1 + {pkg, ...}: { 2 + home-manager.users.bean = { 3 + wayland.windowManager.hyprland.settings.bind = [ 4 + "SUPER,D,exec,neovide" 5 + ]; 6 + programs = { 7 + nixvim = { 8 + clipboard.providers.wl-copy.enable = true; 9 + }; 10 + neovide = { 11 + enable = true; 12 + settings = { 13 + fork = true; 14 + font = { 15 + normal = []; 16 + size = 18.0; 17 + }; 18 + title-hidden = false; 19 + }; 20 + }; 21 + }; 22 + }; 23 + }
+215
roles/dev/nvim.nix
···
··· 1 + { 2 + pkgs, 3 + inputs, 4 + config, 5 + lib, 6 + ... 7 + }: { 8 + environment.systemPackages = with pkgs; [ 9 + ripgrep 10 + fd 11 + ]; 12 + 13 + home-manager.users.bean = { 14 + imports = [inputs.nixvim.homeManagerModules.nixvim]; 15 + 16 + programs.nixvim = { 17 + enable = true; 18 + defaultEditor = true; 19 + viAlias = true; 20 + vimAlias = true; 21 + 22 + globals.mapleader = " "; 23 + 24 + colorschemes.catppuccin = { 25 + enable = true; 26 + settings.flavor = config.catppuccin.flavor; 27 + }; 28 + 29 + performance.byteCompileLua = { 30 + enable = true; 31 + nvimRuntime = true; 32 + plugins = true; 33 + }; 34 + 35 + plugins = { 36 + telescope = { 37 + enable = true; 38 + settings.defaults = { 39 + layout_config.prompt_position = "top"; 40 + }; 41 + extensions = { 42 + file-browser.enable = true; 43 + frecency.enable = true; 44 + ui-select.enable = true; 45 + }; 46 + keymaps = { 47 + "<leader>ff" = { 48 + action = "find_files"; 49 + options.desc = "Find files with Telescope"; 50 + }; 51 + "<leader>fr" = { 52 + action = "frecency"; 53 + options.desc = "Open Recently Edited File"; 54 + }; 55 + "<leader>fgs" = { 56 + action = "git_status"; 57 + options.desc = "Get Git Status"; 58 + }; 59 + "<leader>fgb" = { 60 + action = "git_branches"; 61 + options.desc = "View Git Branches"; 62 + }; 63 + "<leader>fgc" = { 64 + action = "git_commits"; 65 + options.desc = "View Git Commits"; 66 + }; 67 + "<C-S-F>" = { 68 + action = "live_grep"; 69 + options.desc = "Live Grep"; 70 + }; 71 + }; 72 + }; 73 + 74 + dashboard.enable = true; 75 + 76 + trouble = { 77 + enable = true; 78 + }; 79 + 80 + toggleterm = { 81 + enable = true; 82 + settings = { 83 + open_mapping = "[[<C-x>]]"; 84 + direction = "horizontal"; 85 + start_in_insert = true; 86 + insert_mappings = true; 87 + terminal_mappings = true; 88 + }; 89 + }; 90 + 91 + treesitter = { 92 + enable = true; 93 + }; 94 + 95 + illuminate.enable = true; 96 + cursorline.enable = true; 97 + 98 + neocord.enable = true; 99 + 100 + barbar = { 101 + enable = true; 102 + keymaps = { 103 + close.key = "<C-q>"; 104 + closeAllButCurrent.key = "<C-S-q-Up>"; 105 + next.key = "<C-Tab>"; 106 + previous.key = "<C-S-Tab>"; 107 + }; 108 + }; 109 + 110 + project-nvim = { 111 + enable = true; 112 + enableTelescope = true; 113 + }; 114 + 115 + web-devicons.enable = true; 116 + 117 + guess-indent.enable = true; 118 + indent-blankline.enable = true; 119 + intellitab.enable = true; 120 + 121 + which-key = { 122 + enable = true; 123 + settings = { 124 + show_help = true; 125 + preset = "modern"; 126 + }; 127 + }; 128 + 129 + # Rust 130 + # rustaceanvim.enable = true; 131 + 132 + none-ls = { 133 + enable = true; 134 + sources.formatting = { 135 + alejandra.enable = true; 136 + prettier = { 137 + enable = true; 138 + disableTsServerFormatter = true; 139 + }; 140 + yamlfmt.enable = true; 141 + }; 142 + }; 143 + 144 + cmp = { 145 + enable = true; 146 + settings = { 147 + sources = map (name: {inherit name;}) [ 148 + "nvim_lsp" 149 + "nvim_lsp_signature_help" 150 + "path" 151 + "buffer" 152 + ]; 153 + mapping = lib.fix (self: { 154 + "<Esc>" = "cmp.mapping.abort()"; 155 + "<CR>" = "cmp.mapping.confirm({ select = true })"; 156 + "<Up>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; 157 + "<Down>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; 158 + "<Tab>" = self."<Up>"; 159 + "<S-Tab>" = self."<Down>"; 160 + }); 161 + }; 162 + }; 163 + 164 + cmp-nvim-lsp.enable = true; 165 + cmp-nvim-lsp-document-symbol.enable = true; 166 + cmp-spell.enable = true; 167 + 168 + rainbow-delimiters.enable = true; 169 + preview.enable = true; 170 + 171 + lsp-format.enable = true; 172 + lsp-status.enable = true; 173 + lspkind.enable = true; 174 + jupytext.enable = true; 175 + hex.enable = true; 176 + 177 + lspsaga = { 178 + enable = true; 179 + lightbulb.enable = false; 180 + ui = { 181 + codeAction = "󰛨"; 182 + actionfix = "󰖷"; 183 + }; 184 + hover = { 185 + openCmd = "!xdg-open"; 186 + openLink = "<leader>o"; 187 + }; 188 + }; 189 + 190 + lsp = { 191 + enable = true; 192 + inlayHints = true; 193 + 194 + servers = { 195 + astro.enable = true; 196 + ts_ls.enable = true; 197 + html.enable = true; 198 + cssls.enable = true; 199 + jsonls.enable = true; 200 + yamlls.enable = true; 201 + pylsp.enable = true; 202 + nixd.enable = true; 203 + csharp_ls.enable = true; 204 + nushell.enable = true; 205 + taplo.enable = true; 206 + rust_analyzer.enable = true; 207 + rust_analyzer.installCargo = false; 208 + rust_analyzer.installRustc = false; 209 + lemminx.enable = true; 210 + }; 211 + }; 212 + }; 213 + }; 214 + }; 215 + }
+1
roles/fun.nix
··· 7 hyfetch 8 lolcat 9 cowsay 10 toilet 11 gay 12 pipes-rs
··· 7 hyfetch 8 lolcat 9 cowsay 10 + kittysay 11 toilet 12 gay 13 pipes-rs
+1
roles/graphics/firefox.nix
··· 201 "Noogle" = mkEngine ["@noogle" "@nixlib"] "https://noogle.dev/q?limit=100&term={searchTerms}" "png"; 202 "SourceGraph Nix" = mkEngine ["@sgn" "@yoink"] "https://sourcegraph.com/search?q=lang:Nix+-repo:NixOS/*+-repo:nix-community/*+{searchTerms}" "png"; 203 "Nixpkgs Issues" = mkEngineForceFavicon ["@nixissues"] "https://github.com/NixOS/nixpkgs/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+{searchTerms}" "https://github.githubassets.com/favicons/favicon-dark.svg"; 204 205 # Media 206 "YouTube" = mkEngine ["@yt"] "https://www.youtube.com/results?search_query={searchTerms}" "ico";
··· 201 "Noogle" = mkEngine ["@noogle" "@nixlib"] "https://noogle.dev/q?limit=100&term={searchTerms}" "png"; 202 "SourceGraph Nix" = mkEngine ["@sgn" "@yoink"] "https://sourcegraph.com/search?q=lang:Nix+-repo:NixOS/*+-repo:nix-community/*+{searchTerms}" "png"; 203 "Nixpkgs Issues" = mkEngineForceFavicon ["@nixissues"] "https://github.com/NixOS/nixpkgs/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+{searchTerms}" "https://github.githubassets.com/favicons/favicon-dark.svg"; 204 + "NixVim Options" = mkEngineForceFavicon ["@nixvim"] "https://nix-community.github.io/nixvim/search/?option_scope=0&query={searchTerms}" "https://nix-community.github.io/nixvim/search/favicon.ico"; 205 206 # Media 207 "YouTube" = mkEngine ["@yt"] "https://www.youtube.com/results?search_query={searchTerms}" "ico";
-1
roles/graphics/shell.nix
··· 138 "SUPER,I,exec,${pkgs.rofi-pulse-select}/bin/rofi-pulse-select source" 139 "SUPER,O,exec,${pkgs.rofi-pulse-select}/bin/rofi-pulse-select sink" 140 "SUPER,B,exec,${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 141 - "SUPER,D,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-code.nu" 142 "SUPER,Tab,exec,rofi -show window -show-icons" 143 "SUPER,E,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-places.nu" 144 "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-zoxide.nu"
··· 138 "SUPER,I,exec,${pkgs.rofi-pulse-select}/bin/rofi-pulse-select source" 139 "SUPER,O,exec,${pkgs.rofi-pulse-select}/bin/rofi-pulse-select sink" 140 "SUPER,B,exec,${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 141 "SUPER,Tab,exec,rofi -show window -show-icons" 142 "SUPER,E,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-places.nu" 143 "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-zoxide.nu"