chore: init

This commit is contained in:
Nick 2025-10-01 19:51:55 -05:00
commit 1b2c1ea359
891 changed files with 37053 additions and 0 deletions

View file

@ -0,0 +1,11 @@
{
pkgs,
...
}:
{
home.packages = builtins.attrValues {
inherit (pkgs)
code-cursor
;
};
}

View file

@ -0,0 +1,11 @@
let
importList =
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
in
map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
with pkgs.vscode-extensions;
[
catppuccin.catppuccin-vsc
elmtooling.elm-ls-vscode
esbenp.prettier-vscode
haskell.haskell
justusadam.language-haskell
james-yu.latex-workshop
bbenoist.nix
mattn.lisp
mkhl.direnv
pkief.material-icon-theme
streetsidesoftware.code-spell-checker
tamasfe.even-better-toml
brettm12345.nixfmt-vscode
thenuprojectcontributors.vscode-nushell-lang
]

View file

@ -0,0 +1,27 @@
[
{
key = "ctrl+shift+s";
command = "editor.action.insertCursorAtEndOfEachLineSelected";
when = "textInputFocus";
}
{
key = "ctrl+shift+a";
command = "editor.action.quickFix";
when = "editorHasCodeActionsProvider && textInputFocus && !editorReadonly";
}
{
key = "ctrl+shift+f";
command = "editor.action.formatDocument";
when = "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor";
}
{
key = "ctrl+shift+tab";
command = "editor.action.indentationToSpaces";
when = "textInputFocus";
}
{
key = "ctrl+shift+d";
command = "editor.action.deleteLines";
when = "textInputFocus";
}
]

View file

@ -0,0 +1,72 @@
{
lib,
pkgs,
flake,
config,
...
}:
let
inherit (flake.config.aesthetics.themes)
currentTheme
palettes
fonts
;
inherit (flake.config.people) user0;
user = config.home.username;
themeLogic = if user == user0 then currentTheme else currentTheme;
el = palettes.${themeLogic}.colours;
in
{
"git.confirmSync" = false;
"editor.insertSpaces" = true;
"files.autoSave" = "afterDelay";
"git.enableSmartCommit" = true;
"nix.enableLanguageServer" = true;
"nix.serverPath" = lib.getExe pkgs.nil;
"nix.formatterPath" = lib.getExe pkgs.haskellPackages.nixfmt;
"explorer.compactFolders" = false;
"explorer.confirmDragAndDrop" = false;
"workbench.iconTheme" = "material-icon-theme";
"workbench.startupEditor" = "none";
"workbench.activityBar.location" = "bottom";
"workbench.tree.renderIndentGuides" = "always";
"workbench.colorTheme" = "Catppuccin Mocha";
"workbench.statusBar.visible" = false;
"editor.multiCursorLimit" = 700000;
"editor.wordWrap" = "on";
"editor.fontWeight" = "bold";
"editor.lineHeight" = 24;
"editor.fontSize" = fonts.sizes.applications;
"editor.fontFamily" = "'${fonts.name}', 'monospace', monospace";
"terminal.integrated.fontSize" = fonts.sizes.applications;
"terminal.integrated.fontFamily" = "'${fonts.name}', 'monospace', monospace";
"editor.fontLigatures" = true;
"editor.formatOnSave" = true;
"elmLS.disableElmLSDiagnostics" = true;
"elmLS.elmReviewDiagnostics" = "warning";
"elmLS.elmReviewPath" = "/etc/profiles/per-user/nick/bin/elm-review";
"[elm]" = {
"editor.defaultFormatter" = "elmTooling.elm-ls-vscode";
};
"material-icon-theme.folders.theme" = "classic";
"material-icon-theme.folders.color" = "#${el.base12}";
"material-icon-theme.files.color" = "#${el.base0E}";
"material-icon-theme.saturation" = 0;
"material-icon-theme.hidesExplorerArrows" = true;
"chat.commandCenter.enabled" = false;
"window.commandCenter" = false;
"workbench.navigationControl.enabled" = false;
"workbench.layoutControl.enabled" = true;
"window.customTitleBarVisibility" = "never";
"window.titleBarStyle" = "custom";
"window.menuBarVisibility" = "toggle";
"window.controlsLayout" = "hidden";
"workbench.tips.enabled" = false;
"workbench.welcomePage.walkthroughs.openOnInstall" = false;
"workbench.editor.empty.hint" = "hidden";
"haskell.formattingProvider" = "fourmolu";
}

View file

@ -0,0 +1,40 @@
{
pkgs,
lib,
flake,
config,
...
}:
{
programs = {
vscode =
let
configPath = ./config;
keybindingsPath = import (configPath + /keybindings.nix);
extensionsPath = import (configPath + /extensions.nix) {
inherit
pkgs
;
};
userSettingsPath = import (configPath + /userSettings.nix) {
inherit
pkgs
lib
flake
config
;
};
in
{
enable = true;
package = pkgs.vscode;
# haskell.enable = true;
# hie.enable = true;
profiles.default = {
keybindings = keybindingsPath;
extensions = extensionsPath;
userSettings = userSettingsPath;
};
};
};
}

View file

@ -0,0 +1,18 @@
[
"catppuccin"
"catppuccin-blur"
"cargo-appraiser"
"cargo-tom"
"markdown-oxide"
"material-dark"
"rose-pine-theme"
"material-theme"
"just"
"elm"
"haskell"
"nix"
"typst"
"nu"
"toml"
"xml"
]

View file

@ -0,0 +1,26 @@
{
pkgs,
flake,
...
}:
builtins.attrValues {
inherit (pkgs)
nil
nixfmt-rfc-style
nixd
wl-clipboard-rs
xsel
package-version-server
;
inherit (flake.inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.elmPackages)
elm-language-server
elm-review
elm-format
;
inherit (pkgs.haskellPackages)
cabal-fmt
hlint
haskell-language-server
ormolu
;
}

View file

@ -0,0 +1,25 @@
[
{
context = "Editor";
bindings = {
"ctrl-shift-d" = "editor::DeleteLine";
"ctrl-shift-f" = "editor::Format";
"ctrl-shift-c" = "editor::ToggleComments";
"ctrl-shift-w" = "editor::AddSelectionAbove";
"ctrl-shift-s" = "editor::AddSelectionBelow";
};
}
{
context = "Pane";
bindings = {
"alt-w" = "editor::MoveLineUp";
"alt-s" = "editor::MoveLineDown";
};
}
# {
# bindings = {
# context = "Workspace";
# "ctrl-s" = "workspace::SaveAll";
# };
# }
]

View file

@ -0,0 +1,35 @@
{
flake,
...
}:
let
inherit (flake.config.services.instances)
ollama
web
;
service = ollama;
localhost = web.localhost.address0;
in
{
agent = {
enabled = true;
default_model = {
provider = "zed.dev";
model = "claude-3-5-sonnet-latest";
};
version = "2";
};
assistant1 = {
enabled = true;
default_model = {
provider = "ollama";
model = "qwen2.5-coder:7b";
};
version = "2";
};
language_models = {
ollama = {
api_url = "http://${localhost}:${builtins.toString service.ports.port1}";
};
};
}

View file

@ -0,0 +1,7 @@
{
enabled = true;
autoFetch = true;
autoFetchInterval = 300;
git_status = true;
git_gutter = "tracked_files";
}

View file

@ -0,0 +1,41 @@
{ flake, ... }:
let
inherit (flake.config.aesthetics.themes)
fonts
;
in
{
ui_font_family = fonts.name;
buffer_font_family = fonts.name;
hour_format = "hour12";
vim_mode = false;
show_whitespaces = "none";
ui_font_size = fonts.sizes.applications;
buffer_font_size = fonts.sizes.applications;
tab_size = 2;
cursor_blink = true;
theme = "Catppuccin Macchiato";
show_copilot_suggestions = true;
bracket_pairing = "always";
relative_line_numbers = false;
tabs = {
file_icons = true;
git_status = true;
};
inlay_hints = {
enabled = true;
typeHints = true;
parameterHints = true;
chainingHints = true;
};
project_panel = {
file_icons = true;
folder_icons = true;
indent_size = 15;
auto_reveal_entries = false;
auto_fold_dirs = false;
};
indent_guides = {
enabled = true;
};
}

View file

@ -0,0 +1,59 @@
{
"Elixir" = {
language_servers = [
"!lexical"
"elixir-ls"
"!next-ls"
];
format_on_save = {
external = {
command = "mix";
arguments = [
"format"
"--stdin-filename"
"{buffer_path}"
"-"
];
};
};
};
"HEEX" = {
language_servers = [
"!lexical"
"elixir-ls"
"!next-ls"
];
format_on_save = {
external = {
command = "mix";
arguments = [
"format"
"--stdin-filename"
"{buffer_path}"
"-"
];
};
};
};
"Elm" = {
language_servers = [ "elm-language-server" ];
format_on_save = {
external = {
command = "elm-format";
arguments = [ "--stdin" ];
};
};
};
"Haskell" = {
language_servers = [ "haskell-language-server" ];
formatter = {
external = {
command = "ormolu";
arguments = [
"--stdin-input-file"
"placeholder"
];
};
};
};
}

View file

@ -0,0 +1,58 @@
{
rust-analyzer = {
binary = {
path_lookup = true;
};
};
elm-language-server = {
initialization_options = {
disableElmLSDiagnostics = true;
onlyUpdateDiagnosticsOnSave = false;
elmReviewDiagnostics = "warning";
};
};
cargotom = {
initialization_options = {
offline = false;
stable = false;
per_page_web = 50;
};
};
haskell = {
binary = {
path_lookup = true;
};
};
haskell-language-server = {
initialization_options = {
haskell = {
formattingProvider = "ormolu";
};
};
};
nix = {
binary = {
path_lookup = true;
};
};
typst = {
binary = {
path_lookup = true;
};
};
elixir-ls = {
binary = {
path_lookup = true;
};
settings = {
dialyzerEnabled = true;
};
};
}

View file

@ -0,0 +1,20 @@
{
lib,
pkgs,
...
}:
{
node = {
path = lib.getExe pkgs.nodejs;
npm_path = lib.getExe' pkgs.nodejs "npm";
};
soft_wrap = "editor_width";
auto_update = false;
autosave = "on_focus_change";
load_direnv = "shell_hook";
base_keymap = "VSCode";
restore_on_startup = "last_session";
show_wrap_guides = true;
}

View file

@ -0,0 +1,39 @@
{ flake, ... }:
let
inherit (flake.config.aesthetics.themes)
fonts
;
in
{
alternate_scroll = "off";
blinking = "off";
copy_on_select = true;
dock = "bottom";
detect_venv = {
on = {
directories = [
".env"
"env"
".venv"
"venv"
];
activate_script = "default";
};
};
env = {
TERM = "ghostty";
};
font_family = fonts.name;
font_features = null;
font_size = fonts.sizes.terminal;
line_height = "comfortable";
option_as_meta = false;
button = false;
shell = "system";
toolbar = {
title = false;
};
working_directory = "current_project_directory";
}

View file

@ -0,0 +1,26 @@
{
flake,
lib,
pkgs,
...
}:
let
configPath = ./config;
assistantPath = import (configPath + /assistant) { inherit flake; };
interfacePath = import (configPath + /interface) { inherit flake; };
languagesPath = import (configPath + /languages);
lspPath = import (configPath + /lsp);
terminalPath = import (configPath + /terminal) { inherit flake; };
gitPath = import (configPath + /git);
miscPath = import (configPath + /misc) { inherit lib pkgs; };
in
{
git = gitPath;
languages = languagesPath;
lsp = lspPath;
terminal = terminalPath;
}
// assistantPath
// interfacePath
// miscPath

View file

@ -0,0 +1,32 @@
{
config,
flake,
lib,
pkgs,
...
}:
let
configPath = ./config;
extensionsPath = import (configPath + /extensions);
userKeymapsPath = import (configPath + /userKeymaps);
userSettingsPath = import (configPath + /userSettings) {
inherit
config
flake
lib
pkgs
;
};
extraPackagesPath = import (configPath + /extraPackages) { inherit pkgs flake; };
packagePath = flake.inputs.zed-editor.packages.${pkgs.system}.default;
in
{
programs.zed-editor = {
enable = true;
# package = packagePath;
extraPackages = extraPackagesPath;
extensions = extensionsPath;
userKeymaps = userKeymapsPath;
userSettings = userSettingsPath;
};
}