Personal Nix setup
0
fork

Configure Feed

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

Add zed-editor basic setup

+346 -21
+21 -21
flake.lock
··· 60 60 ] 61 61 }, 62 62 "locked": { 63 - "lastModified": 1750191719, 64 - "narHash": "sha256-FEoD84p5JXbofEH8uSGhMSgvA5lWBOFnFb2fwLP45JU=", 63 + "lastModified": 1750623672, 64 + "narHash": "sha256-47ubcTe92Ep+iP+b6ZRJ4TfjC8AHm7iuz56j/N8+O70=", 65 65 "owner": "tadfisher", 66 66 "repo": "android-nixpkgs", 67 - "rev": "e507e23b720d39c70a0f942a310eb4273c8d2806", 67 + "rev": "5678783829d2d7d34e3502c2b698cee6c2979cfa", 68 68 "type": "github" 69 69 }, 70 70 "original": { ··· 156 156 ] 157 157 }, 158 158 "locked": { 159 - "lastModified": 1749873626, 160 - "narHash": "sha256-1Mc/D/1RwwmDKY59f4IpDBgcQttxffm+4o0m67lQ8hc=", 159 + "lastModified": 1750618568, 160 + "narHash": "sha256-w9EG5FOXrjXGfbqCcQg9x1lMnTwzNDW5BMXp8ddy15E=", 161 161 "owner": "lnl7", 162 162 "repo": "nix-darwin", 163 - "rev": "2f140d6ac8840c6089163fb43ba95220c230f22b", 163 + "rev": "1dd19f19e4b53a1fd2e8e738a08dd5fe635ec7e5", 164 164 "type": "github" 165 165 }, 166 166 "original": { ··· 339 339 ] 340 340 }, 341 341 "locked": { 342 - "lastModified": 1750256996, 343 - "narHash": "sha256-xPH4tgE7yIeBtOn54B6iDzMGXrf7mWvODML+DCN+H8I=", 342 + "lastModified": 1750690749, 343 + "narHash": "sha256-x6fRPeqdgDKVTCyvbp4J8Q5UQ3DV3oWYSoyM444N8cY=", 344 344 "owner": "nix-community", 345 345 "repo": "home-manager", 346 - "rev": "f754e377dc2da5d34dfea6a5215c21741eaf8930", 346 + "rev": "05b8c9506452349d8be854ac46e5a7630fa7917d", 347 347 "type": "github" 348 348 }, 349 349 "original": { ··· 451 451 }, 452 452 "nixos-hardware": { 453 453 "locked": { 454 - "lastModified": 1750083401, 455 - "narHash": "sha256-ynqbgIYrg7P1fAKYqe8I/PMiLABBcNDYG9YaAP/d/C4=", 454 + "lastModified": 1750431636, 455 + "narHash": "sha256-vnzzBDbCGvInmfn2ijC4HsIY/3W1CWbwS/YQoFgdgPg=", 456 456 "owner": "NixOS", 457 457 "repo": "nixos-hardware", 458 - "rev": "61837d2a33ccc1582c5fabb7bf9130d39fee59ad", 458 + "rev": "1552a9f4513f3f0ceedcf90320e48d3d47165712", 459 459 "type": "github" 460 460 }, 461 461 "original": { ··· 467 467 }, 468 468 "nixpkgs": { 469 469 "locked": { 470 - "lastModified": 1750183894, 471 - "narHash": "sha256-ZtOgEt70keBVB4YJc+z7m0h7J1BOlv/GjHE1YC6KxeA=", 470 + "lastModified": 1750605355, 471 + "narHash": "sha256-xT8cPLTxlktxI9vSdoBlAVK7dXgd8IK59j7ZwzkkhnI=", 472 472 "owner": "nixos", 473 473 "repo": "nixpkgs", 474 - "rev": "f45e75fc63fc8a7ffc3da382b2f6b681c5b71875", 474 + "rev": "3078b9a9e75f1790e6d6ef9955fdc6a2d1740cc6", 475 475 "type": "github" 476 476 }, 477 477 "original": { ··· 998 998 }, 999 999 "locked": { 1000 1000 "dir": "nix", 1001 - "lastModified": 1748334374, 1002 - "narHash": "sha256-StsLdBT/+7GKlA4bdWUrFdsbPbI++0rb+2Jk/THzPx4=", 1001 + "lastModified": 1750358918, 1002 + "narHash": "sha256-IeHpcIzhdtx4W/kIwINcexY37I65n6tDVW3E2h9VElg=", 1003 1003 "owner": "AndyFilter", 1004 1004 "repo": "yeetmouse", 1005 - "rev": "135c452bd2db0022f6f3845bb2c71bf51ddf2e37", 1005 + "rev": "27b9bc538131b558bbffe8d88f216ba7e3b36de4", 1006 1006 "type": "github" 1007 1007 }, 1008 1008 "original": { ··· 1022 1022 ] 1023 1023 }, 1024 1024 "locked": { 1025 - "lastModified": 1750152169, 1026 - "narHash": "sha256-XN5OBCCXKmPBL+UXyyScI5HGgs4U8OFGQTnKuxurBFI=", 1025 + "lastModified": 1750649182, 1026 + "narHash": "sha256-beNAQ63SY8HxBsFdMGv/fdLzjQMYgifMh1DcmaIzMjo=", 1027 1027 "owner": "0xc000022070", 1028 1028 "repo": "zen-browser-flake", 1029 - "rev": "ed811ab0d0b407b59cda1023820e9986fd28c8c3", 1029 + "rev": "c0785a69fe3988b4ef44c74575f4a2f698f91f32", 1030 1030 "type": "github" 1031 1031 }, 1032 1032 "original": {
+1
home/apps/default.nix
··· 20 20 ./minecraft.nix 21 21 ./ghostty.nix 22 22 ./wezterm 23 + ./zed-editor 23 24 ]; 24 25 }
+72
home/apps/zed-editor/default.nix
··· 1 + { lib, config, pkgs, helpers, ... } @ inputs: 2 + 3 + with lib; 4 + let 5 + themes = (import ./theme.nix inputs); 6 + cfg = config.modules.apps; 7 + 8 + userSettings = { 9 + ui_font_family = "SF Pro Text"; 10 + ui_font_fallbacks = [ "codicon" ]; 11 + ui_font_size = 14; 12 + buffer_font_family = "Dank Mono"; 13 + buffer_font_size = 14; 14 + buffer_line_height.custom = 1.2; 15 + tab_size = 2; 16 + 17 + load_direnv = "shell_hook"; 18 + 19 + theme = "System Dark"; 20 + 21 + scrollbar.show = "never"; 22 + tab_bar.show = false; 23 + git.inline_blame.enabled = false; 24 + indent_guides.enabled = false; 25 + seed_search_query_from_cursor = "selection"; 26 + use_smartcase_search = true; 27 + use_autoclose = false; 28 + inline_code_actions = false; 29 + cursor_blink = false; 30 + 31 + vim_mode = true; 32 + 33 + calls = { 34 + mute_on_join = true; 35 + share_on_join = false; 36 + }; 37 + 38 + toolbar = { 39 + breadcrumbs = false; 40 + quick_actions = false; 41 + selections_menu = false; 42 + agent_review = false; 43 + code_actions = false; 44 + }; 45 + 46 + telemetry = { 47 + diagnostics = false; 48 + metrics = false; 49 + }; 50 + 51 + language_models = { 52 + ollama.api_url = "http://irnbru.fable-pancake.ts.net:11434"; 53 + lmstudio.api_url = "http://irnbru.fable-pancake.ts.net:1234/api/v0"; 54 + }; 55 + }; 56 + in { 57 + options.modules.apps.zed-editor = { 58 + enable = mkOption { 59 + default = false; 60 + description = "Whether to enable Zed Editor."; 61 + type = types.bool; 62 + }; 63 + }; 64 + 65 + config = mkIf (cfg.enable && cfg.zed-editor.enable) { 66 + programs.zed-editor = { 67 + enable = true; 68 + installRemoteServer = true; 69 + inherit themes userSettings; 70 + }; 71 + }; 72 + }
+237
home/apps/zed-editor/theme.nix
··· 1 + { pkgs, ... } @ inputs: 2 + 3 + let 4 + inherit (import ../../../lib/colors.nix inputs) colors mkZedStyles; 5 + 6 + raw = let 7 + element = colors.element.gui; 8 + cursor = colors.cursor.gui; 9 + gutter = colors.gutter.gui; 10 + split = colors.split.gui; 11 + 12 + black = colors.black.gui; 13 + grey = colors.grey.gui; 14 + red = colors.red.gui; 15 + brightRed = colors.brightRed.gui; 16 + green = colors.green.gui; 17 + brightGreen = colors.brightGreen.gui; 18 + yellow = colors.yellow.gui; 19 + orange = colors.orange.gui; 20 + blue = colors.blue.gui; 21 + brightBlue = colors.brightBlue.gui; 22 + pink = colors.pink.gui; 23 + magenta = colors.magenta.gui; 24 + aqua = colors.aqua.gui; 25 + cyan = colors.cyan.gui; 26 + white = colors.white.gui; 27 + muted = colors.muted.gui; 28 + 29 + attribute = magenta; 30 + keyword = magenta; 31 + define = magenta; 32 + macro = magenta; 33 + label = magenta; 34 + 35 + property = pink; 36 + constant = pink; 37 + operator = pink; 38 + tag = pink; 39 + 40 + url = brightBlue; 41 + include = brightBlue; 42 + 43 + delimiter = cyan; 44 + typedef = yellow; 45 + type = aqua; 46 + conditional = red; 47 + special = orange; 48 + string = green; 49 + specialChar = brightGreen; 50 + number = orange; 51 + function = blue; 52 + identifier = white; 53 + structure = yellow; 54 + in { 55 + players = [ 56 + { 57 + cursor = white; 58 + selection = cursor; 59 + } 60 + ]; 61 + 62 + syntax = { 63 + attribute.color = attribute; 64 + constant.color = constant; 65 + keyword.color = keyword; 66 + "keyword.type".color = structure; 67 + "constant.builtin".color = special; 68 + "constant.macro".color = define; 69 + string.color = green; 70 + "string.escape".color = specialChar; 71 + "string.special".color = specialChar; 72 + number.color = number; 73 + "number.float".color = number; 74 + function.color = function; 75 + "function.builtin".color = special; 76 + "function.macro".color = macro; 77 + "function.method".color = function; 78 + "function.parameter".color = function; 79 + variable.color = identifier; 80 + "variable.parameter".color = identifier; 81 + "variable.parameter.builtin".color = special; 82 + "variable.member".color = property; 83 + "variable.builtin".color = special; 84 + "attribute.builtin".color = special; 85 + label.color = label; 86 + operator.color = operator; 87 + conditional.color = conditional; 88 + include.color = include; 89 + boolean.color = conditional; 90 + type.color = type; 91 + "type.definition".color = typedef; 92 + "type.builtin".color = special; 93 + module.color = identifier; 94 + tag.color = tag; 95 + "tag.builtin".color = special; 96 + constructor.color = structure; 97 + "markup.raw".color = string; 98 + "markup.list".color = operator; 99 + "markup.link.label".color = delimiter; 100 + "string.special.url".color = url; 101 + "punctuation.bracket".color = operator; 102 + "punctuation.delimiter".color = delimiter; 103 + "punctuation.special".color = specialChar; 104 + "keyword.exception".color = conditional; 105 + "keyword.return".color = conditional; 106 + "keyword.conditional".color = conditional; 107 + "keyword.repeat".color = conditional; 108 + "keyword.operator".color = operator; 109 + "keyword.import".color = include; 110 + "property".color = property; 111 + 112 + comment = { 113 + color = muted; 114 + font_style = "italic"; 115 + }; 116 + 117 + "comment.todo".color = brightBlue; 118 + "comment.error".color = brightRed; 119 + "comment.note".color = magenta; 120 + }; 121 + }; 122 + 123 + style = with colors; mkZedStyles { 124 + background = black; 125 + drop_target.background = element; 126 + 127 + editor = { 128 + background = black; 129 + foreground = white; 130 + invisible = grey; 131 + gutter.background = black; 132 + active_line.background = gutter; 133 + active_line_number = muted; 134 + line_number = grey; 135 + document_highlight = { 136 + read_background = element; 137 + write_background = element; 138 + }; 139 + }; 140 + 141 + subheader.background = black; 142 + status_bar.background = black; 143 + panel.background = black; 144 + elevated_surface.background = element; 145 + tab_bar.background = black; 146 + title_bar.background = black; 147 + 148 + toolbar = { 149 + background = black; 150 + }; 151 + 152 + tab = { 153 + active_background = black; 154 + inactive_background = gutter; 155 + }; 156 + 157 + search.match_background = blue; 158 + 159 + text = { 160 + base = white; 161 + muted = muted; 162 + accent = blue; 163 + disabled = grey; 164 + placeholder = cursor; 165 + }; 166 + 167 + border = { 168 + base = split; 169 + variant = gutter; 170 + }; 171 + 172 + scrollbar = { 173 + track.background = black; 174 + thumb.background = muted; 175 + }; 176 + 177 + error = red; 178 + hint = brightBlue; 179 + info = blue; 180 + predictive = grey; 181 + renamed = yellow; 182 + success = green; 183 + unreachable = brightRed; 184 + warning = orange; 185 + 186 + conflict = red; 187 + created = green; 188 + deleted = brightRed; 189 + hidden = muted; 190 + ignored = grey; 191 + modified = blue; 192 + 193 + element = { 194 + background = element; 195 + hover = cursor; 196 + selected = cursor; 197 + }; 198 + 199 + terminal = { 200 + background = black; 201 + bright_foreground = grey; 202 + dim_foreground = gutter; 203 + ansi = { 204 + black = black; 205 + bright_black = grey; 206 + red = red; 207 + bright_red = brightRed; 208 + green = green; 209 + bright_green = brightGreen; 210 + yellow = yellow; 211 + bright_yellow = orange; 212 + blue = blue; 213 + bright_blue = brightBlue; 214 + magenta = pink; 215 + bright_magenta = magenta; 216 + cyan = aqua; 217 + bright_cyan = cyan; 218 + white = white; 219 + bright_white = muted; 220 + }; 221 + }; 222 + }; 223 + in { 224 + system-theme = { 225 + "$schema" = "https://zed.dev/schema/themes/v0.2.0.json"; 226 + name = "System"; 227 + author = "@kitten"; 228 + themes = let 229 + theme = { 230 + name = "System Dark"; 231 + appearance = "dark"; 232 + style = style // raw; 233 + }; 234 + in [ theme ]; 235 + }; 236 + } 237 +
+14
lib/colors.nix
··· 147 147 in 148 148 colors: (concatStringsSep "\n" (mapAttrsToList toValue (toFlatAttrs colors))); 149 149 150 + mkZedStyles = let 151 + valueToString = value: "${value.gui}"; 152 + isValue = value: isAttrs value && hasAttr "gui" value; 153 + recurse = path: value: 154 + if isAttrs value && !(isValue value) then 155 + mapAttrsToList 156 + (name: value: recurse (path ++ (if name != "base" then [name] else [])) value) 157 + value 158 + else { 159 + ${concatStringsSep "." path} = valueToString value; 160 + }; 161 + in 162 + styles: lib.foldl lib.recursiveUpdate {} (lib.flatten (recurse [] styles)); 163 + 150 164 mkVimHardlineColors = colors: 151 165 with colors; '' 152 166 {
+1
machines/sodacream/home.nix
··· 15 15 zen-browser.enable = true; 16 16 discord.enable = true; 17 17 chromium.enable = true; 18 + zed-editor.enable = true; 18 19 }; 19 20 }; 20 21 }