this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Switch Over Aperture (b-pc-laptop)

Ben C 396dff15 5e121f68

+1960 -1028
+1 -1
.gitignore
··· 1 1 result 2 - nixos.qcow2 2 + *.qcow2
+2
base/personal.nix
··· 4 4 inputs, 5 5 ... 6 6 }: { 7 + time.timeZone = "America/New_York"; 8 + 7 9 users.users.bean = { 8 10 isNormalUser = true; 9 11 description = "Benjamin Crocker";
+1 -12
base/shell.nix
··· 6 6 users.users.bean.shell = pkgs.nushell; 7 7 programs.fish.enable = true; 8 8 documentation.man.generateCaches = false; 9 + programs.ssh.startAgent = true; 9 10 environment = { 10 11 shells = with pkgs; [nushell fish]; 11 12 variables.EDITOR = "nvim"; ··· 23 24 ]; 24 25 }; 25 26 26 - programs.starship = { 27 - enable = true; 28 - settings = fromTOML (lib.fileContents ../res/starship.toml); 29 - }; 30 - 31 27 programs.git.enable = true; 32 28 33 29 programs.neovim = { ··· 44 40 ripgrep.enable = true; 45 41 bat = { 46 42 enable = true; 47 - config = { 48 - theme = "OneHalfDark"; 49 - }; 50 43 extraPackages = with pkgs.bat-extras; [prettybat batman batgrep batwatch]; 51 - }; 52 - starship = { 53 - enable = true; 54 - settings = fromTOML (lib.fileContents ../res/starship.toml); 55 44 }; 56 45 neovim = { 57 46 enable = true;
+130
base/starship.nix
··· 1 + {...}: let 2 + settings = { 3 + "$schema" = "https://starship.rs/config-schema.json"; 4 + add_newline = false; 5 + character = { 6 + disabled = false; 7 + error_symbol = "[󰀨](bold red bg:crust)"; 8 + format = "[ $symbol ](bg:crust)"; 9 + success_symbol = "[󰗠](bold green bg:crust)"; 10 + }; 11 + cmd_duration = { 12 + disabled = false; 13 + format = "[ 󱎫 $duration ]($style)"; 14 + min_time = 2000; 15 + style = "bg:crust blue"; 16 + }; 17 + directory = { 18 + format = "[ ($read_only )$path ]($style)"; 19 + home_symbol = "󰋜"; 20 + read_only = "󰌾"; 21 + style = "bold green bg:crust"; 22 + truncate_to_repo = true; 23 + truncation_length = 10; 24 + }; 25 + format = "[░▒▓](crust)[ $os$hostname[](bg:crust #999999)$shell$username[](bg:crust #999999)$directory([](bg:crust #999999)$git_branch$git_commit$git_state)([](bg:crust #999999)$nodejs$python$rust$nix_shell)](bg:crust)[ ](crust)"; 26 + git_branch = { 27 + format = "[ $symbol ($branch )]($style)"; 28 + style = "bg:crust green"; 29 + symbol = "󰘬"; 30 + }; 31 + git_state = { 32 + format = "\\([$state( $progress_current/$progress_total)]($style)\\)"; 33 + merge = "󰘭"; 34 + rebase = "󱗬"; 35 + revert = "󰕍"; 36 + style = "bg:crust green yellow"; 37 + }; 38 + git_status = { 39 + conflicted = "󰀦"; 40 + format = "[$all_status $ahead_behind ]($style)"; 41 + modified = "󰏫"; 42 + style = "bg:crust green"; 43 + }; 44 + hostname = { 45 + format = "[$hostname( $ssh_symbol) ]($style)"; 46 + ssh_only = false; 47 + ssh_symbol = ""; 48 + style = "bold blue bg:crust"; 49 + }; 50 + line_break = {disabled = true;}; 51 + nix_shell = { 52 + format = "[ $state ](bold blue bg:crust) "; 53 + impure_msg = "[󱄅 impure](bold red bg:crust)"; 54 + pure_msg = "[󱄅](bold green bg:crust)"; 55 + style = "bg:crust green"; 56 + unknown_msg = "[󱄅 unknown](bold yellow bg:crust)"; 57 + }; 58 + nodejs = { 59 + format = "[ $symbol ($version) ]($style)"; 60 + not_capable_style = "bg:crust green bold red"; 61 + style = "bg:crust green"; 62 + symbol = "󰎙"; 63 + }; 64 + os = { 65 + disabled = false; 66 + format = "[$symbol ]($style)"; 67 + style = "bg:crust bold lightcrust"; 68 + symbols = { 69 + Android = ""; 70 + Debian = ""; 71 + Linux = ""; 72 + Macos = ""; 73 + Manjaro = ""; 74 + NixOS = "󱄅"; 75 + Raspbian = ""; 76 + Ubuntu = ""; 77 + Windows = ""; 78 + }; 79 + }; 80 + python = { 81 + format = "[ $symbol ($version) ]($style)"; 82 + style = "bg:crust green"; 83 + symbol = "󰌠"; 84 + }; 85 + right_format = "[ ](crust)\n($character$status[](bg:crust #999999))\n($cmd_duration[](bg:crust #999999))$time[▓▒░](crust)\n"; 86 + rust = { 87 + format = "[ $symbol ($version) ]($style)"; 88 + style = "bg:crust green"; 89 + symbol = "󱘗"; 90 + }; 91 + shell = { 92 + bash_indicator = "󱆃"; 93 + disabled = false; 94 + fish_indicator = "󰈺"; 95 + format = "[ $indicator ]($style)"; 96 + nu_indicator = "󰨊"; 97 + powershell_indicator = "󰨊"; 98 + style = "bg:crust blue"; 99 + unknown_indicator = "󰋗"; 100 + }; 101 + status = { 102 + disabled = false; 103 + format = "[$status ]($style)"; 104 + style = "bg:crust red"; 105 + }; 106 + time = { 107 + disabled = false; 108 + format = "[ $time ]($style)"; 109 + style = "bg:crust bold blue"; 110 + time_format = "%a %b %d %I:%M %p 󰥔"; 111 + use_12hr = true; 112 + }; 113 + username = { 114 + format = "[$user ]($style)"; 115 + show_always = true; 116 + style_root = "bold red bg:crust"; 117 + style_user = "blue bg:crust"; 118 + }; 119 + }; 120 + in { 121 + programs.starship = { 122 + enable = true; 123 + inherit settings; 124 + }; 125 + 126 + home-manager.users.bean.programs.starship = { 127 + enable = true; 128 + inherit settings; 129 + }; 130 + }
+21
base/theming.nix
··· 1 + {inputs, ...}: let 2 + catppuccin = { 3 + enable = true; 4 + flavor = "mocha"; 5 + accent = "green"; 6 + }; 7 + in { 8 + imports = [ 9 + inputs.catppuccin.nixosModules.catppuccin 10 + ]; 11 + 12 + inherit catppuccin; 13 + 14 + home-manager.users.bean = { 15 + imports = [ 16 + inputs.catppuccin.homeManagerModules.catppuccin 17 + ]; 18 + 19 + inherit catppuccin; 20 + }; 21 + }
+2
create-sys/.gitignore
··· 1 + target 2 + result
+729
create-sys/Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 4 4 + 5 + [[package]] 6 + name = "aho-corasick" 7 + version = "1.1.3" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 10 + dependencies = [ 11 + "memchr", 12 + ] 13 + 14 + [[package]] 15 + name = "anstream" 16 + version = "0.6.18" 17 + source = "registry+https://github.com/rust-lang/crates.io-index" 18 + checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 19 + dependencies = [ 20 + "anstyle", 21 + "anstyle-parse", 22 + "anstyle-query", 23 + "anstyle-wincon", 24 + "colorchoice", 25 + "is_terminal_polyfill", 26 + "utf8parse", 27 + ] 28 + 29 + [[package]] 30 + name = "anstyle" 31 + version = "1.0.10" 32 + source = "registry+https://github.com/rust-lang/crates.io-index" 33 + checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 34 + 35 + [[package]] 36 + name = "anstyle-parse" 37 + version = "0.2.6" 38 + source = "registry+https://github.com/rust-lang/crates.io-index" 39 + checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 40 + dependencies = [ 41 + "utf8parse", 42 + ] 43 + 44 + [[package]] 45 + name = "anstyle-query" 46 + version = "1.1.2" 47 + source = "registry+https://github.com/rust-lang/crates.io-index" 48 + checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 49 + dependencies = [ 50 + "windows-sys 0.59.0", 51 + ] 52 + 53 + [[package]] 54 + name = "anstyle-wincon" 55 + version = "3.0.6" 56 + source = "registry+https://github.com/rust-lang/crates.io-index" 57 + checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" 58 + dependencies = [ 59 + "anstyle", 60 + "windows-sys 0.59.0", 61 + ] 62 + 63 + [[package]] 64 + name = "anyhow" 65 + version = "1.0.93" 66 + source = "registry+https://github.com/rust-lang/crates.io-index" 67 + checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" 68 + 69 + [[package]] 70 + name = "autocfg" 71 + version = "1.4.0" 72 + source = "registry+https://github.com/rust-lang/crates.io-index" 73 + checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 74 + 75 + [[package]] 76 + name = "bitflags" 77 + version = "1.3.2" 78 + source = "registry+https://github.com/rust-lang/crates.io-index" 79 + checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 80 + 81 + [[package]] 82 + name = "bitflags" 83 + version = "2.6.0" 84 + source = "registry+https://github.com/rust-lang/crates.io-index" 85 + checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 86 + 87 + [[package]] 88 + name = "byteorder" 89 + version = "1.5.0" 90 + source = "registry+https://github.com/rust-lang/crates.io-index" 91 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 92 + 93 + [[package]] 94 + name = "cfg-if" 95 + version = "1.0.0" 96 + source = "registry+https://github.com/rust-lang/crates.io-index" 97 + checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 98 + 99 + [[package]] 100 + name = "clap" 101 + version = "4.5.21" 102 + source = "registry+https://github.com/rust-lang/crates.io-index" 103 + checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" 104 + dependencies = [ 105 + "clap_builder", 106 + "clap_derive", 107 + ] 108 + 109 + [[package]] 110 + name = "clap_builder" 111 + version = "4.5.21" 112 + source = "registry+https://github.com/rust-lang/crates.io-index" 113 + checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" 114 + dependencies = [ 115 + "anstream", 116 + "anstyle", 117 + "clap_lex", 118 + "strsim", 119 + ] 120 + 121 + [[package]] 122 + name = "clap_derive" 123 + version = "4.5.18" 124 + source = "registry+https://github.com/rust-lang/crates.io-index" 125 + checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" 126 + dependencies = [ 127 + "heck", 128 + "proc-macro2", 129 + "quote", 130 + "syn", 131 + ] 132 + 133 + [[package]] 134 + name = "clap_lex" 135 + version = "0.7.3" 136 + source = "registry+https://github.com/rust-lang/crates.io-index" 137 + checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" 138 + 139 + [[package]] 140 + name = "colorchoice" 141 + version = "1.0.3" 142 + source = "registry+https://github.com/rust-lang/crates.io-index" 143 + checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 144 + 145 + [[package]] 146 + name = "create-sys" 147 + version = "0.1.0" 148 + dependencies = [ 149 + "anyhow", 150 + "clap", 151 + "inquire", 152 + "regex", 153 + "serde", 154 + "serde_json", 155 + ] 156 + 157 + [[package]] 158 + name = "crossterm" 159 + version = "0.25.0" 160 + source = "registry+https://github.com/rust-lang/crates.io-index" 161 + checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" 162 + dependencies = [ 163 + "bitflags 1.3.2", 164 + "crossterm_winapi", 165 + "libc", 166 + "mio", 167 + "parking_lot", 168 + "signal-hook", 169 + "signal-hook-mio", 170 + "winapi", 171 + ] 172 + 173 + [[package]] 174 + name = "crossterm_winapi" 175 + version = "0.9.1" 176 + source = "registry+https://github.com/rust-lang/crates.io-index" 177 + checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" 178 + dependencies = [ 179 + "winapi", 180 + ] 181 + 182 + [[package]] 183 + name = "dyn-clone" 184 + version = "1.0.17" 185 + source = "registry+https://github.com/rust-lang/crates.io-index" 186 + checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" 187 + 188 + [[package]] 189 + name = "errno" 190 + version = "0.3.9" 191 + source = "registry+https://github.com/rust-lang/crates.io-index" 192 + checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 193 + dependencies = [ 194 + "libc", 195 + "windows-sys 0.52.0", 196 + ] 197 + 198 + [[package]] 199 + name = "fastrand" 200 + version = "2.2.0" 201 + source = "registry+https://github.com/rust-lang/crates.io-index" 202 + checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" 203 + 204 + [[package]] 205 + name = "fuzzy-matcher" 206 + version = "0.3.7" 207 + source = "registry+https://github.com/rust-lang/crates.io-index" 208 + checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" 209 + dependencies = [ 210 + "thread_local", 211 + ] 212 + 213 + [[package]] 214 + name = "fxhash" 215 + version = "0.2.1" 216 + source = "registry+https://github.com/rust-lang/crates.io-index" 217 + checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 218 + dependencies = [ 219 + "byteorder", 220 + ] 221 + 222 + [[package]] 223 + name = "heck" 224 + version = "0.5.0" 225 + source = "registry+https://github.com/rust-lang/crates.io-index" 226 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 227 + 228 + [[package]] 229 + name = "inquire" 230 + version = "0.7.5" 231 + source = "registry+https://github.com/rust-lang/crates.io-index" 232 + checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" 233 + dependencies = [ 234 + "bitflags 2.6.0", 235 + "crossterm", 236 + "dyn-clone", 237 + "fuzzy-matcher", 238 + "fxhash", 239 + "newline-converter", 240 + "once_cell", 241 + "tempfile", 242 + "unicode-segmentation", 243 + "unicode-width", 244 + ] 245 + 246 + [[package]] 247 + name = "is_terminal_polyfill" 248 + version = "1.70.1" 249 + source = "registry+https://github.com/rust-lang/crates.io-index" 250 + checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 251 + 252 + [[package]] 253 + name = "itoa" 254 + version = "1.0.13" 255 + source = "registry+https://github.com/rust-lang/crates.io-index" 256 + checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" 257 + 258 + [[package]] 259 + name = "libc" 260 + version = "0.2.164" 261 + source = "registry+https://github.com/rust-lang/crates.io-index" 262 + checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" 263 + 264 + [[package]] 265 + name = "linux-raw-sys" 266 + version = "0.4.14" 267 + source = "registry+https://github.com/rust-lang/crates.io-index" 268 + checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 269 + 270 + [[package]] 271 + name = "lock_api" 272 + version = "0.4.12" 273 + source = "registry+https://github.com/rust-lang/crates.io-index" 274 + checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 275 + dependencies = [ 276 + "autocfg", 277 + "scopeguard", 278 + ] 279 + 280 + [[package]] 281 + name = "log" 282 + version = "0.4.22" 283 + source = "registry+https://github.com/rust-lang/crates.io-index" 284 + checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 285 + 286 + [[package]] 287 + name = "memchr" 288 + version = "2.7.4" 289 + source = "registry+https://github.com/rust-lang/crates.io-index" 290 + checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 291 + 292 + [[package]] 293 + name = "mio" 294 + version = "0.8.11" 295 + source = "registry+https://github.com/rust-lang/crates.io-index" 296 + checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 297 + dependencies = [ 298 + "libc", 299 + "log", 300 + "wasi", 301 + "windows-sys 0.48.0", 302 + ] 303 + 304 + [[package]] 305 + name = "newline-converter" 306 + version = "0.3.0" 307 + source = "registry+https://github.com/rust-lang/crates.io-index" 308 + checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" 309 + dependencies = [ 310 + "unicode-segmentation", 311 + ] 312 + 313 + [[package]] 314 + name = "once_cell" 315 + version = "1.20.2" 316 + source = "registry+https://github.com/rust-lang/crates.io-index" 317 + checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 318 + 319 + [[package]] 320 + name = "parking_lot" 321 + version = "0.12.3" 322 + source = "registry+https://github.com/rust-lang/crates.io-index" 323 + checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 324 + dependencies = [ 325 + "lock_api", 326 + "parking_lot_core", 327 + ] 328 + 329 + [[package]] 330 + name = "parking_lot_core" 331 + version = "0.9.10" 332 + source = "registry+https://github.com/rust-lang/crates.io-index" 333 + checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 334 + dependencies = [ 335 + "cfg-if", 336 + "libc", 337 + "redox_syscall", 338 + "smallvec", 339 + "windows-targets 0.52.6", 340 + ] 341 + 342 + [[package]] 343 + name = "proc-macro2" 344 + version = "1.0.92" 345 + source = "registry+https://github.com/rust-lang/crates.io-index" 346 + checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" 347 + dependencies = [ 348 + "unicode-ident", 349 + ] 350 + 351 + [[package]] 352 + name = "quote" 353 + version = "1.0.37" 354 + source = "registry+https://github.com/rust-lang/crates.io-index" 355 + checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 356 + dependencies = [ 357 + "proc-macro2", 358 + ] 359 + 360 + [[package]] 361 + name = "redox_syscall" 362 + version = "0.5.7" 363 + source = "registry+https://github.com/rust-lang/crates.io-index" 364 + checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" 365 + dependencies = [ 366 + "bitflags 2.6.0", 367 + ] 368 + 369 + [[package]] 370 + name = "regex" 371 + version = "1.11.1" 372 + source = "registry+https://github.com/rust-lang/crates.io-index" 373 + checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 374 + dependencies = [ 375 + "aho-corasick", 376 + "memchr", 377 + "regex-automata", 378 + "regex-syntax", 379 + ] 380 + 381 + [[package]] 382 + name = "regex-automata" 383 + version = "0.4.9" 384 + source = "registry+https://github.com/rust-lang/crates.io-index" 385 + checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 386 + dependencies = [ 387 + "aho-corasick", 388 + "memchr", 389 + "regex-syntax", 390 + ] 391 + 392 + [[package]] 393 + name = "regex-syntax" 394 + version = "0.8.5" 395 + source = "registry+https://github.com/rust-lang/crates.io-index" 396 + checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 397 + 398 + [[package]] 399 + name = "rustix" 400 + version = "0.38.39" 401 + source = "registry+https://github.com/rust-lang/crates.io-index" 402 + checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" 403 + dependencies = [ 404 + "bitflags 2.6.0", 405 + "errno", 406 + "libc", 407 + "linux-raw-sys", 408 + "windows-sys 0.52.0", 409 + ] 410 + 411 + [[package]] 412 + name = "ryu" 413 + version = "1.0.18" 414 + source = "registry+https://github.com/rust-lang/crates.io-index" 415 + checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 416 + 417 + [[package]] 418 + name = "scopeguard" 419 + version = "1.2.0" 420 + source = "registry+https://github.com/rust-lang/crates.io-index" 421 + checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 422 + 423 + [[package]] 424 + name = "serde" 425 + version = "1.0.215" 426 + source = "registry+https://github.com/rust-lang/crates.io-index" 427 + checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" 428 + dependencies = [ 429 + "serde_derive", 430 + ] 431 + 432 + [[package]] 433 + name = "serde_derive" 434 + version = "1.0.215" 435 + source = "registry+https://github.com/rust-lang/crates.io-index" 436 + checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" 437 + dependencies = [ 438 + "proc-macro2", 439 + "quote", 440 + "syn", 441 + ] 442 + 443 + [[package]] 444 + name = "serde_json" 445 + version = "1.0.133" 446 + source = "registry+https://github.com/rust-lang/crates.io-index" 447 + checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" 448 + dependencies = [ 449 + "itoa", 450 + "memchr", 451 + "ryu", 452 + "serde", 453 + ] 454 + 455 + [[package]] 456 + name = "signal-hook" 457 + version = "0.3.17" 458 + source = "registry+https://github.com/rust-lang/crates.io-index" 459 + checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 460 + dependencies = [ 461 + "libc", 462 + "signal-hook-registry", 463 + ] 464 + 465 + [[package]] 466 + name = "signal-hook-mio" 467 + version = "0.2.4" 468 + source = "registry+https://github.com/rust-lang/crates.io-index" 469 + checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" 470 + dependencies = [ 471 + "libc", 472 + "mio", 473 + "signal-hook", 474 + ] 475 + 476 + [[package]] 477 + name = "signal-hook-registry" 478 + version = "1.4.2" 479 + source = "registry+https://github.com/rust-lang/crates.io-index" 480 + checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 481 + dependencies = [ 482 + "libc", 483 + ] 484 + 485 + [[package]] 486 + name = "smallvec" 487 + version = "1.13.2" 488 + source = "registry+https://github.com/rust-lang/crates.io-index" 489 + checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 490 + 491 + [[package]] 492 + name = "strsim" 493 + version = "0.11.1" 494 + source = "registry+https://github.com/rust-lang/crates.io-index" 495 + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 496 + 497 + [[package]] 498 + name = "syn" 499 + version = "2.0.89" 500 + source = "registry+https://github.com/rust-lang/crates.io-index" 501 + checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" 502 + dependencies = [ 503 + "proc-macro2", 504 + "quote", 505 + "unicode-ident", 506 + ] 507 + 508 + [[package]] 509 + name = "tempfile" 510 + version = "3.14.0" 511 + source = "registry+https://github.com/rust-lang/crates.io-index" 512 + checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" 513 + dependencies = [ 514 + "cfg-if", 515 + "fastrand", 516 + "once_cell", 517 + "rustix", 518 + "windows-sys 0.59.0", 519 + ] 520 + 521 + [[package]] 522 + name = "thread_local" 523 + version = "1.1.8" 524 + source = "registry+https://github.com/rust-lang/crates.io-index" 525 + checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 526 + dependencies = [ 527 + "cfg-if", 528 + "once_cell", 529 + ] 530 + 531 + [[package]] 532 + name = "unicode-ident" 533 + version = "1.0.14" 534 + source = "registry+https://github.com/rust-lang/crates.io-index" 535 + checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" 536 + 537 + [[package]] 538 + name = "unicode-segmentation" 539 + version = "1.12.0" 540 + source = "registry+https://github.com/rust-lang/crates.io-index" 541 + checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 542 + 543 + [[package]] 544 + name = "unicode-width" 545 + version = "0.1.14" 546 + source = "registry+https://github.com/rust-lang/crates.io-index" 547 + checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 548 + 549 + [[package]] 550 + name = "utf8parse" 551 + version = "0.2.2" 552 + source = "registry+https://github.com/rust-lang/crates.io-index" 553 + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 554 + 555 + [[package]] 556 + name = "wasi" 557 + version = "0.11.0+wasi-snapshot-preview1" 558 + source = "registry+https://github.com/rust-lang/crates.io-index" 559 + checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 560 + 561 + [[package]] 562 + name = "winapi" 563 + version = "0.3.9" 564 + source = "registry+https://github.com/rust-lang/crates.io-index" 565 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 566 + dependencies = [ 567 + "winapi-i686-pc-windows-gnu", 568 + "winapi-x86_64-pc-windows-gnu", 569 + ] 570 + 571 + [[package]] 572 + name = "winapi-i686-pc-windows-gnu" 573 + version = "0.4.0" 574 + source = "registry+https://github.com/rust-lang/crates.io-index" 575 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 576 + 577 + [[package]] 578 + name = "winapi-x86_64-pc-windows-gnu" 579 + version = "0.4.0" 580 + source = "registry+https://github.com/rust-lang/crates.io-index" 581 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 582 + 583 + [[package]] 584 + name = "windows-sys" 585 + version = "0.48.0" 586 + source = "registry+https://github.com/rust-lang/crates.io-index" 587 + checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 588 + dependencies = [ 589 + "windows-targets 0.48.5", 590 + ] 591 + 592 + [[package]] 593 + name = "windows-sys" 594 + version = "0.52.0" 595 + source = "registry+https://github.com/rust-lang/crates.io-index" 596 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 597 + dependencies = [ 598 + "windows-targets 0.52.6", 599 + ] 600 + 601 + [[package]] 602 + name = "windows-sys" 603 + version = "0.59.0" 604 + source = "registry+https://github.com/rust-lang/crates.io-index" 605 + checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 606 + dependencies = [ 607 + "windows-targets 0.52.6", 608 + ] 609 + 610 + [[package]] 611 + name = "windows-targets" 612 + version = "0.48.5" 613 + source = "registry+https://github.com/rust-lang/crates.io-index" 614 + checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 615 + dependencies = [ 616 + "windows_aarch64_gnullvm 0.48.5", 617 + "windows_aarch64_msvc 0.48.5", 618 + "windows_i686_gnu 0.48.5", 619 + "windows_i686_msvc 0.48.5", 620 + "windows_x86_64_gnu 0.48.5", 621 + "windows_x86_64_gnullvm 0.48.5", 622 + "windows_x86_64_msvc 0.48.5", 623 + ] 624 + 625 + [[package]] 626 + name = "windows-targets" 627 + version = "0.52.6" 628 + source = "registry+https://github.com/rust-lang/crates.io-index" 629 + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 630 + dependencies = [ 631 + "windows_aarch64_gnullvm 0.52.6", 632 + "windows_aarch64_msvc 0.52.6", 633 + "windows_i686_gnu 0.52.6", 634 + "windows_i686_gnullvm", 635 + "windows_i686_msvc 0.52.6", 636 + "windows_x86_64_gnu 0.52.6", 637 + "windows_x86_64_gnullvm 0.52.6", 638 + "windows_x86_64_msvc 0.52.6", 639 + ] 640 + 641 + [[package]] 642 + name = "windows_aarch64_gnullvm" 643 + version = "0.48.5" 644 + source = "registry+https://github.com/rust-lang/crates.io-index" 645 + checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 646 + 647 + [[package]] 648 + name = "windows_aarch64_gnullvm" 649 + version = "0.52.6" 650 + source = "registry+https://github.com/rust-lang/crates.io-index" 651 + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 652 + 653 + [[package]] 654 + name = "windows_aarch64_msvc" 655 + version = "0.48.5" 656 + source = "registry+https://github.com/rust-lang/crates.io-index" 657 + checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 658 + 659 + [[package]] 660 + name = "windows_aarch64_msvc" 661 + version = "0.52.6" 662 + source = "registry+https://github.com/rust-lang/crates.io-index" 663 + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 664 + 665 + [[package]] 666 + name = "windows_i686_gnu" 667 + version = "0.48.5" 668 + source = "registry+https://github.com/rust-lang/crates.io-index" 669 + checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 670 + 671 + [[package]] 672 + name = "windows_i686_gnu" 673 + version = "0.52.6" 674 + source = "registry+https://github.com/rust-lang/crates.io-index" 675 + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 676 + 677 + [[package]] 678 + name = "windows_i686_gnullvm" 679 + version = "0.52.6" 680 + source = "registry+https://github.com/rust-lang/crates.io-index" 681 + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 682 + 683 + [[package]] 684 + name = "windows_i686_msvc" 685 + version = "0.48.5" 686 + source = "registry+https://github.com/rust-lang/crates.io-index" 687 + checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 688 + 689 + [[package]] 690 + name = "windows_i686_msvc" 691 + version = "0.52.6" 692 + source = "registry+https://github.com/rust-lang/crates.io-index" 693 + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 694 + 695 + [[package]] 696 + name = "windows_x86_64_gnu" 697 + version = "0.48.5" 698 + source = "registry+https://github.com/rust-lang/crates.io-index" 699 + checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 700 + 701 + [[package]] 702 + name = "windows_x86_64_gnu" 703 + version = "0.52.6" 704 + source = "registry+https://github.com/rust-lang/crates.io-index" 705 + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 706 + 707 + [[package]] 708 + name = "windows_x86_64_gnullvm" 709 + version = "0.48.5" 710 + source = "registry+https://github.com/rust-lang/crates.io-index" 711 + checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 712 + 713 + [[package]] 714 + name = "windows_x86_64_gnullvm" 715 + version = "0.52.6" 716 + source = "registry+https://github.com/rust-lang/crates.io-index" 717 + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 718 + 719 + [[package]] 720 + name = "windows_x86_64_msvc" 721 + version = "0.48.5" 722 + source = "registry+https://github.com/rust-lang/crates.io-index" 723 + checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 724 + 725 + [[package]] 726 + name = "windows_x86_64_msvc" 727 + version = "0.52.6" 728 + source = "registry+https://github.com/rust-lang/crates.io-index" 729 + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+12
create-sys/Cargo.toml
··· 1 + [package] 2 + name = "create-sys" 3 + version = "0.1.0" 4 + edition = "2021" 5 + 6 + [dependencies] 7 + anyhow = "1.0.93" 8 + clap = { version = "4.5.21", features = ["derive"] } 9 + inquire = { version = "0.7.5", features = ["editor"] } 10 + regex = "1.11.1" 11 + serde = "1.0.215" 12 + serde_json = "1.0.133"
+217
create-sys/src/add.rs
··· 1 + use std::{ 2 + fs, 3 + path::Path, 4 + process::{Command, Stdio}, 5 + }; 6 + 7 + use inquire::{validator::Validation, Confirm, Editor, MultiSelect, Select, Text}; 8 + 9 + use crate::prelude::*; 10 + 11 + fn list_roles(roles_folder: &Path) -> Result<Vec<String>> { 12 + Ok(fs::read_dir(roles_folder) 13 + .context("Failed to read roles")? 14 + .into_iter() 15 + .filter_map(|r| { 16 + r.ok() 17 + .map(|d| d.file_name().to_string_lossy().trim_end_matches(".nix").to_string()) 18 + .filter(|n| !n.contains('+')) 19 + }) 20 + .collect()) 21 + } 22 + 23 + const NO_HARDWARE_MOD: &str = "No NixOS Hardware Module"; 24 + 25 + fn list_hardware_modules() -> Result<Vec<String>> { 26 + let mut cmd = Command::new("nix"); 27 + cmd.arg("eval") 28 + .arg("github:nixos/nixos-hardware#nixosModules") 29 + .arg("--raw") 30 + .arg("--apply") 31 + .arg("s: builtins.toJSON (builtins.attrNames s)") 32 + .stdout(Stdio::piped()) 33 + .stderr(Stdio::null()); 34 + 35 + let output = cmd.output().context("Failed to fetch systems")?.stdout; 36 + let mut modules: Vec<String> = serde_json::from_slice(&output).context("Failed to parse systems")?; 37 + 38 + modules.insert(0, NO_HARDWARE_MOD.into()); 39 + 40 + Ok(modules) 41 + } 42 + 43 + fn list_targets() -> Result<Vec<String>> { 44 + let mut cmd = Command::new("nix"); 45 + cmd.arg("eval") 46 + .arg("nixpkgs#lib.systems.flakeExposed") 47 + .arg("--raw") 48 + .arg("--apply") 49 + .arg("builtins.toJSON") 50 + .stdout(Stdio::piped()) 51 + .stderr(Stdio::null()); 52 + 53 + let output = cmd.output().context("Failed to fetch systems")?.stdout; 54 + let modules = serde_json::from_slice(&output).context("Failed to parse systems")?; 55 + Ok(modules) 56 + } 57 + 58 + fn get_nixpkgs_version() -> Result<String> { 59 + let mut cmd = Command::new("nix"); 60 + cmd.arg("eval") 61 + .arg("nixpkgs#lib.version") 62 + .arg("--raw") 63 + .stdout(Stdio::piped()) 64 + .stderr(Stdio::null()); 65 + 66 + 67 + let output = cmd.output().context("Failed to fetch systems")?.stdout; 68 + let output = String::from_utf8_lossy(&output); 69 + 70 + let otp = output.trim().split('.').take(2).collect::<Vec<_>>(); 71 + 72 + Ok(otp.join(".")) 73 + } 74 + 75 + 76 + fn gen_hardware_config(root: Option<&Path>) -> Result<String> { 77 + let mut cmd = Command::new("nixos-generate-config"); 78 + cmd.arg("--show-hardware-config").stdout(Stdio::piped()); 79 + 80 + if let Some(root) = root { 81 + cmd.arg("--root").arg(root); 82 + } 83 + 84 + let output = cmd.output().context("Failed to fetch systems")?.stdout; 85 + let output = String::from_utf8_lossy(&output); 86 + 87 + let otp = output.trim().split('\n').skip(3).collect::<Vec<_>>(); 88 + Ok(format!("({})", otp.join("\n"))) 89 + } 90 + 91 + struct System { 92 + name: String, 93 + description: String, 94 + edition: String, 95 + target: String, 96 + include_base_mods: bool, 97 + roles: Vec<String>, 98 + hardware_config: String, 99 + hardware_mod: String, 100 + } 101 + 102 + fn dialog(flake_root: &Path) -> Result<System> { 103 + // Name 104 + 105 + let fl_root_val = flake_root.to_owned(); 106 + 107 + let system_filter = move |name: &str| { 108 + Ok(if !name.is_empty() && name.chars().all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-') { 109 + if fl_root_val.join("systems").join(format!("{name}.nix")).is_file() { 110 + Validation::Invalid("System config already exists!".into()) 111 + } else { 112 + Validation::Valid 113 + } 114 + } else { 115 + Validation::Invalid("System configs should use kebab-case".into()) 116 + }) 117 + }; 118 + 119 + let system_name = Text::new("Enter a name for the new system") 120 + .with_validator(system_filter) 121 + .prompt() 122 + .context("Failed to get system name")?; 123 + 124 + // Target 125 + 126 + let targets = list_targets().context("Failed to get targets")?; 127 + let system_target = Select::new("Select what arch/OS this system will target", targets) 128 + .prompt() 129 + .context("Failed to prompt for system target")?; 130 + 131 + // Description 132 + 133 + let description = Text::new("Enter system description") 134 + .prompt_skippable() 135 + .context("Failed to prompt for description")? 136 + .unwrap_or_else(|| "Generic".to_string()); 137 + 138 + // Base Mods 139 + 140 + let include_base_mods = Confirm::new("Should this system include base modules?") 141 + .with_default(true) 142 + .prompt() 143 + .context("Failed to prompt")?; 144 + 145 + // Generate Hardware Config? 146 + 147 + let gen_hw_config = Confirm::new("Would you like to auto-generate a hardware configuration for this system with `nixos-generate-config`?").prompt().context("Failed to prompt")?; 148 + let hw_config = if gen_hw_config { 149 + gen_hardware_config(None).context("Failed to generate hw config")? 150 + } else { 151 + String::new() 152 + }; 153 + 154 + // NixOS Hardware 155 + 156 + let hardware_mod = if let Ok(modules) = list_hardware_modules() { 157 + let hardware_mod = Select::new("(Optional) Select a NixOS Hardware Module for the System", modules).with_starting_cursor(0).prompt().context("Failed to prompt for hw modules")?; 158 + if hardware_mod == NO_HARDWARE_MOD { 159 + String::new() 160 + } else { 161 + hardware_mod 162 + } 163 + } else { 164 + println!("Failed to fetch modules from NixOS hardware, continuing..."); 165 + String::new() 166 + }; 167 + 168 + // Asking For System Roles 169 + 170 + let roles_path = flake_root.join("roles"); 171 + let roles = list_roles(&roles_path).context("Failed to list roles")?; 172 + let selected_roles = MultiSelect::new("Select the roles for this new system", roles) 173 + .prompt() 174 + .context("Failed to promp user for roles")?; 175 + 176 + Ok(System { 177 + name: system_name, 178 + description: description, 179 + target: system_target, 180 + roles: selected_roles.into_iter().map(|r| format!("\"{r}\"")).collect(), 181 + edition: get_nixpkgs_version().context("Failed to get latest")?, 182 + include_base_mods, 183 + hardware_config: hw_config, 184 + hardware_mod, 185 + }) 186 + } 187 + 188 + impl System { 189 + 190 + const FILE_TEMPLATE: &str = include_str!("sys_template.nix"); 191 + 192 + fn generate_file(&self) -> String { 193 + Self::FILE_TEMPLATE 194 + .replace("__TARGET__", &self.target) 195 + .replace("__DESCRIPTION__", &self.description) 196 + .replace("__EDITION__", &self.edition) 197 + .replace("__INCL_BASE_MODS__", &self.include_base_mods.to_string()) 198 + .replace("__ROLES__", &self.roles.join(" ")) 199 + .replace("__HARDWARE_MOD__", &self.hardware_mod) 200 + .replace("__HARDWARE_CONFIG__", &self.hardware_config) 201 + } 202 + 203 + } 204 + 205 + pub fn add_system_dialog(flake_root: &Path) -> Result { 206 + let sys = dialog(flake_root)?; 207 + 208 + let file = sys.generate_file(); 209 + 210 + let edited_file = Editor::new("Review the new system file with (e), confirm with (enter)").with_predefined_text(&file).with_file_extension("nix").prompt().context("Failed to get edits")?; 211 + 212 + let path = flake_root.join("systems").join(format!("{}.nix", sys.name)); 213 + 214 + println!("Saving New File to {}", path.display()); 215 + 216 + fs::write(path, &edited_file).context("Failed to write new file") 217 + }
+22
create-sys/src/main.rs
··· 1 + use clap::clap_derive::Parser; 2 + 3 + mod add; 4 + 5 + mod prelude { 6 + use anyhow::Error as AError; 7 + use std::result::Result as SResult; 8 + 9 + pub type Result<T = (), E = AError> = SResult<T, E>; 10 + pub use anyhow::Context; 11 + } 12 + 13 + use prelude::*; 14 + 15 + #[derive(Parser)] 16 + struct Cli {} 17 + 18 + fn main() -> Result { 19 + let dir = std::env::current_dir()?; 20 + let dir = dir.parent().context("")?; 21 + add::add_system_dialog(dir) 22 + }
+18
create-sys/src/sys_template.nix
··· 1 + { 2 + target = "__TARGET__"; 3 + extraOverlays = []; 4 + 5 + eval = {inputs, ...}: { 6 + description = "__DESCRIPTION__"; 7 + 8 + edition = "__EDITION__"; 9 + 10 + includeBaseMods = __INCL_BASE_MODS__; 11 + 12 + roles = [__ROLES__]; 13 + extraModules = [ 14 + __HARDWARE_MOD__ 15 + __HARDWARE_CONFIG__ 16 + ]; 17 + }; 18 + }
+55 -4
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "catppuccin": { 4 + "locked": { 5 + "lastModified": 1731232837, 6 + "narHash": "sha256-0aIwr/RC/oe7rYkfJb47xjdEQDSNcqpFGsEa+EPlDEs=", 7 + "owner": "catppuccin", 8 + "repo": "nix", 9 + "rev": "32359bf226fe874d3b7a0a5753d291a4da9616fe", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "catppuccin", 14 + "repo": "nix", 15 + "type": "github" 16 + } 17 + }, 18 + "catppuccin-vsc": { 19 + "inputs": { 20 + "nixpkgs": "nixpkgs" 21 + }, 22 + "locked": { 23 + "lastModified": 1731786392, 24 + "narHash": "sha256-VA5hygzQzq8ccAzRPWje8371nnQ6js4xnFe87t/4KJ0=", 25 + "owner": "catppuccin", 26 + "repo": "vscode", 27 + "rev": "35b72d7f39d24b8af0ccc512b9417e1115865df6", 28 + "type": "github" 29 + }, 30 + "original": { 31 + "owner": "catppuccin", 32 + "repo": "vscode", 33 + "type": "github" 34 + } 35 + }, 3 36 "crane": { 4 37 "locked": { 5 38 "lastModified": 1730652660, ··· 177 210 }, 178 211 "nixpkgs": { 179 212 "locked": { 180 - "lastModified": 1732014248, 181 - "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", 213 + "lastModified": 1712963716, 214 + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", 182 215 "owner": "NixOS", 183 216 "repo": "nixpkgs", 184 - "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", 217 + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", 185 218 "type": "github" 186 219 }, 187 220 "original": { ··· 203 236 "original": { 204 237 "owner": "NixOS", 205 238 "ref": "nixos-24.05", 239 + "repo": "nixpkgs", 240 + "type": "github" 241 + } 242 + }, 243 + "nixpkgs_2": { 244 + "locked": { 245 + "lastModified": 1732014248, 246 + "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", 247 + "owner": "NixOS", 248 + "repo": "nixpkgs", 249 + "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", 250 + "type": "github" 251 + }, 252 + "original": { 253 + "owner": "NixOS", 254 + "ref": "nixos-unstable", 206 255 "repo": "nixpkgs", 207 256 "type": "github" 208 257 } ··· 256 305 }, 257 306 "root": { 258 307 "inputs": { 308 + "catppuccin": "catppuccin", 309 + "catppuccin-vsc": "catppuccin-vsc", 259 310 "gh-grader-preview": "gh-grader-preview", 260 311 "hm": "hm", 261 312 "lanzaboote": "lanzaboote", 262 313 "nix-index-db": "nix-index-db", 263 314 "nixos-hardware": "nixos-hardware", 264 - "nixpkgs": "nixpkgs", 315 + "nixpkgs": "nixpkgs_2", 265 316 "ow-mod-man": "ow-mod-man", 266 317 "rust-overlay": "rust-overlay_2", 267 318 "wayland-mpris-idle-inhibit": "wayland-mpris-idle-inhibit"
+5
flake.nix
··· 18 18 wayland-mpris-idle-inhibit.inputs.nixpkgs.follows = "nixpkgs"; 19 19 rust-overlay.url = "github:oxalica/rust-overlay"; 20 20 rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; 21 + catppuccin.url = "github:catppuccin/nix"; 22 + catppuccin-vsc.url = "github:catppuccin/vscode"; 21 23 }; 22 24 23 25 outputs = inputs @ { ··· 31 33 gh-grader-preview, 32 34 wayland-mpris-idle-inhibit, 33 35 rust-overlay, 36 + catppuccin, 37 + catppuccin-vsc, 34 38 }: let 35 39 lib = (import ./lib.nix) nixpkgs.lib; 36 40 pkgsForWithOverlays = system: overlays: ··· 42 46 ow-mod-man.overlays.default 43 47 rust-overlay.overlays.default 44 48 nix-index-db.overlays.nix-index 49 + catppuccin-vsc.overlays.default 45 50 ] 46 51 ++ overlays; 47 52 };
+44
justfile
··· 1 + _default: 2 + @just --list --unsorted --justfile {{justfile()}} 3 + 4 + [private] 5 + alias u := update 6 + # u: update all inputs 7 + update: 8 + nix flake update 9 + 10 + [private] 11 + alias b := build 12 + # b: build the configuration 13 + build: 14 + nom build .#nixosConfigurations.$HOSTNAME.config.system.build.toplevel 15 + 16 + [private] 17 + alias s := switch 18 + # s: activate configuration & add to boot menu 19 + switch: 20 + sudo nixos-rebuild switch --flake .# --log-format internal-json |& nom --json 21 + 22 + [private] 23 + alias c := check 24 + # c: run flake checks, including making sure `.#repl` and the system config evaluate 25 + check: 26 + nix flake check .# --show-trace 27 + 28 + [private] 29 + alias f := format 30 + # f: run nix fmt on the flake 31 + format: 32 + nix fmt 33 + 34 + [private] 35 + alias gc := garbage-collect 36 + # gc: Run nix collect-garbage -d 37 + garbage-collect: 38 + nix-collect-garbage -d 39 + sudo nix-collect-garbage -d 40 + 41 + [private] 42 + alias iso := generate-iso 43 + generate-iso: 44 + nom build .#nixosConfigurations.iso.config.system.build.isoImage
+1
lib.nix
··· 52 52 specialArgs.inputs.nix-index-db.nixosModules.nix-index 53 53 { 54 54 networking.hostName = name; 55 + environment.variables."HOSTNAME" = name; 55 56 environment.etc."flake-src".source = specialArgs.inputs.self; 56 57 home-manager.extraSpecialArgs = specialArgs; 57 58 home-manager.useGlobalPkgs = true;
+2 -3
pkgs/themes.nix pkgs/theming.nix
··· 2 2 gtk3, 3 3 runCommand, 4 4 fetchFromGitHub, 5 - inputs, 6 5 }: let 7 6 src = fetchFromGitHub { 8 7 owner = "EliverLara"; ··· 16 15 rev = "6f6eb3d7dbdb4fb9aab31ec5aebeb7155225f0ab"; # master: https://github.com/EliverLara/candy-icons/commits/master/ 17 16 hash = "sha256-VOUFs45n+5zQqk3pPsiQeL6aCWEUUje90PGt2ni7Bgg="; 18 17 }; 19 - cursor-src = "${inputs.self}/res/cursors/Sweet-cursors.tar.xz"; 20 - hypr-cursor-src = "${inputs.self}/res/cursors/Sweet-cursors-hypr.tar.xz"; 18 + cursor-src = ../res/cursors/Sweet-cursors.tar.xz; 19 + hypr-cursor-src = ../res/cursors/Sweet-cursors-hypr.tar.xz; 21 20 in 22 21 runCommand "sweet-ambar-blue" {} '' 23 22
+2 -2
res/rofi/rofi-code.nu
··· 1 1 #!/usr/bin/env nu 2 2 3 - let paths = ls ~/.config/Code/User/workspaceStorage/*/workspace.json 3 + let paths = ls ~/.config/VSCodium/User/workspaceStorage/*/workspace.json 4 4 | get name 5 5 | each {|it| open $it | get folder | str substring 7..}; 6 6 7 - let paths_display = $paths | each {|it| $it | str replace $"/home/($env.USER)" "󰋜" | str replace "󰋜/Documents/GitHub" "󰊤"}; 7 + let paths_display = $paths | each {|it| $it | str replace $"/home/($env.USER)" "󰋜 " | str replace "󰋜/Documents/GitHub" "󰊤 "}; 8 8 9 9 let res = $paths_display | str join "\n" | rofi -dmenu -i -p "VSCode" | complete; 10 10
-46
res/swaync/config.json
··· 1 - { 2 - "positionX": "center", 3 - "positionY": "top", 4 - "control-center-margin-top": 0, 5 - "control-center-margin-bottom": 10, 6 - "control-center-margin-right": 10, 7 - "control-center-margin-left": 10, 8 - "control-center-exclusive-zone": false, 9 - "notification-icon-size": 64, 10 - "notification-body-image-height": 100, 11 - "notification-body-image-width": 200, 12 - "timeout": 10, 13 - "timeout-low": 5, 14 - "timeout-critical": 0, 15 - "fit-to-screen": false, 16 - "control-center-width": 800, 17 - "control-center-height": 1025, 18 - "notification-window-width": 500, 19 - "keyboard-shortcuts": true, 20 - "image-visibility": "when-available", 21 - "transition-time": 200, 22 - "hide-on-clear": false, 23 - "hide-on-action": true, 24 - "script-fail-notify": true, 25 - "scripts": { 26 - "all": { 27 - "exec": "nu ~/.config/swaync/notification.nu", 28 - "urgency": ".*" 29 - } 30 - }, 31 - "widgets": ["title", "dnd", "notifications"], 32 - "widget-config": { 33 - "title": { 34 - "text": "Notification Center", 35 - "clear-all-button": true, 36 - "button-text": "Clear All" 37 - }, 38 - "dnd": { 39 - "text": "Do Not Disturb" 40 - }, 41 - "label": { 42 - "max-lines": 1, 43 - "text": "Notification Center" 44 - } 45 - } 46 - }
+5 -3
res/swaync/notification.nu res/notification.nu
··· 27 27 28 28 # $log | append $name | str join "\n" | save -f $LOG_FILE 29 29 30 - if ($name not-in $SILENCED_APP_NAMES) { 31 - let sound = $APP_SOUNDS | get -i $name | default $APP_SOUNDS.DEFAULT; 32 - aplay $"($env.HOME)/.config/swaync/sounds/($sound).wav" 30 + def main [sounds_path: string] { 31 + if ($name not-in $SILENCED_APP_NAMES) { 32 + let sound = $APP_SOUNDS | get -i $name | default $APP_SOUNDS.DEFAULT; 33 + aplay $"($sounds_path)/($sound).wav" 34 + } 33 35 }
res/swaync/sounds/camera-click.wav res/notif-sounds/camera-click.wav
res/swaync/sounds/critical.wav res/notif-sounds/critical.wav
res/swaync/sounds/notif.wav res/notif-sounds/notif.wav
res/swaync/sounds/pixel-notif.wav res/notif-sounds/pixel-notif.wav
-265
res/swaync/style.css
··· 1 - /* 2 - * vim: ft=less 3 - */ 4 - 5 - @define-color cc-bg rgba(0, 0, 0, 0.8); 6 - 7 - @define-color noti-border-color rgba(255, 255, 255, 0.15); 8 - @define-color noti-bg-darker rgba(50, 50, 50, 0.9); 9 - @define-color noti-bg-focus rgba(68, 68, 68, 0.6); 10 - @define-color noti-close-bg rgba(255, 255, 255, 0.1); 11 - @define-color noti-close-bg-hover rgba(255, 255, 255, 0.15); 12 - 13 - @define-color text-color rgb(255, 255, 255); 14 - @define-color text-color-disabled rgb(150, 150, 150); 15 - 16 - @define-color bg-selected rgb(0, 128, 255); 17 - 18 - .notification-row { 19 - outline: none; 20 - background: rgba(0, 0, 0, 0) 21 - } 22 - 23 - .notification-row:hover { 24 - background: rgba(0, 0, 0, 0) 25 - } 26 - 27 - .notification { 28 - border-radius: 12px; 29 - margin: 6px 12px; 30 - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 31 - 0 2px 6px 2px rgba(0, 0, 0, 0.3); 32 - padding: 0; 33 - } 34 - 35 - .notification-content { 36 - background: transparent; 37 - padding: 6px; 38 - border-radius: 12px; 39 - } 40 - 41 - .close-button { 42 - background: linear-gradient(180deg, rgb(220, 66, 0) 0%, rgb(110, 0, 0) 100%); 43 - color: @text-color; 44 - text-shadow: none; 45 - padding: 0; 46 - border-radius: 100%; 47 - margin-top: 10px; 48 - margin-right: 16px; 49 - box-shadow: none; 50 - border: none; 51 - min-width: 24px; 52 - min-height: 24px; 53 - } 54 - 55 - .close-button:hover { 56 - box-shadow: none; 57 - background: linear-gradient(180deg, rgb(255, 77, 1) 0%, rgb(151, 0, 0) 100%); 58 - transition: all 0.15s ease-in-out; 59 - border: none; 60 - } 61 - 62 - .notification-default-action, 63 - .notification-action { 64 - padding: 4px; 65 - margin: 0; 66 - box-shadow: none; 67 - background: linear-gradient( 68 - 180deg, 69 - rgba(34, 34, 34, 1) 0%, 70 - rgba(5, 5, 5, 0.9) 100% 71 - ); 72 - border: 1px solid @noti-border-color; 73 - color: @text-color; 74 - transition: all 0.15s ease-in-out; 75 - } 76 - 77 - .notification-default-action:hover, 78 - .notification-action:hover { 79 - -gtk-icon-effect: none; 80 - background: linear-gradient( 81 - 180deg, 82 - rgb(50, 50, 50) 0%, 83 - rgba(28, 28, 28, 0.9) 100% 84 - ); 85 - } 86 - 87 - .notification-default-action { 88 - border-radius: 12px; 89 - } 90 - 91 - /* When alternative actions are visible */ 92 - .notification-default-action:not(:only-child) { 93 - border-bottom-left-radius: 0px; 94 - border-bottom-right-radius: 0px; 95 - } 96 - 97 - .notification-action { 98 - border-radius: 0px; 99 - border-top: none; 100 - border-right: none; 101 - } 102 - 103 - /* add bottom border radius to eliminate clipping */ 104 - .notification-action:first-child { 105 - border-bottom-left-radius: 10px; 106 - } 107 - 108 - .notification-action:last-child { 109 - border-bottom-right-radius: 10px; 110 - border-right: 1px solid @noti-border-color; 111 - } 112 - 113 - .inline-reply { 114 - margin-top: 8px; 115 - } 116 - .inline-reply-entry { 117 - background: @noti-bg-darker; 118 - color: @text-color; 119 - caret-color: @text-color; 120 - border: 1px solid @noti-border-color; 121 - border-radius: 12px; 122 - } 123 - .inline-reply-button { 124 - margin-left: 4px; 125 - background: linear-gradient( 126 - 180deg, 127 - rgba(34, 34, 34, 1) 0%, 128 - rgba(5, 5, 5, 0.9) 100% 129 - ); 130 - border: 1px solid @noti-border-color; 131 - border-radius: 12px; 132 - color: @text-color; 133 - } 134 - .inline-reply-button:disabled { 135 - background: initial; 136 - color: @text-color-disabled; 137 - border: 1px solid transparent; 138 - } 139 - .inline-reply-button:hover { 140 - background: linear-gradient( 141 - 180deg, 142 - rgba(34, 34, 34, 1) 0%, 143 - rgba(5, 5, 5, 0.9) 100% 144 - ); 145 - } 146 - 147 - .body-image { 148 - margin-top: 6px; 149 - background-color: white; 150 - border-radius: 12px; 151 - } 152 - 153 - .summary { 154 - font-size: 16px; 155 - font-weight: bold; 156 - background: transparent; 157 - color: @text-color; 158 - text-shadow: none; 159 - } 160 - 161 - .time { 162 - font-size: 16px; 163 - font-weight: bold; 164 - background: transparent; 165 - color: @text-color; 166 - text-shadow: none; 167 - margin-right: 18px; 168 - } 169 - 170 - .body { 171 - font-size: 15px; 172 - font-weight: normal; 173 - background: transparent; 174 - color: @text-color; 175 - text-shadow: none; 176 - } 177 - 178 - .control-center { 179 - background: @cc-bg; 180 - } 181 - 182 - .control-center-list { 183 - background: transparent; 184 - } 185 - 186 - .control-center-list-placeholder { 187 - opacity: 0.5; 188 - } 189 - 190 - .floating-notifications { 191 - background: transparent; 192 - } 193 - 194 - /* Window behind control center and on all other monitors */ 195 - .blank-window { 196 - background: alpha(black, 0.25); 197 - } 198 - 199 - /*** Widgets ***/ 200 - 201 - /* Title widget */ 202 - .widget-title { 203 - margin: 8px; 204 - font-size: 1.5rem; 205 - } 206 - .widget-title > button { 207 - font-size: initial; 208 - color: @text-color; 209 - text-shadow: none; 210 - background: linear-gradient( 211 - 180deg, 212 - rgba(34, 34, 34, 1) 0%, 213 - rgba(5, 5, 5, 0.9) 100% 214 - ); 215 - border: 1px solid @noti-border-color; 216 - box-shadow: none; 217 - border-radius: 12px; 218 - } 219 - .widget-title > button:hover { 220 - background: linear-gradient( 221 - 180deg, 222 - rgba(34, 34, 34, 1) 0%, 223 - rgba(5, 5, 5, 0.9) 100% 224 - ); 225 - } 226 - 227 - /* DND widget */ 228 - .widget-dnd { 229 - margin: 8px; 230 - font-size: 1.1rem; 231 - } 232 - .widget-dnd > switch { 233 - font-size: initial; 234 - border-radius: 12px; 235 - background: linear-gradient( 236 - 180deg, 237 - rgb(55, 55, 55) 0%, 238 - rgba(20, 20, 20, 0.9) 100% 239 - ); 240 - border: 1px solid @noti-border-color; 241 - box-shadow: none; 242 - } 243 - .widget-dnd > switch:checked { 244 - background: linear-gradient( 245 - 180deg, 246 - rgb(0, 209, 209) 0%, 247 - rgb(0, 60, 164) 100% 248 - ); 249 - } 250 - .widget-dnd > switch slider { 251 - background: linear-gradient( 252 - 180deg, 253 - rgb(199, 199, 199) 0%, 254 - rgba(153, 153, 153, 0.9) 100% 255 - ); 256 - border-radius: 12px; 257 - } 258 - 259 - /* Label widget */ 260 - .widget-label { 261 - margin: 8px; 262 - } 263 - .widget-label > label { 264 - font-size: 1.1rem; 265 - }
-254
res/waybar/config.jsonc
··· 1 - // -*- mode: json -*- 2 - [ 3 - { 4 - "layer": "top", 5 - "position": "top", 6 - "modules-left": [ 7 - "user", 8 - "clock#1", 9 - "clock#2", 10 - "custom/news", 11 - // "custom/weather", - Broken 12 - "mpris" 13 - ], 14 - "modules-center": [], 15 - "modules-right": [ 16 - "network", 17 - "battery", 18 - "bluetooth", 19 - "pulseaudio", 20 - "custom/kde-connect", 21 - "idle_inhibitor", 22 - "custom/notification", 23 - "privacy", 24 - "tray" 25 - ], 26 - "user": { 27 - "format": " {user}", 28 - "icon": true 29 - }, 30 - "clock#1": { 31 - "format": "󰃭 {:%A, %B %Od}", 32 - "tooltip-format": "<tt><small>{calendar}</small></tt>", 33 - "calendar": { 34 - "mode": "month", 35 - "mode-mon-col": 3, 36 - "weeks-pos": "right", 37 - "on-scroll": 1, 38 - "format": { 39 - "months": "<span color='#ffead3'><b>{}</b></span>", 40 - "days": "<span color='#ecc6d9'><b>{}</b></span>", 41 - "weeks": "<span color='#99ffdd'><b>W{}</b></span>", 42 - "weekdays": "<span color='#ffcc66'><b>{}</b></span>", 43 - "today": "<span color='#ff6699'><b><u>{}</u></b></span>" 44 - } 45 - }, 46 - "actions": { 47 - "on-click": "shift_up", 48 - "on-click-right": "shift_down", 49 - "on-click-middle": "mode" 50 - } 51 - }, 52 - "clock#2": { 53 - "format": "󰥔 {:%I:%M %p}", 54 - "tooltip-format": "{:%F at %T in %Z (UTC%Ez)}" 55 - }, 56 - "mpris": { 57 - "status-icons": { 58 - "paused": "󰏤", 59 - "stopped": "󰓛" 60 - }, 61 - "player-icons": { 62 - "default": "󰎆", 63 - "kdeconnect": "", 64 - "spotify": "󰓇", 65 - "firefox": "󰈹", 66 - "firefox-devedition": "󰈹", 67 - "QMPlay2": "󰐌" 68 - }, 69 - "dynamic-order": ["title", "artist", "album", "position", "length"], 70 - "dynamic-importance-order": [ 71 - "title", 72 - "position", 73 - "length", 74 - "artist", 75 - "album" 76 - ], 77 - "title-len": 35, 78 - "artist-len": 25, 79 - "album-len": 20, 80 - "dynamic-len": 50, 81 - "format": "{player_icon} {dynamic}", 82 - "format-paused": "{status_icon} {dynamic}" 83 - }, 84 - "network": { 85 - "format": "{ifname}", 86 - "format-wifi": "{icon} {essid}", 87 - "format-icons": ["󰤟", "󰤢", "󰤥", "󰤨"], 88 - "format-ethernet": "󱎔 {ifname}", 89 - "format-linked": "󰌷 {ifname}", 90 - "format-disconnected": "󰪎", 91 - "tooltip-format": "{ifname} via {gwaddr}", 92 - "tooltip-format-wifi": "Connected to {essid} ({signalStrength}󰏰 Strength) over {ifname} via {gwaddr}", 93 - "tooltip-format-ethernet": "󱎔 {ifname}", 94 - "tooltip-disconnected": "Disconnected" 95 - }, 96 - "pulseaudio": { 97 - "format": "{icon} {volume:2}󰏰", 98 - "format-bluetooth": "{icon} {volume}󰏰", 99 - "format-muted": "󰝟", 100 - "format-icons": { 101 - "headphone": "󰋋", 102 - "hands-free": "󰋋", 103 - "headset": "󰋋", 104 - "phone": "", 105 - "portable": "", 106 - "car": "", 107 - "default": ["󰖀", "󰕾"] 108 - }, 109 - "scroll-step": 5, 110 - "on-click": "pamixer -t", 111 - "on-click-right": "pavucontrol" 112 - }, 113 - "bluetooth": { 114 - "format": "󰂯", 115 - "format-disabled": "󰂲", 116 - "format-off": "󰂲", 117 - "format-connected": "󰂱", 118 - "format-connected-battery": "󰂱 {device_battery_percentage}󰏰", 119 - "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", 120 - "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", 121 - "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", 122 - "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%", 123 - "on-click": "rofi-bluetooth", 124 - "on-click-right": "rfkill toggle bluetooth" 125 - }, 126 - "idle_inhibitor": { 127 - "format": "{icon}", 128 - "format-icons": { 129 - "activated": "󰒳", 130 - "deactivated": "󰒲" 131 - } 132 - }, 133 - "battery": { 134 - "states": { 135 - "warning": 30, 136 - "critical": 15 137 - }, 138 - "format": "{icon} {capacity}󰏰", 139 - "format-charging": "{icon} {capacity}󰏰", 140 - "format-icons": { 141 - "charging": ["󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅"], 142 - "default": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"] 143 - } 144 - }, 145 - "tray": { 146 - "icon-size": 25, 147 - "spacing": 5, 148 - "show-passive-items": true 149 - }, 150 - "privacy": { 151 - "icon-spacing": 4, 152 - "icon-size": 20, 153 - "transition-duration": 200, 154 - "modules": [ 155 - { 156 - "type": "screenshare", 157 - "tooltip": true, 158 - "tooltip-icon-size": 24 159 - }, 160 - { 161 - "type": "audio-in", 162 - "tooltip": true, 163 - "tooltip-icon-size": 24 164 - } 165 - ] 166 - }, 167 - "custom/notification": { 168 - "tooltip": false, 169 - "format": "{icon}", 170 - "format-icons": { 171 - "notification": "󱅫", 172 - "none": "󰂚", 173 - "dnd-notification": "󰂛<sup></sup>", 174 - "dnd-none": "󰂛", 175 - "inhibited-notification": "󰂠<sup></sup>", 176 - "inhibited-none": "󰂠", 177 - "dnd-inhibited-notification": "󰂛<sup></sup>", 178 - "dnd-inhibited-none": "󰂛" 179 - }, 180 - "max-length": 3, 181 - "return-type": "json", 182 - "exec-if": "which swaync-client", 183 - "exec": "swaync-client -swb", 184 - "on-click": "sleep 0.2 && swaync-client -t -sw", 185 - "on-click-right": "sleep 0.2 && swaync-client -d -sw", 186 - "on-click-middle": "sleep 0.2 && swaync-client -C -sw", 187 - "escape": true 188 - }, 189 - "custom/kde-connect": { 190 - "exec": "nu ~/.config/waybar/custom_modules/kdeconnect.nu", 191 - "format": "{}", 192 - "return-type": "json", 193 - "on-click": "kdeconnect-settings", 194 - "interval": 30 195 - }, 196 - "custom/weather": { 197 - "exec": "nu ~/.config/waybar/custom_modules/weather.nu", 198 - "on-click": "xdg-open https://duckduckgo.com/?q=weather", 199 - "return-type": "json", 200 - "format": "{}", 201 - "interval": 600 202 - }, 203 - "custom/news": { 204 - "exec": "nu ~/.config/waybar/custom_modules/newsboat.nu", 205 - "exec-on-event": true, 206 - "signal": 6, 207 - "on-click": "pidof -q newsboat && hyprctl dispatch focuswindow newsboat || foot --title=\"Newsboat\" --app-id=\"newsboat\" newsboat; pkill -SIGRTMIN+6 waybar", 208 - "on-click-right": "pkill waybar -SIGRTMIN+6", 209 - "return-type": "json", 210 - "format": "{}", 211 - "restart-interval": 1800 212 - } 213 - }, 214 - { 215 - "layer": "top", 216 - "position": "bottom", 217 - "modules-left": ["hyprland/workspaces"], 218 - "modules-center": ["wlr/taskbar"], 219 - "modules-right": ["temperature", "cpu", "memory"], 220 - "wlr/taskbar": { 221 - "icon-theme": "candy-icons", 222 - "format": "{icon}", 223 - "icon-size": 35, 224 - "on-click": "activate" 225 - }, 226 - "hyprland/workspaces": { 227 - "disable-scroll": true, 228 - "format": "{name}" 229 - }, 230 - "temperature": { 231 - "thermal-zone": 10, 232 - "critical-threshold": 90, 233 - "format-icons": ["󱃃", "󰔏", "󱃂"], 234 - "format-critical": "{icon}! {temperatureC} °C", 235 - "format": "{icon} {temperatureC} °C" 236 - }, 237 - "cpu": { 238 - "on-click": "foot --title=\"Htop\" --app-id=\"htop\" htop --sort-key=PERCENT_CPU", 239 - "states": { 240 - "warning": 80, 241 - "critical": 95 242 - }, 243 - "format": "󰍛 {usage}󰏰" 244 - }, 245 - "memory": { 246 - "on-click": "foot --title=\"Htop\" --app-id=\"htop\" htop --sort-key=PERCENT_MEM", 247 - "states": { 248 - "warning": 70, 249 - "critical": 90 250 - }, 251 - "format": " {}󰏰 ({used:0.1f}/{total:0.1f} GiB)" 252 - } 253 - } 254 - ]
res/waybar/custom_modules/kdeconnect.nu res/custom_waybar_modules/kdeconnect.nu
res/waybar/custom_modules/newsboat.nu res/custom_waybar_modules/newsboat.nu
+1 -1
res/waybar/custom_modules/weather.nu res/custom_waybar_modules/weather.nu
··· 142 142 error-exit $err.msg; 143 143 } 144 144 145 - if ($raw | str starts-with "Unknown location;") { 145 + if ((($raw | describe) == "string") and ($raw | str starts-with "Unknown location;")) { 146 146 error-exit $raw; 147 147 } 148 148
-283
res/waybar/style.css
··· 1 - * { 2 - font-family: Noto Sans, FiraCode Nerd Font Mono; 3 - } 4 - 5 - window#waybar { 6 - background: rgba(252, 116, 150, 0); 7 - color: #fdf6e3; 8 - } 9 - 10 - .modules-left > * > *, 11 - .modules-right > * > * { 12 - font-size: 1.5rem; 13 - background: rgb(241, 213, 213); 14 - background: linear-gradient( 15 - 180deg, 16 - rgba(34, 34, 34, 0.8) 0%, 17 - rgba(5, 5, 5, 0.7) 100% 18 - ); 19 - border-radius: 5rem; 20 - padding: 5px 15px; 21 - margin: 5px 2px; 22 - } 23 - 24 - #idle_inhibitor, 25 - #custom-notification, 26 - #pulseaudio.muted, 27 - #custom-power-menu, 28 - #custom-kde-connect.disconnected, 29 - #bluetooth.disconnected, 30 - #bluetooth.off, 31 - #bluetooth.disabled { 32 - font-size: 30px; 33 - } 34 - 35 - #waybar .modules-left > *:first-child > * { 36 - margin-left: 25px; 37 - } 38 - 39 - #waybar .modules-right > *:last-child > * { 40 - margin-right: 25px; 41 - } 42 - 43 - #waybar .modules-left, 44 - #waybar .modules-right { 45 - margin-top: 10px; 46 - } 47 - 48 - #waybar .modules-center { 49 - margin-bottom: 10px; 50 - } 51 - 52 - #battery.warning { 53 - background: linear-gradient( 54 - 180deg, 55 - rgb(137, 137, 0) 0%, 56 - rgb(131, 102, 0) 100% 57 - ); 58 - } 59 - 60 - #battery.critical { 61 - background: linear-gradient(180deg, rgb(220, 66, 0) 0%, rgb(110, 0, 0) 100%); 62 - } 63 - 64 - * > #battery.charging { 65 - background: linear-gradient(180deg, rgb(0, 209, 31) 0%, rgb(0, 90, 15) 100%); 66 - } 67 - 68 - #taskbar, 69 - #workspaces { 70 - padding: 10px; 71 - border-radius: 5rem; 72 - background: linear-gradient( 73 - 180deg, 74 - rgba(85, 85, 85, 0.8) 0%, 75 - rgba(60, 60, 60, 0.7) 100% 76 - ); 77 - } 78 - 79 - #workspaces { 80 - margin-bottom: 15px; 81 - } 82 - 83 - #taskbar button, 84 - #workspaces button { 85 - color: #fdf6e3; 86 - border-radius: 5rem; 87 - padding: 10px 15px; 88 - margin: 0 5px; 89 - background: linear-gradient( 90 - 180deg, 91 - rgba(34, 34, 34, 0.8) 0%, 92 - rgba(5, 5, 5, 0.7) 100% 93 - ); 94 - } 95 - 96 - #workspaces button { 97 - font-size: 1.5rem; 98 - } 99 - 100 - #cpu, 101 - #memory, 102 - #temperature { 103 - font-size: 1.5rem; 104 - padding: 5px 25px; 105 - margin-bottom: 25px; 106 - } 107 - 108 - #cpu.warning, 109 - #memory.warning { 110 - background: linear-gradient( 111 - 180deg, 112 - rgb(137, 137, 0) 0%, 113 - rgb(131, 102, 0) 100% 114 - ); 115 - } 116 - 117 - #cpu.critical, 118 - #memory.critical, 119 - #temperature.critical { 120 - background: linear-gradient( 121 - 180deg, 122 - rgb(220, 66, 0) 0%, 123 - rgb(110, 0, 0) 100% 124 - ); 125 - } 126 - 127 - #workspaces button.active { 128 - background: linear-gradient( 129 - 180deg, 130 - rgb(0, 209, 209) 0%, 131 - rgb(0, 60, 164) 100% 132 - ); 133 - } 134 - 135 - #taskbar button.active { 136 - border: 2px solid rgb(0, 209, 209); 137 - } 138 - 139 - #idle_inhibitor.activated { 140 - background: linear-gradient( 141 - 180deg, 142 - rgb(202, 0, 209) 0%, 143 - rgb(131, 0, 164) 100% 144 - ); 145 - } 146 - 147 - #custom-notification.notification { 148 - background: linear-gradient( 149 - 180deg, 150 - rgb(0, 209, 209) 0%, 151 - rgb(0, 60, 164) 100% 152 - ); 153 - } 154 - 155 - #custom-notification.dnd-none, 156 - #custom-notification.dnd-notification, 157 - #custom-notification.dnd-inhibited-none, 158 - #custom-notification.dnd-inhibited-notification { 159 - background: linear-gradient(180deg, rgb(220, 66, 0) 0%, rgb(110, 0, 0) 100%); 160 - } 161 - 162 - #custom-notification.inhibited-none, 163 - #custom-notification.inhibited-notification { 164 - background: linear-gradient( 165 - 180deg, 166 - rgb(202, 0, 209) 0%, 167 - rgb(110, 0, 138) 100% 168 - ); 169 - } 170 - 171 - #network.disconnected { 172 - background: linear-gradient(180deg, rgb(220, 66, 0) 0%, rgb(110, 0, 0) 100%); 173 - } 174 - 175 - #privacy { 176 - background: none; 177 - margin: 0; 178 - padding: 0; 179 - } 180 - 181 - #privacy-item { 182 - font-size: 1.5rem; 183 - border-radius: 5rem; 184 - padding: 5px 15px; 185 - margin: 5px 2px; 186 - background: linear-gradient(180deg, rgb(220, 66, 0) 0%, rgb(110, 0, 0) 100%); 187 - } 188 - 189 - #custom-weather.VeryCloudy, 190 - #custom-weather.Cloudy, 191 - #custom-weather.Fog { 192 - background: linear-gradient( 193 - 180deg, 194 - rgb(110, 110, 110) 0%, 195 - rgb(62, 62, 62) 100% 196 - ); 197 - } 198 - 199 - #custom-weather.HeavyRain, 200 - #custom-weather.ThunderyHeavyRain, 201 - #custom-weather.ThunderyRain, 202 - #custom-weather.ThunderyShowers, 203 - #custom-weather.HeavyShowers, 204 - #custom-weather.LightRain, 205 - #custom-weather.LightShowers { 206 - background: linear-gradient( 207 - 180deg, 208 - rgb(0, 209, 209) 0%, 209 - rgb(129, 157, 207) 100% 210 - ); 211 - } 212 - 213 - #custom-weather.HeavySnow, 214 - #custom-weather.LightSnow, 215 - #custom-weather.Sleet, 216 - #custom-weather.Snow, 217 - #custom-weather.LightSnowShowers, 218 - #custom-weather.LightSleetShowers { 219 - background: linear-gradient( 220 - 180deg, 221 - rgb(255, 255, 255) 0%, 222 - rgb(160, 160, 160) 100% 223 - ); 224 - color: #242424; 225 - } 226 - 227 - #custom-weather.Clear, 228 - #custom-weather.Sunny { 229 - background: linear-gradient( 230 - 180deg, 231 - rgb(187, 187, 0) 0%, 232 - rgb(158, 124, 0) 100% 233 - ); 234 - } 235 - 236 - #custom-weather.Clear.night, 237 - #custom-weather.Sunny.night { 238 - background: linear-gradient( 239 - 180deg, 240 - rgb(103, 52, 131) 0%, 241 - rgb(58, 29, 74) 100% 242 - ); 243 - } 244 - 245 - #custom-weather.PartlyCloudy { 246 - background: linear-gradient( 247 - 180deg, 248 - rgb(130, 128, 92) 0%, 249 - rgb(77, 75, 53) 100% 250 - ); 251 - } 252 - 253 - #custom-weather.PartlyCloudy.night { 254 - background: linear-gradient( 255 - 180deg, 256 - rgb(117, 95, 129) 0%, 257 - rgb(72, 58, 79) 100% 258 - ); 259 - } 260 - 261 - #custom-news.utd { 262 - font-size: 1.5rem; 263 - } 264 - 265 - #custom-news.unread { 266 - background: linear-gradient( 267 - 180deg, 268 - rgb(0, 209, 209) 0%, 269 - rgb(0, 60, 164) 100% 270 - ); 271 - } 272 - 273 - #mpris.playing { 274 - background: linear-gradient( 275 - 180deg, 276 - rgb(0, 209, 209) 0%, 277 - rgb(0, 60, 164) 100% 278 - ); 279 - } 280 - 281 - #mpris.paused.kdeconnect { 282 - opacity: 0; 283 - }
+14 -4
roles/dev+graphics/code.nix
··· 8 8 9 9 extensions = with pkgs.vscode-extensions; [ 10 10 # Theme 11 - zhuangtongfa.material-theme 12 - pkief.material-icon-theme 11 + (pkgs.catppuccin-vsc.override { 12 + accent = "green"; 13 + boldKeywords = true; 14 + italicComments = true; 15 + italicKeywords = true; 16 + extraBordersEnabled = false; 17 + workbenchMode = "default"; 18 + bracketMode = "rainbow"; 19 + colorOverrides = {}; 20 + customUIColors = {}; 21 + }) 22 + catppuccin.catppuccin-vsc-icons 13 23 14 24 # Nix 15 25 bbenoist.nix ··· 86 96 "editor.minimap.enabled" = false; 87 97 "editor.fontSize" = 16; 88 98 "terminal.integrated.fontSize" = 16; 89 - "workbench.colorTheme" = "One Dark Pro Darker"; 99 + "workbench.colorTheme" = "Catppuccin Mocha"; 100 + "workbench.iconTheme" = "catppuccin-mocha"; 90 101 "workbench.startupEditor" = "none"; 91 102 "workbench.welcomePage.walkthroughs.openOnInstall" = false; 92 - "workbench.iconTheme" = "material-icon-theme"; 93 103 "terminal.integrated.fontFamily" = "monospace"; 94 104 "terminal.integrated.smoothScrolling" = true; 95 105 "explorer.compactFolders" = false;
+1 -1
roles/graphics/firefox.nix
··· 98 98 99 99 Extensions.Install = map (x: "https://addons.mozilla.org/firefox/downloads/latest/${x}/latest.xpi") [ 100 100 # Appearance 101 - "nicothin-space" 101 + "catppuccin-mocha-green" 102 102 "darkreader" 103 103 "material-icons-for-github" 104 104 "refined-github-"
+2 -33
roles/graphics/foot.nix
··· 1 - {...}: let 2 - fontSize = "18"; 3 - in { 1 + {...}: { 4 2 programs.foot = { 5 3 enable = true; 6 4 settings = { 7 5 main = { 8 6 title = "Terminal (Foot)"; 9 7 term = "xterm-256color"; 10 - font = "monospace:size=${fontSize}"; 8 + font = "monospace:size=18"; 11 9 }; 12 10 bell = { 13 11 visual = true; ··· 15 13 cursor = { 16 14 style = "beam"; 17 15 blink = true; 18 - }; 19 - colors = { 20 - alpha = "0.8"; 21 - background = "101013"; 22 - foreground = "fcfcfc"; 23 - regular0 = "444a4c"; 24 - bright0 = "565f61"; 25 - dim0 = "303536"; 26 - regular1 = "ed254e"; 27 - bright1 = "f04265"; 28 - dim1 = "d91239"; 29 - regular2 = "71f79f"; 30 - bright2 = "9af9bb"; 31 - dim2 = "4df587"; 32 - regular3 = "fadd00"; 33 - bright3 = "ffe629"; 34 - dim3 = "d1b900"; 35 - regular4 = "0072ff"; 36 - bright4 = "2989ff"; 37 - dim4 = "0060d6"; 38 - regular5 = "d400dc"; 39 - bright5 = "f70aff"; 40 - dim5 = "ad00b3"; 41 - regular6 = "00c1e4"; 42 - bright6 = "0fdbff"; 43 - dim6 = "00a0bd"; 44 - regular7 = "fcfcfc"; 45 - bright7 = "ffffff"; 46 - dim7 = "e8e8e8"; 47 16 }; 48 17 }; 49 18 };
+85 -86
roles/graphics/lock.nix
··· 10 10 ]; 11 11 }; 12 12 13 - xdg.configFile."hypr/hyprlock.conf".text = '' 14 - general { 15 - grace = 5 16 - } 13 + programs.hyprlock = { 14 + enable = true; 17 15 18 - background { 19 - monitor = 20 - path = "${inputs.self}/res/pictures/background.png" 21 - blur_passes = 1 22 - } 16 + settings = { 17 + general.grace = 5; 18 + background = { 19 + monitor = ""; 20 + path = "${inputs.self}/res/pictures/background.png"; 21 + blur_passes = 1; 22 + }; 23 + image = { 24 + monitor = ""; 25 + path = "${inputs.self}/res/pictures/cow.png"; 26 + size = 150; 27 + rounding = -1; 28 + border_size = 2; 29 + border_color = "rgb(109, 237, 153)"; 30 + rotate = 0; 31 + position = "0, 120"; 32 + halign = "center"; 33 + valign = "center"; 23 34 24 - image { 25 - monitor = 26 - path = "${inputs.self}/res/pictures/cow.png" 27 - size = 150 28 - rounding = -1 29 - border_size = 2 30 - border_color = rgb(109, 237, 153) 31 - rotate = 0 32 - position = 0, 120 33 - halign = center 34 - valign = center 35 + shadow_passes = 1; 36 + shadow_size = 5; 37 + shadow_boost = 1.6; 38 + }; 39 + "input-field" = { 40 + monitor = ""; 41 + size = "250, 50"; 42 + outline_thickness = 2; 43 + dots_size = 0.25; # Scale of input-field height, 0.2 - 0.8 44 + dots_spacing = 0.15; # Scale of dots' absolute size, 0.0 - 1.0 45 + dots_center = false; 46 + dots_rounding = -1; # -1 default circle, -2 follow input-field rounding 47 + outer_color = "rgb(150, 150, 150)"; 48 + inner_color = "rgb(16, 16, 19)"; 49 + font_color = "rgb(255, 255, 255)"; 50 + fade_on_empty = false; 51 + fade_timeout = 1000; # Milliseconds before fade_on_empty is triggered. 52 + placeholder_text = ''<span foreground="##dddddd" style="italic">Password</span>''; 53 + hide_input = false; 54 + rounding = -1; # -1 means complete rounding (circle/oval) 55 + check_color = "rgb(15, 219, 255)"; 56 + fail_color = "rgb(237, 37, 78)"; # if authentication failed, changes outer_color and fail message color 57 + fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>"; 58 + fail_transition = 300; # transition time in ms between normal outer_color and fail_color 59 + capslock_color = -1; 60 + numlock_color = -1; 61 + bothlock_color = -1; # when both locks are active. -1 means don't change outer color (same for above) 62 + invert_numlock = false; # change color if numlock is off 63 + swap_font_color = false; # see below 35 64 36 - shadow_passes = 1 37 - shadow_size = 5 38 - shadow_boost = 1.6 39 - } 65 + position = "0, -80"; 66 + halign = "center"; 67 + valign = "center"; 68 + }; 69 + label = [ 70 + { 71 + monitor = ""; 72 + text = "$DESC"; 73 + color = "rgba(255, 255, 255, 1.0)"; 74 + font_size = 25; 75 + font_family = "sans-serif"; 76 + rotate = 0; # degrees, counter-clockwise 40 77 41 - input-field { 42 - monitor = 43 - size = 250, 50 44 - outline_thickness = 2 45 - dots_size = 0.25 # Scale of input-field height, 0.2 - 0.8 46 - dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 47 - dots_center = false 48 - dots_rounding = -1 # -1 default circle, -2 follow input-field rounding 49 - outer_color = rgb(150, 150, 150) 50 - inner_color = rgb(16, 16, 19) 51 - font_color = rgb(255, 255, 255) 52 - fade_on_empty = false 53 - fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. 54 - placeholder_text = <span foreground="##dddddd" style="italic">Password</span> 55 - hide_input = false 56 - rounding = -1 # -1 means complete rounding (circle/oval) 57 - check_color = rgb(15, 219, 255) 58 - fail_color = rgb(237, 37, 78) # if authentication failed, changes outer_color and fail message color 59 - fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> 60 - fail_transition = 300 # transition time in ms between normal outer_color and fail_color 61 - capslock_color = -1 62 - numlock_color = -1 63 - bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) 64 - invert_numlock = false # change color if numlock is off 65 - swap_font_color = false # see below 78 + position = "0, 0"; 79 + halign = "center"; 80 + valign = "center"; 66 81 67 - position = 0, -80 68 - halign = center 69 - valign = center 70 - } 82 + shadow_passes = 1; 83 + shadow_size = 5; 84 + shadow_boost = 1.6; 85 + } 86 + { 87 + monitor = ""; 88 + text = ''cmd[update:30000] echo "$(date +"%A, %B %-d | %I:%M %p") | $(${pkgs.nushell}/bin/nu ${inputs.self}/res/bat_display.nu)"''; 89 + color = "rgba(255, 255, 255, 1.0)"; 90 + font_size = 20; 91 + font_family = "sans-serif"; 92 + rotate = 0; # degrees, counter-clockwise 71 93 72 - label { 73 - monitor = 74 - text = $DESC 75 - color = rgba(255, 255, 255, 1.0) 76 - font_size = 25 77 - font_family = sans-serif 78 - rotate = 0 # degrees, counter-clockwise 79 - 80 - position = 0, 0 81 - halign = center 82 - valign = center 83 - 84 - shadow_passes = 1 85 - shadow_size = 5 86 - shadow_boost = 1.6 87 - } 88 - 89 - label { 90 - monitor = 91 - text = cmd[update:30000] echo "$(date +"%A, %B %-d | %I:%M %p") | $(${pkgs.nushell}/bin/nu ${inputs.self}/res/bat_display.nu)" 92 - color = rgba(255, 255, 255, 1.0) 93 - font_size = 20 94 - font_family = sans-serif 95 - rotate = 0 # degrees, counter-clockwise 94 + position = "0, -40"; 95 + halign = "center"; 96 + valign = "top"; 96 97 97 - position = 0, -40 98 - halign = center 99 - valign = top 100 - 101 - shadow_passes = 1 102 - shadow_size = 5 103 - shadow_boost = 1.6 104 - } 105 - ''; 98 + shadow_passes = 1; 99 + shadow_size = 5; 100 + shadow_boost = 1.6; 101 + } 102 + ]; 103 + }; 104 + }; 106 105 }; 107 106 }
+5 -15
roles/graphics/shell.nix
··· 8 8 environment.systemPackages = with pkgs; [ 9 9 # Shell Components 10 10 hyprlock 11 + hypridle 11 12 swaynotificationcenter 12 13 swayosd 13 14 ··· 60 61 61 62 home-manager.users.bean = { 62 63 xdg.configFile = { 63 - waybar.source = "${inputs.self}/res/waybar"; 64 - swaync.source = "${inputs.self}/res/swaync"; 65 64 dolphinrc.source = "${inputs.self}/res/theming/dolphinrc"; 66 65 "swayosd/style.css".source = "${inputs.self}/res/swayosd.css"; 67 66 68 67 "kdeconnect/config".text = '' 69 68 [General] 70 69 name=${lib.toUpper config.networking.hostName} 71 - ''; 72 - 73 - "hypr/hyprpaper.conf".text = '' 74 - ipc = off 75 - splash = off 76 - preload = "${inputs.self}/res/pictures/background.jpg" 77 - wallpaper = ,"${inputs.self}/res/pictures/background.jpg" 78 70 ''; 79 71 }; 80 72 ··· 93 85 ]; 94 86 }; 95 87 location = "center"; 96 - theme = "${inputs.self}/res/rofi/rofi-style.rasi"; 97 88 }; 98 89 }; 99 90 100 91 wayland.windowManager.hyprland.settings = { 101 92 exec-once = [ 102 - "${pkgs.hyprpaper}/bin/hyprpaper" 103 - "${pkgs.hypridle}/bin/hypridle" 93 + "hypridle" 104 94 "dolphin --daemon" 105 95 "waybar" 106 96 "wl-paste --watch bash ${inputs.self}/res/clipboard_middleman.sh" ··· 125 115 "SUPER,I,exec,${pkgs.rofi-pulse-select}/bin/rofi-pulse-select source" 126 116 "SUPER,O,exec,${pkgs.rofi-pulse-select}/bin/rofi-pulse-select sink" 127 117 "SUPER,B,exec,${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 128 - "SUPER,D,exec,nu ${inputs.self}/res/rofi/rofi-code.nu" 118 + "SUPER,D,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-code.nu" 129 119 "SUPER,Tab,exec,rofi -show window -show-icons" 130 - "SUPER,E,exec,nu ${inputs.self}/res/rofi/rofi-places.nu" 131 - "SUPER SHIFT,T,exec,nu ${inputs.self}/res/rofi/rofi-zoxide.nu" 120 + "SUPER,E,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-places.nu" 121 + "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${inputs.self}/res/rofi/rofi-zoxide.nu" 132 122 "SUPER,N,exec,${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" 133 123 "SUPER,A,exec,pavucontrol --tab 5" 134 124 "SUPER,V,exec,cliphist list | sed -r \"s|binary data image/(.*)|󰋩 Image (\\1)|g\" | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy"
+63
roles/graphics/swaync.nix
··· 1 + { 2 + pkgs, 3 + inputs, 4 + ... 5 + }: let 6 + css = pkgs.fetchurl { 7 + url = "https://github.com/catppuccin/swaync/releases/latest/download/mocha.css"; 8 + hash = "sha256-Hie/vDt15nGCy4XWERGy1tUIecROw17GOoasT97kIfc="; 9 + }; 10 + in { 11 + environment.systemPackages = with pkgs; [ 12 + alsa-utils 13 + ]; 14 + 15 + home-manager.users.bean.services.swaync = { 16 + enable = true; 17 + style = css; 18 + settings = { 19 + control-center-exclusive-zone = false; 20 + control-center-height = 1000; 21 + control-center-margin-bottom = 10; 22 + control-center-margin-left = 10; 23 + control-center-margin-right = 10; 24 + control-center-margin-top = 0; 25 + control-center-width = 800; 26 + fit-to-screen = false; 27 + hide-on-action = true; 28 + hide-on-clear = false; 29 + image-visibility = "when-available"; 30 + keyboard-shortcuts = true; 31 + notification-body-image-height = 100; 32 + notification-body-image-width = 200; 33 + notification-icon-size = 64; 34 + notification-window-width = 500; 35 + positionX = "center"; 36 + positionY = "top"; 37 + script-fail-notify = true; 38 + scripts = { 39 + all = { 40 + exec = "${pkgs.nushell}/bin/nu ${inputs.self}/res/notification.nu ${inputs.self}/res/notif-sounds"; 41 + urgency = ".*"; 42 + }; 43 + }; 44 + timeout = 10; 45 + timeout-critical = 0; 46 + timeout-low = 5; 47 + transition-time = 200; 48 + widget-config = { 49 + dnd = {text = "Do Not Disturb";}; 50 + label = { 51 + max-lines = 1; 52 + text = "Notification Center"; 53 + }; 54 + title = { 55 + button-text = "Clear All"; 56 + clear-all-button = true; 57 + text = "Notification Center"; 58 + }; 59 + }; 60 + widgets = ["title" "dnd" "notifications"]; 61 + }; 62 + }; 63 + }
+13 -12
roles/graphics/theming.nix
··· 9 9 style = "kvantum"; 10 10 }; 11 11 12 - environment.pathsToLink = [ 13 - "/share/Kvantum" 14 - "/share/icons" 15 - ]; # Kvantum needs linking 16 - 17 12 home-manager.users.bean = { 18 13 qt = { 19 14 enable = true; 20 - platformTheme.name = "qtct"; 15 + platformTheme.name = "kvantum"; 21 16 style.name = "kvantum"; 22 17 }; 23 18 ··· 27 22 "qt6ct/qt6ct.conf".source = "${inputs.self}/res/theming/qt6ct.conf"; 28 23 "gtk-3.0/settings.ini".source = "${inputs.self}/res/theming/gtk/settings.ini"; 29 24 "gtk-4.0/settings.ini".source = "${inputs.self}/res/theming/gtk/settings.ini"; 30 - "Kvantum/kvantum.kvconfig".text = '' 31 - [General] 32 - theme=Sweet-Ambar-Blue 33 - ''; 25 + }; 26 + 27 + services.hyprpaper = { 28 + enable = true; 29 + settings = { 30 + ipc = "on"; 31 + splash = false; 32 + preload = ["${inputs.self}/res/pictures/background.jpg"]; 33 + wallpaper = [",${inputs.self}/res/pictures/background.jpg"]; 34 + }; 34 35 }; 35 36 36 37 wayland.windowManager.hyprland.settings = { 37 - systemd.variables = ["--all"]; 38 38 env = let 39 39 cursorSize = "24"; 40 40 in [ ··· 45 45 "XCURSOR_THEME,Sweet-cursors" 46 46 "XCURSOR_SIZE,${cursorSize}" 47 47 "GRIMBLAST_EDITOR,swappy -f " 48 + "TERMINAL,foot" 48 49 ]; 49 50 exec-once = [ 50 51 ''dconf write /org/gnome/desktop/interface/cursor-theme "Sweet-cursors"'' ··· 72 73 kdePackages.qt6ct 73 74 libsForQt5.qtstyleplugin-kvantum 74 75 kdePackages.qtstyleplugin-kvantum 75 - (callPackage "${inputs.self}/pkgs/themes.nix" {inherit inputs;}) # Custom themes 76 + (callPackage "${inputs.self}/pkgs/theming.nix" {}) 76 77 adwaita-icon-theme # For fallback icons 77 78 ]; 78 79 }
+454
roles/graphics/waybar.nix
··· 1 + { 2 + pkgs, 3 + inputs, 4 + ... 5 + }: let 6 + catppuccinCss = pkgs.fetchurl { 7 + url = "https://github.com/catppuccin/waybar/raw/refs/heads/main/themes/mocha.css"; 8 + hash = "sha256-puMFl8zIKOiYhE6wzqnffXOHn/VnKmpVDzrMJMk+3Rc="; 9 + }; 10 + in { 11 + home-manager.users.bean.programs.waybar = { 12 + enable = true; 13 + style = '' 14 + @import "${catppuccinCss}"; 15 + 16 + * { 17 + font-family: Noto Sans, FiraCode Nerd Font Mono; 18 + } 19 + 20 + window#waybar { 21 + background: rgba(252, 116, 150, 0); 22 + color: @text; 23 + } 24 + 25 + .modules-left > * > *, 26 + .modules-right > * > * { 27 + font-size: 1.5rem; 28 + background: @crust; 29 + border: 2px solid @base; 30 + border-radius: 5rem; 31 + padding: 5px 15px; 32 + margin: 5px 2px; 33 + } 34 + 35 + #idle_inhibitor, 36 + #custom-notification, 37 + #pulseaudio.muted, 38 + #custom-power-menu, 39 + #custom-kde-connect.disconnected, 40 + #bluetooth.disconnected, 41 + #bluetooth.off, 42 + #bluetooth.disabled { 43 + font-size: 30px; 44 + } 45 + 46 + #bluetooth.disabled { 47 + border-color: @red; 48 + } 49 + 50 + #waybar .modules-left > *:first-child > * { 51 + margin-left: 25px; 52 + } 53 + 54 + #waybar .modules-right > *:last-child > * { 55 + margin-right: 25px; 56 + } 57 + 58 + #waybar .modules-left, 59 + #waybar .modules-right { 60 + margin-top: 10px; 61 + } 62 + 63 + #waybar .modules-center { 64 + margin-bottom: 10px; 65 + } 66 + 67 + #battery.warning { 68 + border-color: @yellow; 69 + } 70 + 71 + #battery.critical { 72 + border-color: @red; 73 + } 74 + 75 + * > #battery.charging { 76 + border-color: @green; 77 + } 78 + 79 + #taskbar, 80 + #workspaces { 81 + padding: 10px; 82 + border-radius: 5rem; 83 + background: @mantle; 84 + } 85 + 86 + #workspaces { 87 + margin-bottom: 15px; 88 + } 89 + 90 + #taskbar button, 91 + #workspaces button { 92 + color: @text; 93 + border-radius: 5rem; 94 + padding: 10px 15px; 95 + margin: 0 5px; 96 + background: @crust; 97 + } 98 + 99 + #workspaces button { 100 + font-size: 1.5rem; 101 + } 102 + 103 + #cpu, 104 + #memory, 105 + #temperature { 106 + font-size: 1.5rem; 107 + padding: 5px 25px; 108 + margin-bottom: 25px; 109 + } 110 + 111 + #cpu.warning, 112 + #memory.warning { 113 + border-color: @yellow; 114 + } 115 + 116 + #cpu.critical, 117 + #memory.critical, 118 + #temperature.critical { 119 + border-color: @red; 120 + } 121 + 122 + #workspaces button.active { 123 + border: 2px solid @sapphire; 124 + } 125 + 126 + #taskbar button.active { 127 + border: 2px solid @sapphire; 128 + } 129 + 130 + #idle_inhibitor.activated { 131 + border-color: @mauve; 132 + } 133 + 134 + #custom-notification.notification { 135 + border-color: @sapphire; 136 + } 137 + 138 + #custom-notification.dnd-none, 139 + #custom-notification.dnd-notification, 140 + #custom-notification.dnd-inhibited-none, 141 + #custom-notification.dnd-inhibited-notification { 142 + border-color: @red; 143 + } 144 + 145 + #custom-notification.inhibited-none, 146 + #custom-notification.inhibited-notification { 147 + border-color: @mauve; 148 + } 149 + 150 + #network.disconnected { 151 + border-color: @red; 152 + } 153 + 154 + #privacy { 155 + background: none; 156 + margin: 0; 157 + padding: 0; 158 + } 159 + 160 + #privacy-item { 161 + font-size: 1.5rem; 162 + border-radius: 5rem; 163 + padding: 5px 15px; 164 + margin: 5px 2px; 165 + border-color: @red; 166 + } 167 + 168 + #custom-weather.VeryCloudy, 169 + #custom-weather.Cloudy, 170 + #custom-weather.Fog { 171 + border-color: @overlay0; 172 + } 173 + 174 + #custom-weather.HeavyRain, 175 + #custom-weather.ThunderyHeavyRain, 176 + #custom-weather.ThunderyRain, 177 + #custom-weather.ThunderyShowers, 178 + #custom-weather.HeavyShowers, 179 + #custom-weather.LightRain, 180 + #custom-weather.LightShowers { 181 + border-color: @teal; 182 + } 183 + 184 + #custom-weather.HeavySnow, 185 + #custom-weather.LightSnow, 186 + #custom-weather.Sleet, 187 + #custom-weather.Snow, 188 + #custom-weather.LightSnowShowers, 189 + #custom-weather.LightSleetShowers { 190 + border-color: @text; 191 + } 192 + 193 + #custom-weather.Clear, 194 + #custom-weather.Sunny { 195 + border-color: @yellow; 196 + } 197 + 198 + #custom-weather.Clear.night, 199 + #custom-weather.Sunny.night { 200 + border-color: @mauve; 201 + } 202 + 203 + #custom-weather.PartlyCloudy { 204 + border-color: @flamingo; 205 + } 206 + 207 + #custom-news.utd { 208 + font-size: 1.5rem; 209 + } 210 + 211 + #custom-news.unread { 212 + border-color: @sapphire; 213 + } 214 + 215 + #mpris.playing { 216 + border-color: @sapphire; 217 + } 218 + 219 + #mpris.paused.kdeconnect { 220 + opacity: 0; 221 + } 222 + ''; 223 + settings = [ 224 + { 225 + battery = { 226 + format = "{icon} {capacity}󰏰"; 227 + format-charging = "{icon} {capacity}󰏰"; 228 + format-icons = { 229 + charging = ["󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"]; 230 + default = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; 231 + }; 232 + states = { 233 + critical = 15; 234 + warning = 30; 235 + }; 236 + }; 237 + bluetooth = { 238 + format = "󰂯"; 239 + format-connected = "󰂱"; 240 + format-connected-battery = "󰂱 {device_battery_percentage}󰏰"; 241 + format-disabled = "󰂲"; 242 + format-off = "󰂲"; 243 + on-click = "rofi-bluetooth"; 244 + on-click-right = "rfkill toggle bluetooth"; 245 + tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; 246 + tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; 247 + tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; 248 + tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%"; 249 + }; 250 + "clock#1" = { 251 + actions = { 252 + on-click = "shift_up"; 253 + on-click-middle = "mode"; 254 + on-click-right = "shift_down"; 255 + }; 256 + calendar = { 257 + format = { 258 + days = "<span color='#ecc6d9'><b>{}</b></span>"; 259 + months = "<span color='#ffead3'><b>{}</b></span>"; 260 + today = "<span color='#ff6699'><b><u>{}</u></b></span>"; 261 + weekdays = "<span color='#ffcc66'><b>{}</b></span>"; 262 + weeks = "<span color='#99ffdd'><b>W{}</b></span>"; 263 + }; 264 + mode = "month"; 265 + mode-mon-col = 3; 266 + on-scroll = 1; 267 + weeks-pos = "right"; 268 + }; 269 + format = "󰃭 {:%A, %B %Od}"; 270 + tooltip-format = "<tt><small>{calendar}</small></tt>"; 271 + }; 272 + "clock#2" = { 273 + format = "󰥔 {:%I:%M %p}"; 274 + tooltip-format = "{:%F at %T in %Z (UTC%Ez)}"; 275 + }; 276 + "custom/kde-connect" = { 277 + exec = "${pkgs.nushell}/bin/nu ${inputs.self}/res/custom_waybar_modules/kdeconnect.nu"; 278 + format = "{}"; 279 + interval = 30; 280 + on-click = "kdeconnect-settings"; 281 + return-type = "json"; 282 + }; 283 + "custom/news" = { 284 + exec = "${pkgs.nushell}/bin/nu ${inputs.self}/res/custom_waybar_modules/newsboat.nu"; 285 + exec-on-event = true; 286 + format = "{}"; 287 + on-click = "pidof -q newsboat && hyprctl dispatch focuswindow newsboat || foot --title=\"Newsboat\" --app-id=\"newsboat\" newsboat; pkill -SIGRTMIN+6 waybar"; 288 + on-click-right = "pkill waybar -SIGRTMIN+6"; 289 + restart-interval = 1800; 290 + return-type = "json"; 291 + signal = 6; 292 + }; 293 + "custom/notification" = { 294 + escape = true; 295 + exec = "swaync-client -swb"; 296 + exec-if = "which swaync-client"; 297 + format = "{icon}"; 298 + format-icons = { 299 + dnd-inhibited-none = "󰂛"; 300 + dnd-inhibited-notification = "󰂛<sup></sup>"; 301 + dnd-none = "󰂛"; 302 + dnd-notification = "󰂛<sup></sup>"; 303 + inhibited-none = "󰂠"; 304 + inhibited-notification = "󰂠<sup></sup>"; 305 + none = "󰂚"; 306 + notification = "󱅫"; 307 + }; 308 + max-length = 3; 309 + on-click = "sleep 0.2 && swaync-client -t -sw"; 310 + on-click-middle = "sleep 0.2 && swaync-client -C -sw"; 311 + on-click-right = "sleep 0.2 && swaync-client -d -sw"; 312 + return-type = "json"; 313 + tooltip = false; 314 + }; 315 + "custom/weather" = { 316 + exec = "${pkgs.nushell}/bin/nu ${inputs.self}/res/custom_waybar_modules/weather.nu"; 317 + format = "{}"; 318 + interval = 600; 319 + on-click = "xdg-open https://duckduckgo.com/?q=weather"; 320 + return-type = "json"; 321 + }; 322 + idle_inhibitor = { 323 + format = "{icon}"; 324 + format-icons = { 325 + activated = "󰒳"; 326 + deactivated = "󰒲"; 327 + }; 328 + }; 329 + layer = "top"; 330 + modules-center = []; 331 + modules-left = ["user" "clock#1" "clock#2" "custom/news" "custom/weather" "mpris"]; 332 + modules-right = ["network" "battery" "bluetooth" "pulseaudio" "custom/kde-connect" "idle_inhibitor" "custom/notification" "privacy" "tray"]; 333 + mpris = { 334 + album-len = 20; 335 + artist-len = 25; 336 + dynamic-importance-order = ["title" "position" "length" "artist" "album"]; 337 + dynamic-len = 50; 338 + dynamic-order = ["title" "artist" "album" "position" "length"]; 339 + format = "{player_icon} {dynamic}"; 340 + format-paused = "{status_icon} {dynamic}"; 341 + player-icons = { 342 + QMPlay2 = "󰐌"; 343 + default = "󰎆"; 344 + firefox = "󰈹"; 345 + firefox-devedition = "󰈹"; 346 + kdeconnect = ""; 347 + spotify = "󰓇"; 348 + }; 349 + status-icons = { 350 + paused = "󰏤"; 351 + stopped = "󰓛"; 352 + }; 353 + title-len = 35; 354 + }; 355 + network = { 356 + format = "{ifname}"; 357 + format-disconnected = "󰪎"; 358 + format-ethernet = "󱎔 {ifname}"; 359 + format-icons = ["󰤟" "󰤢" "󰤥" "󰤨"]; 360 + format-linked = "󰌷 {ifname}"; 361 + format-wifi = "{icon} {essid}"; 362 + tooltip-disconnected = "Disconnected"; 363 + tooltip-format = "{ifname} via {gwaddr}"; 364 + tooltip-format-ethernet = "󱎔 {ifname}"; 365 + tooltip-format-wifi = "Connected to {essid} ({signalStrength}󰏰 Strength) over {ifname} via {gwaddr}"; 366 + }; 367 + position = "top"; 368 + privacy = { 369 + icon-size = 20; 370 + icon-spacing = 4; 371 + modules = [ 372 + { 373 + tooltip = true; 374 + tooltip-icon-size = 24; 375 + type = "screenshare"; 376 + } 377 + { 378 + tooltip = true; 379 + tooltip-icon-size = 24; 380 + type = "audio-in"; 381 + } 382 + ]; 383 + transition-duration = 200; 384 + }; 385 + pulseaudio = { 386 + format = "{icon} {volume:2}󰏰"; 387 + format-bluetooth = "{icon} {volume}󰏰"; 388 + format-icons = { 389 + car = ""; 390 + default = ["󰖀" "󰕾"]; 391 + hands-free = "󰋋"; 392 + headphone = "󰋋"; 393 + headset = "󰋋"; 394 + phone = ""; 395 + portable = ""; 396 + }; 397 + format-muted = "󰝟"; 398 + on-click = "pamixer -t"; 399 + on-click-right = "pavucontrol"; 400 + scroll-step = 5; 401 + }; 402 + tray = { 403 + icon-size = 25; 404 + show-passive-items = true; 405 + spacing = 5; 406 + }; 407 + user = { 408 + format = " {user}"; 409 + icon = true; 410 + }; 411 + } 412 + { 413 + cpu = { 414 + format = "󰍛 {usage}󰏰"; 415 + on-click = "foot --title=\"Htop\" --app-id=\"htop\" htop --sort-key=PERCENT_CPU"; 416 + states = { 417 + critical = 95; 418 + warning = 80; 419 + }; 420 + }; 421 + "hyprland/workspaces" = { 422 + disable-scroll = true; 423 + format = "{name}"; 424 + }; 425 + layer = "top"; 426 + memory = { 427 + format = " {}󰏰 ({used:0.1f}/{total:0.1f} GiB)"; 428 + on-click = "foot --title=\"Htop\" --app-id=\"htop\" htop --sort-key=PERCENT_MEM"; 429 + states = { 430 + critical = 90; 431 + warning = 70; 432 + }; 433 + }; 434 + modules-center = ["wlr/taskbar"]; 435 + modules-left = ["hyprland/workspaces"]; 436 + modules-right = ["temperature" "cpu" "memory"]; 437 + position = "bottom"; 438 + temperature = { 439 + critical-threshold = 80; 440 + format = "{icon} {temperatureC} °C"; 441 + format-critical = "{icon}! {temperatureC} °C"; 442 + format-icons = ["󱃃" "󰔏" "󱃂"]; 443 + thermal-zone = 10; 444 + }; 445 + "wlr/taskbar" = { 446 + format = "{icon}"; 447 + icon-size = 35; 448 + icon-theme = "candy-icons"; 449 + on-click = "activate"; 450 + }; 451 + } 452 + ]; 453 + }; 454 + }
roles/social/discord.nix roles/social+graphics/discord.nix
+47 -2
systems/aperture.nix
··· 9 9 10 10 includeBaseMods = true; 11 11 12 - roles = ["latest-linux" "dev" "graphics" "fun" "secureboot" "wireless" "hypervisor"]; 13 - extraModules = [inputs.nixos-hardware.nixosModules.framework-13th-gen-intel]; 12 + roles = ["latest-linux" "dev" "graphics" "fun" "social" "secureboot" "wireless" "hypervisor"]; 13 + extraModules = [ 14 + inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 15 + ( 16 + { 17 + config, 18 + lib, 19 + pkgs, 20 + modulesPath, 21 + ... 22 + }: { 23 + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 24 + 25 + boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; 26 + boot.initrd.kernelModules = []; 27 + boot.kernelModules = ["kvm-intel"]; 28 + boot.extraModulePackages = []; 29 + boot.binfmt.emulatedSystems = ["aarch64-linux"]; 30 + 31 + fileSystems."/" = { 32 + device = "/dev/disk/by-uuid/2c002966-4572-4094-8d3f-18d455b611ca"; 33 + fsType = "ext4"; 34 + }; 35 + 36 + fileSystems."/boot" = { 37 + device = "/dev/disk/by-uuid/A57C-E5FF"; 38 + fsType = "vfat"; 39 + }; 40 + 41 + hardware.framework.enableKmod = false; 42 + 43 + swapDevices = [{device = "/dev/disk/by-uuid/fde5784f-93e8-4e3b-8ca2-74bf44b00479";}]; 44 + 45 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 46 + # (the default) this is the recommended approach. When using systemd-networkd it's 47 + # still possible to use this option, but it's recommended to use it in conjunction 48 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 49 + networking.useDHCP = lib.mkDefault true; 50 + # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true; 51 + 52 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 53 + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 54 + hardware.cpu.intel.updateMicrocode = 55 + lib.mkDefault config.hardware.enableRedistributableFirmware; 56 + } 57 + ) 58 + ]; 14 59 }; 15 60 }
+6 -1
systems/black-mesa.nix
··· 12 12 roles = ["latest-linux" "ssh" "dev" "secureboot" "mc-server"]; 13 13 14 14 extraModules = [ 15 - ({modulesPath}: { 15 + ({ 16 + modulesPath, 17 + lib, 18 + config, 19 + ... 20 + }: { 16 21 imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 17 22 18 23 boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];