| author | |
| committer | |
| log | db93fc5149f66cced9e045cdc2be8ca4926fecc9 |
| tree | 40ef78f5ab2dedac55587573555dbf6d0b908f44 |
| parent | 4502f0036f61cd068b46163bfa782d52d945cd93 |
| parent | 454a26a85a3b1d5b7577fce269fd5874b5ccab49 |
| signature | Commit is signed but in an unrecognized format. |
18 files changed, 629 insertions(+), 33 deletions(-)
.gitignore-1| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | flake.lock | 1 | flake.lock |
| 2 | .DS_STORE | 2 | .DS_STORE |
| 3 | **/.DS_STORE | ||
| 4 | result | 3 | result |
| 5 | result-* | 4 | result-* |
files/ghostty/cursor-smear-black.glsl created+114| ... | @@ -0,0 +1,114 @@ | ||
| 1 | float getSdfRectangle(in vec2 p, in vec2 xy, in vec2 b) | ||
| 2 | { | ||
| 3 | vec2 d = abs(p - xy) - b; | ||
| 4 | return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0); | ||
| 5 | } | ||
| 6 | |||
| 7 | // Based on Inigo Quilez's 2D distance functions article: https://iquilezles.org/articles/distfunctions2d/ | ||
| 8 | // Potencially optimized by eliminating conditionals and loops to enhance performance and reduce branching | ||
| 9 | |||
| 10 | float seg(in vec2 p, in vec2 a, in vec2 b, inout float s, float d) { | ||
| 11 | vec2 e = b - a; | ||
| 12 | vec2 w = p - a; | ||
| 13 | vec2 proj = a + e * clamp(dot(w, e) / dot(e, e), 0.0, 1.0); | ||
| 14 | float segd = dot(p - proj, p - proj); | ||
| 15 | d = min(d, segd); | ||
| 16 | |||
| 17 | float c0 = step(0.0, p.y - a.y); | ||
| 18 | float c1 = 1.0 - step(0.0, p.y - b.y); | ||
| 19 | float c2 = 1.0 - step(0.0, e.x * w.y - e.y * w.x); | ||
| 20 | float allCond = c0 * c1 * c2; | ||
| 21 | float noneCond = (1.0 - c0) * (1.0 - c1) * (1.0 - c2); | ||
| 22 | float flip = mix(1.0, -1.0, step(0.5, allCond + noneCond)); | ||
| 23 | s *= flip; | ||
| 24 | return d; | ||
| 25 | } | ||
| 26 | |||
| 27 | float getSdfParallelogram(in vec2 p, in vec2 v0, in vec2 v1, in vec2 v2, in vec2 v3) { | ||
| 28 | float s = 1.0; | ||
| 29 | float d = dot(p - v0, p - v0); | ||
| 30 | |||
| 31 | d = seg(p, v0, v3, s, d); | ||
| 32 | d = seg(p, v1, v0, s, d); | ||
| 33 | d = seg(p, v2, v1, s, d); | ||
| 34 | d = seg(p, v3, v2, s, d); | ||
| 35 | |||
| 36 | return s * sqrt(d); | ||
| 37 | } | ||
| 38 | |||
| 39 | vec2 normalize(vec2 value, float isPosition) { | ||
| 40 | return (value * 2.0 - (iResolution.xy * isPosition)) / iResolution.y; | ||
| 41 | } | ||
| 42 | |||
| 43 | float antialising(float distance) { | ||
| 44 | return 1. - smoothstep(0., normalize(vec2(2., 2.), 0.).x, distance); | ||
| 45 | } | ||
| 46 | |||
| 47 | float determineStartVertexFactor(vec2 a, vec2 b) { | ||
| 48 | // Conditions using step | ||
| 49 | float condition1 = step(b.x, a.x) * step(a.y, b.y); // a.x < b.x && a.y > b.y | ||
| 50 | float condition2 = step(a.x, b.x) * step(b.y, a.y); // a.x > b.x && a.y < b.y | ||
| 51 | |||
| 52 | // If neither condition is met, return 1 (else case) | ||
| 53 | return 1.0 - max(condition1, condition2); | ||
| 54 | } | ||
| 55 | |||
| 56 | vec2 getRectangleCenter(vec4 rectangle) { | ||
| 57 | return vec2(rectangle.x + (rectangle.z / 2.), rectangle.y - (rectangle.w / 2.)); | ||
| 58 | } | ||
| 59 | float ease(float x) { | ||
| 60 | return pow(1.0 - x, 3.0); | ||
| 61 | } | ||
| 62 | |||
| 63 | const vec4 TRAIL_COLOR = vec4(0.0, 0.2, 0.5, 0.1); | ||
| 64 | const float DURATION = 0.15; //IN SECONDS | ||
| 65 | |||
| 66 | void mainImage(out vec4 fragColor, in vec2 fragCoord) | ||
| 67 | { | ||
| 68 | #if !defined(WEB) | ||
| 69 | fragColor = texture(iChannel0, fragCoord.xy / iResolution.xy); | ||
| 70 | #endif | ||
| 71 | // Normalization for fragCoord to a space of -1 to 1; | ||
| 72 | vec2 vu = normalize(fragCoord, 1.); | ||
| 73 | vec2 offsetFactor = vec2(-.5, 0.5); | ||
| 74 | |||
| 75 | // Normalization for cursor position and size; | ||
| 76 | // cursor xy has the postion in a space of -1 to 1; | ||
| 77 | // zw has the width and height | ||
| 78 | vec4 currentCursor = vec4(normalize(iCurrentCursor.xy, 1.), normalize(iCurrentCursor.zw, 0.)); | ||
| 79 | vec4 previousCursor = vec4(normalize(iPreviousCursor.xy, 1.), normalize(iPreviousCursor.zw, 0.)); | ||
| 80 | |||
| 81 | // When drawing a parellelogram between cursors for the trail i need to determine where to start at the top-left or top-right vertex of the cursor | ||
| 82 | float vertexFactor = determineStartVertexFactor(currentCursor.xy, previousCursor.xy); | ||
| 83 | float invertedVertexFactor = 1.0 - vertexFactor; | ||
| 84 | |||
| 85 | // Set every vertex of my parellogram | ||
| 86 | vec2 v0 = vec2(currentCursor.x + currentCursor.z * vertexFactor, currentCursor.y - currentCursor.w); | ||
| 87 | vec2 v1 = vec2(currentCursor.x + currentCursor.z * invertedVertexFactor, currentCursor.y); | ||
| 88 | vec2 v2 = vec2(previousCursor.x + currentCursor.z * invertedVertexFactor, previousCursor.y); | ||
| 89 | vec2 v3 = vec2(previousCursor.x + currentCursor.z * vertexFactor, previousCursor.y - previousCursor.w); | ||
| 90 | |||
| 91 | float sdfCurrentCursor = getSdfRectangle(vu, currentCursor.xy - (currentCursor.zw * offsetFactor), currentCursor.zw * 0.5); | ||
| 92 | float sdfTrail = getSdfParallelogram(vu, v0, v1, v2, v3); | ||
| 93 | |||
| 94 | float progress = clamp((iTime - iTimeCursorChange) / DURATION, 0.0, 1.0); | ||
| 95 | float easedProgress = ease(progress); | ||
| 96 | // Distance between cursors determine the total length of the parallelogram; | ||
| 97 | vec2 centerCC = getRectangleCenter(currentCursor); | ||
| 98 | vec2 centerCP = getRectangleCenter(previousCursor); | ||
| 99 | float lineLength = distance(centerCC, centerCP); | ||
| 100 | |||
| 101 | vec4 newColor = vec4(fragColor); | ||
| 102 | // Compute fade factor based on distance along the trail | ||
| 103 | float fadeFactor = 1.0 - smoothstep(lineLength, sdfCurrentCursor, easedProgress * lineLength); | ||
| 104 | |||
| 105 | // Apply fading effect to trail color | ||
| 106 | vec4 fadedTrailColor = TRAIL_COLOR * fadeFactor; | ||
| 107 | |||
| 108 | // Blend trail with fade effect | ||
| 109 | newColor = mix(newColor, fadedTrailColor, antialising(sdfTrail)); | ||
| 110 | // Draw current cursor | ||
| 111 | newColor = mix(newColor, TRAIL_COLOR, antialising(sdfCurrentCursor)); | ||
| 112 | newColor = mix(newColor, fragColor, step(sdfCurrentCursor, 0.)); | ||
| 113 | fragColor = mix(fragColor, newColor, step(sdfCurrentCursor, easedProgress * lineLength)); | ||
| 114 | } | ||
files/ghostty/cursor-smear-blue.glsl created+114| ... | @@ -0,0 +1,114 @@ | ||
| 1 | float getSdfRectangle(in vec2 p, in vec2 xy, in vec2 b) | ||
| 2 | { | ||
| 3 | vec2 d = abs(p - xy) - b; | ||
| 4 | return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0); | ||
| 5 | } | ||
| 6 | |||
| 7 | // Based on Inigo Quilez's 2D distance functions article: https://iquilezles.org/articles/distfunctions2d/ | ||
| 8 | // Potencially optimized by eliminating conditionals and loops to enhance performance and reduce branching | ||
| 9 | |||
| 10 | float seg(in vec2 p, in vec2 a, in vec2 b, inout float s, float d) { | ||
| 11 | vec2 e = b - a; | ||
| 12 | vec2 w = p - a; | ||
| 13 | vec2 proj = a + e * clamp(dot(w, e) / dot(e, e), 0.0, 1.0); | ||
| 14 | float segd = dot(p - proj, p - proj); | ||
| 15 | d = min(d, segd); | ||
| 16 | |||
| 17 | float c0 = step(0.0, p.y - a.y); | ||
| 18 | float c1 = 1.0 - step(0.0, p.y - b.y); | ||
| 19 | float c2 = 1.0 - step(0.0, e.x * w.y - e.y * w.x); | ||
| 20 | float allCond = c0 * c1 * c2; | ||
| 21 | float noneCond = (1.0 - c0) * (1.0 - c1) * (1.0 - c2); | ||
| 22 | float flip = mix(1.0, -1.0, step(0.5, allCond + noneCond)); | ||
| 23 | s *= flip; | ||
| 24 | return d; | ||
| 25 | } | ||
| 26 | |||
| 27 | float getSdfParallelogram(in vec2 p, in vec2 v0, in vec2 v1, in vec2 v2, in vec2 v3) { | ||
| 28 | float s = 1.0; | ||
| 29 | float d = dot(p - v0, p - v0); | ||
| 30 | |||
| 31 | d = seg(p, v0, v3, s, d); | ||
| 32 | d = seg(p, v1, v0, s, d); | ||
| 33 | d = seg(p, v2, v1, s, d); | ||
| 34 | d = seg(p, v3, v2, s, d); | ||
| 35 | |||
| 36 | return s * sqrt(d); | ||
| 37 | } | ||
| 38 | |||
| 39 | vec2 normalize(vec2 value, float isPosition) { | ||
| 40 | return (value * 2.0 - (iResolution.xy * isPosition)) / iResolution.y; | ||
| 41 | } | ||
| 42 | |||
| 43 | float antialising(float distance) { | ||
| 44 | return 1. - smoothstep(0., normalize(vec2(2., 2.), 0.).x, distance); | ||
| 45 | } | ||
| 46 | |||
| 47 | float determineStartVertexFactor(vec2 a, vec2 b) { | ||
| 48 | // Conditions using step | ||
| 49 | float condition1 = step(b.x, a.x) * step(a.y, b.y); // a.x < b.x && a.y > b.y | ||
| 50 | float condition2 = step(a.x, b.x) * step(b.y, a.y); // a.x > b.x && a.y < b.y | ||
| 51 | |||
| 52 | // If neither condition is met, return 1 (else case) | ||
| 53 | return 1.0 - max(condition1, condition2); | ||
| 54 | } | ||
| 55 | |||
| 56 | vec2 getRectangleCenter(vec4 rectangle) { | ||
| 57 | return vec2(rectangle.x + (rectangle.z / 2.), rectangle.y - (rectangle.w / 2.)); | ||
| 58 | } | ||
| 59 | float ease(float x) { | ||
| 60 | return pow(1.0 - x, 3.0); | ||
| 61 | } | ||
| 62 | |||
| 63 | const vec4 TRAIL_COLOR = vec4(0.8, 1.0, 1.0, 0.1); | ||
| 64 | const float DURATION = 0.1; //IN SECONDS | ||
| 65 | |||
| 66 | void mainImage(out vec4 fragColor, in vec2 fragCoord) | ||
| 67 | { | ||
| 68 | #if !defined(WEB) | ||
| 69 | fragColor = texture(iChannel0, fragCoord.xy / iResolution.xy); | ||
| 70 | #endif | ||
| 71 | // Normalization for fragCoord to a space of -1 to 1; | ||
| 72 | vec2 vu = normalize(fragCoord, 1.); | ||
| 73 | vec2 offsetFactor = vec2(-.5, 0.5); | ||
| 74 | |||
| 75 | // Normalization for cursor position and size; | ||
| 76 | // cursor xy has the postion in a space of -1 to 1; | ||
| 77 | // zw has the width and height | ||
| 78 | vec4 currentCursor = vec4(normalize(iCurrentCursor.xy, 1.), normalize(iCurrentCursor.zw, 0.)); | ||
| 79 | vec4 previousCursor = vec4(normalize(iPreviousCursor.xy, 1.), normalize(iPreviousCursor.zw, 0.)); | ||
| 80 | |||
| 81 | // When drawing a parellelogram between cursors for the trail i need to determine where to start at the top-left or top-right vertex of the cursor | ||
| 82 | float vertexFactor = determineStartVertexFactor(currentCursor.xy, previousCursor.xy); | ||
| 83 | float invertedVertexFactor = 1.0 - vertexFactor; | ||
| 84 | |||
| 85 | // Set every vertex of my parellogram | ||
| 86 | vec2 v0 = vec2(currentCursor.x + currentCursor.z * vertexFactor, currentCursor.y - currentCursor.w); | ||
| 87 | vec2 v1 = vec2(currentCursor.x + currentCursor.z * invertedVertexFactor, currentCursor.y); | ||
| 88 | vec2 v2 = vec2(previousCursor.x + currentCursor.z * invertedVertexFactor, previousCursor.y); | ||
| 89 | vec2 v3 = vec2(previousCursor.x + currentCursor.z * vertexFactor, previousCursor.y - previousCursor.w); | ||
| 90 | |||
| 91 | float sdfCurrentCursor = getSdfRectangle(vu, currentCursor.xy - (currentCursor.zw * offsetFactor), currentCursor.zw * 0.5); | ||
| 92 | float sdfTrail = getSdfParallelogram(vu, v0, v1, v2, v3); | ||
| 93 | |||
| 94 | float progress = clamp((iTime - iTimeCursorChange) / DURATION, 0.0, 1.0); | ||
| 95 | float easedProgress = ease(progress); | ||
| 96 | // Distance between cursors determine the total length of the parallelogram; | ||
| 97 | vec2 centerCC = getRectangleCenter(currentCursor); | ||
| 98 | vec2 centerCP = getRectangleCenter(previousCursor); | ||
| 99 | float lineLength = distance(centerCC, centerCP); | ||
| 100 | |||
| 101 | vec4 newColor = vec4(fragColor); | ||
| 102 | // Compute fade factor based on distance along the trail | ||
| 103 | float fadeFactor = 1.0 - smoothstep(lineLength, sdfCurrentCursor, easedProgress * lineLength); | ||
| 104 | |||
| 105 | // Apply fading effect to trail color | ||
| 106 | vec4 fadedTrailColor = TRAIL_COLOR * fadeFactor; | ||
| 107 | |||
| 108 | // Blend trail with fade effect | ||
| 109 | newColor = mix(newColor, fadedTrailColor, antialising(sdfTrail)); | ||
| 110 | // Draw current cursor | ||
| 111 | newColor = mix(newColor, TRAIL_COLOR, antialising(sdfCurrentCursor)); | ||
| 112 | newColor = mix(newColor, fragColor, step(sdfCurrentCursor, 0.)); | ||
| 113 | fragColor = mix(fragColor, newColor, step(sdfCurrentCursor, easedProgress * lineLength)); | ||
| 114 | } | ||
flake.nix+10| ... | @@ -145,6 +145,16 @@ | ... | @@ -145,6 +145,16 @@ |
| 145 | system = "aarch64-darwin"; | 145 | system = "aarch64-darwin"; |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | # julia's cattop | ||
| 149 | nixosConfigurations.cattop = mkSystem "cattop" { | ||
| 150 | user = "julia"; | ||
| 151 | host = "cattop"; | ||
| 152 | system = "x86_64-linux"; | ||
| 153 | extraModules = [ | ||
| 154 | nixos-cosmic.nixosModules.default | ||
| 155 | ]; | ||
| 156 | }; | ||
| 157 | |||
| 148 | # generate checks for "nix flake check --all-systems --no-build" | 158 | # generate checks for "nix flake check --all-systems --no-build" |
| 149 | checks.aarch64-darwin = builtins.listToAttrs ( | 159 | checks.aarch64-darwin = builtins.listToAttrs ( |
| 150 | builtins.map ( | 160 | builtins.map ( |
modules/home/default.nix+12-1| ... | @@ -16,7 +16,14 @@ in | ... | @@ -16,7 +16,14 @@ in |
| 16 | imports = mainHomeImports ++ [ | 16 | imports = mainHomeImports ++ [ |
| 17 | ./macos/sketchybar.nix | 17 | ./macos/sketchybar.nix |
| 18 | ]; | 18 | ]; |
| 19 | programs = { | 19 | options = { |
| 20 | programs.ghostty.shader = lib.mkOption { | ||
| 21 | type = lib.types.str; | ||
| 22 | default = { }; | ||
| 23 | description = "set the ghostty shader, relative to 'files/ghostty'"; | ||
| 24 | }; | ||
| 25 | }; | ||
| 26 | config.programs = { | ||
| 20 | home-manager.enable = true; | 27 | home-manager.enable = true; |
| 21 | nix-index.enable = true; | 28 | nix-index.enable = true; |
| 22 | 29 | ||
| ... | @@ -89,5 +96,9 @@ in | ... | @@ -89,5 +96,9 @@ in |
| 89 | test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true | 96 | test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true |
| 90 | ''; | 97 | ''; |
| 91 | }; | 98 | }; |
| 99 | |||
| 100 | ghostty.settings.custom-shader = lib.mkIf ( | ||
| 101 | cfg.ghostty.shader != null | ||
| 102 | ) "${../../files/ghostty}/${cfg.ghostty.shader}"; | ||
| 92 | }; | 103 | }; |
| 93 | } | 104 | } |
modules/macos/default.nix-1| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | { | 1 | { |
| 2 | pkgs, | ||
| 3 | lib, | 2 | lib, |
| 4 | ... | 3 | ... |
| 5 | }: | 4 | }: |
modules/neovim/default.nix-21| ... | @@ -184,17 +184,9 @@ | ... | @@ -184,17 +184,9 @@ |
| 184 | }; | 184 | }; |
| 185 | }; | 185 | }; |
| 186 | }; | 186 | }; |
| 187 | |||
| 188 | binds = { | 187 | binds = { |
| 189 | whichKey.enable = true; | 188 | whichKey.enable = true; |
| 190 | cheatsheet.enable = true; | 189 | cheatsheet.enable = true; |
| 191 | # discourages bad keyboard habit, e.g. disables arrow keys, explains better binds | ||
| 192 | # https://github.com/m4xshen/hardtime.nvim | ||
| 193 | hardtime-nvim.enable = true; | ||
| 194 | hardtime-nvim.setupOpts = { | ||
| 195 | disable_mouse = false; | ||
| 196 | restriction_mode = "hint"; # default behavior is lenient | ||
| 197 | }; | ||
| 198 | }; | 190 | }; |
| 199 | ui = { | 191 | ui = { |
| 200 | borders.enable = true; | 192 | borders.enable = true; |
| ... | @@ -206,19 +198,6 @@ | ... | @@ -206,19 +198,6 @@ |
| 206 | enable = false; | 198 | enable = false; |
| 207 | navbuddy.enable = config.vim.ui.breadcrumbs.enable; | 199 | navbuddy.enable = config.vim.ui.breadcrumbs.enable; |
| 208 | }; | 200 | }; |
| 209 | smartcolumn = { | ||
| 210 | enable = true; | ||
| 211 | setupOpts.custom_colorcolumn = { | ||
| 212 | # this is a freeform module, it's `buftype = int;` for configuring column position | ||
| 213 | nix = "110"; | ||
| 214 | ruby = "120"; | ||
| 215 | java = "130"; | ||
| 216 | go = [ | ||
| 217 | "90" | ||
| 218 | "130" | ||
| 219 | ]; | ||
| 220 | }; | ||
| 221 | }; | ||
| 222 | }; | 201 | }; |
| 223 | notes = { | 202 | notes = { |
| 224 | todo-comments.enable = true; | 203 | todo-comments.enable = true; |
modules/nixos/default.nix-1| ... | @@ -7,7 +7,6 @@ | ... | @@ -7,7 +7,6 @@ |
| 7 | imports = [ | 7 | imports = [ |
| 8 | ./boot.nix | 8 | ./boot.nix |
| 9 | ./ld.nix | 9 | ./ld.nix |
| 10 | ./nvidia.nix | ||
| 11 | ./services.nix | 10 | ./services.nix |
| 12 | ]; | 11 | ]; |
| 13 | # make 'shared.darwin' not an error to define. | 12 | # make 'shared.darwin' not an error to define. |
users/chloe/configuration.nix+2| ... | @@ -6,6 +6,8 @@ | ... | @@ -6,6 +6,8 @@ |
| 6 | git | 6 | git |
| 7 | ]; | 7 | ]; |
| 8 | 8 | ||
| 9 | services.tailscale.enable = true; | ||
| 10 | |||
| 9 | # configuration for shared modules. | 11 | # configuration for shared modules. |
| 10 | # all custom options in 'shared' for clarity. | 12 | # all custom options in 'shared' for clarity. |
| 11 | shared.darwin = { | 13 | shared.darwin = { |
users/chloe/home.nix+18-2| ... | @@ -10,7 +10,9 @@ in | ... | @@ -10,7 +10,9 @@ in |
| 10 | let | 10 | let |
| 11 | # packages to always install | 11 | # packages to always install |
| 12 | all = [ | 12 | all = [ |
| 13 | ffmpeg | 13 | (ffmpeg.override { |
| 14 | withSvtav1 = true; | ||
| 15 | }) | ||
| 14 | ripgrep | 16 | ripgrep |
| 15 | uv | 17 | uv |
| 16 | nh | 18 | nh |
| ... | @@ -33,12 +35,26 @@ in | ... | @@ -33,12 +35,26 @@ in |
| 33 | }; | 35 | }; |
| 34 | programs = { | 36 | programs = { |
| 35 | # sort-lines:start | 37 | # sort-lines:start |
| 36 | bat.enable = true; | 38 | # bat.enable = true; |
| 37 | btop.enable = true; | 39 | btop.enable = true; |
| 38 | fd.enable = true; | 40 | fd.enable = true; |
| 39 | hyfetch.enable = true; | 41 | hyfetch.enable = true; |
| 40 | # sort-lines:end | 42 | # sort-lines:end |
| 41 | 43 | ||
| 44 | ghostty = { | ||
| 45 | enable = true; | ||
| 46 | shader = "cursor-smear-black.glsl"; | ||
| 47 | package = null; | ||
| 48 | settings = { | ||
| 49 | theme = "catppuccin-latte"; | ||
| 50 | font-family = "AT Name Mono"; | ||
| 51 | adjust-cursor-thickness = 1; | ||
| 52 | minimum-contrast = 1.1; | ||
| 53 | background-opacity = 0.9; | ||
| 54 | background-blur = true; | ||
| 55 | }; | ||
| 56 | }; | ||
| 57 | |||
| 42 | # zsh is the shell i use | 58 | # zsh is the shell i use |
| 43 | zsh = { | 59 | zsh = { |
| 44 | enable = true; | 60 | enable = true; |
users/chloe/vim.nix-6| ... | @@ -14,12 +14,6 @@ _: { | ... | @@ -14,12 +14,6 @@ _: { |
| 14 | foldenable = true; | 14 | foldenable = true; |
| 15 | linebreak = true; | 15 | linebreak = true; |
| 16 | }; | 16 | }; |
| 17 | binds = { | ||
| 18 | hardtime-nvim.setupOpts = { | ||
| 19 | restriction_mode = "block"; | ||
| 20 | disable_mouse = false; | ||
| 21 | }; | ||
| 22 | }; | ||
| 23 | git = { | 17 | git = { |
| 24 | gitsigns.setupOpts = { | 18 | gitsigns.setupOpts = { |
| 25 | current_line_blame = true; | 19 | current_line_blame = true; |
users/julia/cattop/configuration.nix created+127| ... | @@ -0,0 +1,127 @@ | ||
| 1 | # Edit this configuration file to define what should be installed on | ||
| 2 | # your system. Help is available in the configuration.nix(5) man page, on | ||
| 3 | # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). | ||
| 4 | |||
| 5 | { config, lib, pkgs, ... }: | ||
| 6 | |||
| 7 | { | ||
| 8 | imports = | ||
| 9 | [ # Include the results of the hardware scan. | ||
| 10 | ./hardware-configuration.nix | ||
| 11 | ]; | ||
| 12 | |||
| 13 | # Use the systemd-boot EFI boot loader. | ||
| 14 | boot.loader.efi.canTouchEfiVariables = true; | ||
| 15 | |||
| 16 | # networking.hostName = "nixos"; # Define your hostname. | ||
| 17 | # Pick only one of the below networking options. | ||
| 18 | # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | ||
| 19 | # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. | ||
| 20 | |||
| 21 | # Set your time zone. | ||
| 22 | # time.timeZone = "Europe/Amsterdam"; | ||
| 23 | |||
| 24 | # Configure network proxy if necessary | ||
| 25 | # networking.proxy.default = "http://user:password@proxy:port/"; | ||
| 26 | # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | ||
| 27 | |||
| 28 | # Select internationalisation properties. | ||
| 29 | # i18n.defaultLocale = "en_US.UTF-8"; | ||
| 30 | # console = { | ||
| 31 | # font = "Lat2-Terminus16"; | ||
| 32 | # keyMap = "us"; | ||
| 33 | # useXkbConfig = true; # use xkb.options in tty. | ||
| 34 | # }; | ||
| 35 | |||
| 36 | # Enable the X11 windowing system. | ||
| 37 | services.xserver.enable = true; | ||
| 38 | |||
| 39 | # Enable the GNOME Desktop Environment. | ||
| 40 | services.xserver.displayManager.gdm.enable = true; | ||
| 41 | services.xserver.desktopManager.gnome.enable = true; | ||
| 42 | |||
| 43 | |||
| 44 | # Configure keymap in X11 | ||
| 45 | # services.xserver.xkb.layout = "us"; | ||
| 46 | # services.xserver.xkb.options = "eurosign:e,caps:escape"; | ||
| 47 | |||
| 48 | # Enable CUPS to print documents. | ||
| 49 | # services.printing.enable = true; | ||
| 50 | |||
| 51 | # Enable sound. | ||
| 52 | # services.pulseaudio.enable = true; | ||
| 53 | # OR | ||
| 54 | # services.pipewire = { | ||
| 55 | # enable = true; | ||
| 56 | # pulse.enable = true; | ||
| 57 | # }; | ||
| 58 | |||
| 59 | # Enable touchpad support (enabled default in most desktopManager). | ||
| 60 | # services.libinput.enable = true; | ||
| 61 | |||
| 62 | # Define a user account. Don't forget to set a password with ‘passwd’. | ||
| 63 | users.users.fish = { | ||
| 64 | isNormalUser = true; | ||
| 65 | extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. | ||
| 66 | packages = with pkgs; [ | ||
| 67 | tree | ||
| 68 | git | ||
| 69 | nh | ||
| 70 | vim | ||
| 71 | fish | ||
| 72 | ]; | ||
| 73 | }; | ||
| 74 | |||
| 75 | programs.firefox.enable = true; | ||
| 76 | |||
| 77 | # List packages installed in system profile. | ||
| 78 | # You can use https://search.nixos.org/ to find more packages (and options). | ||
| 79 | environment.systemPackages = with pkgs; [ | ||
| 80 | vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. | ||
| 81 | wget | ||
| 82 | ]; | ||
| 83 | |||
| 84 | # Some programs need SUID wrappers, can be configured further or are | ||
| 85 | # started in user sessions. | ||
| 86 | programs.mtr.enable = true; | ||
| 87 | programs.gnupg.agent = { | ||
| 88 | enable = true; | ||
| 89 | enableSSHSupport = true; | ||
| 90 | }; | ||
| 91 | |||
| 92 | # List services that you want to enable: | ||
| 93 | |||
| 94 | # Enable the OpenSSH daemon. | ||
| 95 | # services.openssh.enable = true; | ||
| 96 | |||
| 97 | # Open ports in the firewall. | ||
| 98 | # networking.firewall.allowedTCPPorts = [ ... ]; | ||
| 99 | # networking.firewall.allowedUDPPorts = [ ... ]; | ||
| 100 | # Or disable the firewall altogether. | ||
| 101 | # networking.firewall.enable = false; | ||
| 102 | |||
| 103 | # Copy the NixOS configuration file and link it from the resulting system | ||
| 104 | # (/run/current-system/configuration.nix). This is useful in case you | ||
| 105 | # accidentally delete configuration.nix. | ||
| 106 | # system.copySystemConfiguration = true; | ||
| 107 | |||
| 108 | # This option defines the first version of NixOS you have installed on this particular machine, | ||
| 109 | # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. | ||
| 110 | # | ||
| 111 | # Most users should NEVER change this value after the initial install, for any reason, | ||
| 112 | # even if you've upgraded your system to a new NixOS release. | ||
| 113 | # | ||
| 114 | # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, | ||
| 115 | # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how | ||
| 116 | # to actually do that. | ||
| 117 | # | ||
| 118 | # This value being lower than the current NixOS release does NOT mean your system is | ||
| 119 | # out of date, out of support, or vulnerable. | ||
| 120 | # | ||
| 121 | # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, | ||
| 122 | # and migrated your data accordingly. | ||
| 123 | # | ||
| 124 | # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . | ||
| 125 | system.stateVersion = "25.05"; # Did you read the comment? | ||
| 126 | } | ||
| 127 | |||
users/julia/cattop/hardware-configuration.nix created+40| ... | @@ -0,0 +1,40 @@ | ||
| 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
| 2 | # and may be overwritten by future invocations. Please make changes | ||
| 3 | # to /etc/nixos/configuration.nix instead. | ||
| 4 | { config, lib, pkgs, modulesPath, ... }: | ||
| 5 | |||
| 6 | { | ||
| 7 | imports = | ||
| 8 | [ (modulesPath + "/installer/scan/not-detected.nix") | ||
| 9 | ]; | ||
| 10 | |||
| 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" ]; | ||
| 12 | boot.initrd.kernelModules = [ ]; | ||
| 13 | boot.kernelModules = [ "kvm-intel" ]; | ||
| 14 | boot.extraModulePackages = [ ]; | ||
| 15 | |||
| 16 | fileSystems."/" = | ||
| 17 | { device = "/dev/disk/by-uuid/8eb0d6a2-b8cf-4ef2-ba2a-e25a5555b0bc"; | ||
| 18 | fsType = "ext4"; | ||
| 19 | }; | ||
| 20 | |||
| 21 | fileSystems."/boot" = | ||
| 22 | { device = "/dev/disk/by-uuid/3B51-4A1C"; | ||
| 23 | fsType = "vfat"; | ||
| 24 | options = [ "fmask=0077" "dmask=0077" ]; | ||
| 25 | }; | ||
| 26 | |||
| 27 | swapDevices = | ||
| 28 | [ { device = "/dev/disk/by-uuid/58ee9d19-292f-49b5-9979-341b42e8e09d"; } | ||
| 29 | ]; | ||
| 30 | |||
| 31 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||
| 32 | # (the default) this is the recommended approach. When using systemd-networkd it's | ||
| 33 | # still possible to use this option, but it's recommended to use it in conjunction | ||
| 34 | # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||
| 35 | networking.useDHCP = lib.mkDefault true; | ||
| 36 | # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; | ||
| 37 | |||
| 38 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
| 39 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
| 40 | } | ||
users/julia/cattop/home.nix created+77| ... | @@ -0,0 +1,77 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | config, | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | userSettings, | ||
| 7 | systemSettings, | ||
| 8 | ... | ||
| 9 | }: | ||
| 10 | |||
| 11 | { | ||
| 12 | home = { | ||
| 13 | stateVersion = "23.05"; # Don't change this unless upgrading Home Manager versions | ||
| 14 | |||
| 15 | packages = with pkgs; [ | ||
| 16 | # General applications | ||
| 17 | ghostty | ||
| 18 | stremio | ||
| 19 | julia | ||
| 20 | qbittorrent | ||
| 21 | calibre | ||
| 22 | mpv | ||
| 23 | signal-desktop | ||
| 24 | python3 | ||
| 25 | gh | ||
| 26 | |||
| 27 | # Gaming | ||
| 28 | bottles | ||
| 29 | lutris | ||
| 30 | mangohud | ||
| 31 | dxvk_2 | ||
| 32 | steam-run | ||
| 33 | vulkan-tools | ||
| 34 | path-of-building | ||
| 35 | wineWowPackages.stable | ||
| 36 | winetricks | ||
| 37 | (prismlauncher.override { gamemodeSupport = true; }) | ||
| 38 | |||
| 39 | # System & desktop tools | ||
| 40 | wofi | ||
| 41 | xorg.xauth | ||
| 42 | kdePackages.dolphin | ||
| 43 | xdg-desktop-portal-gtk | ||
| 44 | xclip | ||
| 45 | pavucontrol | ||
| 46 | ethtool | ||
| 47 | grub2 | ||
| 48 | efibootmgr | ||
| 49 | distrobox | ||
| 50 | |||
| 51 | # Dev tools | ||
| 52 | legcord | ||
| 53 | hyfetch | ||
| 54 | arduino-cli | ||
| 55 | rust-bin.stable.latest.default | ||
| 56 | tytools | ||
| 57 | inputs.zls.packages.x86_64-linux.zls | ||
| 58 | platformio | ||
| 59 | usbutils | ||
| 60 | teensy-loader-cli | ||
| 61 | teensyduino | ||
| 62 | ]; | ||
| 63 | }; | ||
| 64 | |||
| 65 | programs = { | ||
| 66 | btop.enable = true; | ||
| 67 | hyfetch.enable = true; | ||
| 68 | |||
| 69 | gh = { | ||
| 70 | enable = true; | ||
| 71 | gitCredentialHelper.enable = true; | ||
| 72 | }; | ||
| 73 | |||
| 74 | # Uncomment if you want to use MangoHud system-wide | ||
| 75 | # mangohud.enable = true; | ||
| 76 | }; | ||
| 77 | } | ||
users/julia/cattop/home.nix.old created+72| ... | @@ -0,0 +1,72 @@ | ||
| 1 | { | ||
| 2 | inputs, | ||
| 3 | config, | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | userSettings, | ||
| 7 | systemSettings, | ||
| 8 | ... | ||
| 9 | }: | ||
| 10 | { | ||
| 11 | home = { | ||
| 12 | stateVersion = "23.05"; # Please read the comment before changing. | ||
| 13 | |||
| 14 | packages = with pkgs; [ | ||
| 15 | #building macos apps hard :( | ||
| 16 | ghostty | ||
| 17 | stremio | ||
| 18 | julia | ||
| 19 | qbittorrent | ||
| 20 | |||
| 21 | #gaming | ||
| 22 | bottles | ||
| 23 | lutris | ||
| 24 | mangohud | ||
| 25 | dxvk_2 | ||
| 26 | steam-run | ||
| 27 | vulkan-tools | ||
| 28 | path-of-building | ||
| 29 | wineWowPackages.stable | ||
| 30 | winetricks | ||
| 31 | (prismlauncher.override { gamemodeSupport = true; }) | ||
| 32 | |||
| 33 | #window manager stuff | ||
| 34 | wofi | ||
| 35 | xorg.xauth | ||
| 36 | #linux tools | ||
| 37 | legcord | ||
| 38 | pavucontrol | ||
| 39 | ethtool | ||
| 40 | grub2 | ||
| 41 | efibootmgr | ||
| 42 | distrobox | ||
| 43 | xdg-desktop-portal-gtk | ||
| 44 | xclip | ||
| 45 | kdePackages.dolphin | ||
| 46 | hyfetch | ||
| 47 | arduino-cli | ||
| 48 | python3 | ||
| 49 | gh | ||
| 50 | #broken on macos | ||
| 51 | calibre | ||
| 52 | mpv | ||
| 53 | wireguard-tools | ||
| 54 | signal-desktop | ||
| 55 | inputs.zls.packages.x86_64-linux.zls | ||
| 56 | rust-bin.stable.latest.default | ||
| 57 | ]; | ||
| 58 | |||
| 59 | # programs.mangohud.enable = true; | ||
| 60 | programs = { | ||
| 61 | btop.enable = true; | ||
| 62 | hyfetch.enable = true; | ||
| 63 | programs.gh = { | ||
| 64 | enable = true; | ||
| 65 | gitCredentialHelper = { | ||
| 66 | enable = true; | ||
| 67 | }; | ||
| 68 | }; | ||
| 69 | }; | ||
| 70 | |||
| 71 | }; | ||
| 72 | } | ||
users/julia/configuration.nix created+9| ... | @@ -0,0 +1,9 @@ | ||
| 1 | # Applied to all systems | ||
| 2 | { | ||
| 3 | inputs, | ||
| 4 | pkgs, | ||
| 5 | host, | ||
| 6 | ... | ||
| 7 | }: | ||
| 8 | { | ||
| 9 | } | ||
users/julia/user.nix created+13| ... | @@ -0,0 +1,13 @@ | ||
| 1 | rec { | ||
| 2 | username = "fish"; # username | ||
| 3 | name = "Julia"; # name/identifier | ||
| 4 | email = "fish@fishcat.fish"; # email (used for certain configurations) | ||
| 5 | dotfilesDir = "~/config"; # absolute path of the local repo | ||
| 6 | theme = "catppuccin-mocha"; # name of theme that stylix will use | ||
| 7 | browser = "firefox"; # Default browser; must select one from ./user/app/browser/ | ||
| 8 | term = "ghostty"; # Default terminal command; | ||
| 9 | font = "iosevka"; # Selected font | ||
| 10 | editor = "neovim"; # Default editor; | ||
| 11 | timeZone = "America/Los_Angeles"; | ||
| 12 | sexuality = "transgender"; | ||
| 13 | } | ||
users/julia/vim.nix created+21| ... | @@ -0,0 +1,21 @@ | ||
| 1 | { ... }: | ||
| 2 | { | ||
| 3 | vim.languages.astro.enable = true; | ||
| 4 | vim.theme.extraConfig = '' | ||
| 5 | if vim.g.neovide then | ||
| 6 | vim.g.neovide_cursor_trail_size = 0.3 | ||
| 7 | vim.g.neovide_scroll_animation_length = 0.1; | ||
| 8 | |||
| 9 | vim.keymap.set('n', '<D-s>', ':w<CR>') -- Save | ||
| 10 | vim.keymap.set('v', '<D-c>', '"+y') -- Copy | ||
| 11 | vim.keymap.set('n', '<D-v>', '"+P') -- Paste normal mode | ||
| 12 | vim.keymap.set('v', '<D-v>', '"+P') -- Paste visual mode | ||
| 13 | vim.keymap.set('c', '<D-v>', '<C-R>+') -- Paste command mode | ||
| 14 | vim.keymap.set('i', '<D-v>', '<ESC>l"+Pli') -- Paste insert mode | ||
| 15 | end | ||
| 16 | vim.api.nvim_set_keymap("", '<D-v>', '+p<CR>', { noremap = true, silent = true}) | ||
| 17 | vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true}) | ||
| 18 | vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true}) | ||
| 19 | vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { noremap = true, silent = true}) | ||
| 20 | ''; | ||
| 21 | } | ||