From 24a8ccfc8fedda4e28722edd3236dbd4a0181122 Mon Sep 17 00:00:00 2001 From: Javier Feliz Date: Wed, 27 Aug 2025 14:35:49 -0400 Subject: [PATCH] Changes --- flake.lock | 88 +++++++++++++++++++++- flake.nix | 3 + hosts/common-config.nix | 2 + hosts/desktop/default.nix | 1 + modules/home/common/shell.nix | 4 + modules/home/common/vscode.nix | 129 +++++++++++++++++++++++---------- modules/home/home.nix | 11 ++- modules/system/nfs.nix | 8 +- 8 files changed, 200 insertions(+), 46 deletions(-) diff --git a/flake.lock b/flake.lock index 62eb249..b30bbe6 100755 --- a/flake.lock +++ b/flake.lock @@ -115,6 +115,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -178,6 +194,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -416,6 +450,22 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1708161998, + "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "84d981bae8b5e783b3b548de505b22880559515f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -448,7 +498,8 @@ "my-assets": "my-assets", "neovim-nightly-overlay": "neovim-nightly-overlay", "nixpkgs": "nixpkgs_3", - "stylix": "stylix" + "stylix": "stylix", + "zig": "zig" } }, "stylix": { @@ -500,6 +551,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -601,6 +667,26 @@ "repo": "treefmt-nix", "type": "github" } + }, + "zig": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1755864794, + "narHash": "sha256-hgnov6RLA+DD4Uocs/vCbiH3/3sKvqiJOKHpdhGyVAI=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "5cd601f8760d2383210b7b8c8a45fc79388f3ddf", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 50b4d66..c16f8da 100755 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + zig.url = "github:mitchellh/zig-overlay"; my-assets = { url = "path:./assets"; @@ -24,6 +25,7 @@ self, nixpkgs, my-assets, + zig, ... }@inputs: let @@ -32,6 +34,7 @@ # Common overlays for all hosts overlays = [ inputs.neovim-nightly-overlay.overlays.default + inputs.zig.overlays.default ]; # Helper function to create a host configuration diff --git a/hosts/common-config.nix b/hosts/common-config.nix index 6f83edf..104efc5 100644 --- a/hosts/common-config.nix +++ b/hosts/common-config.nix @@ -175,8 +175,10 @@ # Enable home manager home-manager = { + useGlobalPkgs = true; extraSpecialArgs = { inherit inputs; + zigpkg = pkgs.zigpkgs.master; assets = assets; }; users = { diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index bca8aae..da9fe5f 100755 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -41,6 +41,7 @@ environment = { systemPackages = with pkgs; [ pkgs.ntfs3g + zigpkgs.master ]; }; } diff --git a/modules/home/common/shell.nix b/modules/home/common/shell.nix index 5769a0d..c36540f 100755 --- a/modules/home/common/shell.nix +++ b/modules/home/common/shell.nix @@ -60,6 +60,10 @@ # Golang gr = "go run ."; gmt = "go mod tidy"; + + # Zig + zb = "zig build"; + zbr = "zig build run"; }; # Additional bash configuration diff --git a/modules/home/common/vscode.nix b/modules/home/common/vscode.nix index 881526f..3434eaa 100644 --- a/modules/home/common/vscode.nix +++ b/modules/home/common/vscode.nix @@ -2,6 +2,8 @@ config, pkgs, lib, + inputs, + zigpkg, ... }: @@ -14,55 +16,96 @@ extensions = with pkgs.vscode-extensions; [ - # adpyke.vscode-sql-formatter - # adrianwilczynski.alpine-js-intellisense - # anthropic.claude-code - bmewburn.vscode-intelephense-client - bradlc.vscode-tailwindcss - catppuccin.catppuccin-vsc-icons - christian-kohler.path-intellisense - # cierra.livewire-vscode - # delgan.qml-format + # Misc + vscodevim.vim eamodio.gitlens - formulahendry.auto-close-tag - formulahendry.auto-rename-tag + christian-kohler.path-intellisense + catppuccin.catppuccin-vsc-icons foxundermoon.shell-format - golang.go gruntfuggly.todo-tree - # isudox.vscode-jetbrains-keybindings jdinhlife.gruvbox - jnoortheen.nix-ide - # kennylong.kubernetes-yaml-formatter - mikestead.dotenv - ms-python.debugpy - ms-python.python - ms-python.vscode-pylance - # ms-python.vscode-python-envs - # ms-vsliveshare.vsliveshare - # neilbrayfield.php-docblocker - # onecentlin.laravel-blade - # phiter.phpstorm-snippets - pkief.material-icon-theme redhat.ansible redhat.vscode-yaml shd101wyy.markdown-preview-enhanced - svelte.svelte-vscode + ms-vsliveshare.vsliveshare + pkief.material-icon-theme tamasfe.even-better-toml - # theqtcompany.qt-core - # theqtcompany.qt-qml - vscodevim.vim + # PHP + bmewburn.vscode-intelephense-client + # Html/Front End Support + bradlc.vscode-tailwindcss + formulahendry.auto-close-tag + formulahendry.auto-rename-tag + svelte.svelte-vscode vue.volar + # Go + golang.go + mikestead.dotenv + # Python + ms-python.debugpy + ms-python.python + ms-python.vscode-pylance + # Zig + ziglang.vscode-zig + # C++ + ms-vscode.cpptools + ms-vscode.cmake-tools + # delgan.qml-format + # Nix + mkhl.direnv + jnoortheen.nix-ide + # adpyke.vscode-sql-formatter + # adrianwilczynski.alpine-js-intellisense + # anthropic.claude-code + # cierra.livewire-vscode + # neilbrayfield.php-docblocker # zignd.html-css-class-completion - ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - # # Extensions not in nixpkgs - # { - # name = "copilot"; - # publisher = "github"; - # version = "1.86.82"; - # sha256 = "sha256-example-hash-here"; - # } + # Extensions not in nixpkgs + { + name = "base16-tinted-themes"; + publisher = "TintedTheming"; + version = "0.27.0"; + sha256 = "7wLBwfaXEoumAfp9kK5Mv1VaGffuGdoYMGZ+ZjN9G8Q="; + } + { + name = "vscode-laravel"; + publisher = "laravel"; + version = "1.0.14"; + sha256 = "DEHr8kAGm6ShdQCThh7MUhv24Ghwg10mGDhZgUIojrY="; + } + { + name = "phpstorm-snippets"; + publisher = "phiter"; + version = "1.1.2"; + sha256 = "EHEzM4YKYR+2r6RVun8tSjGYDsbriBPATNwxczEuqjQ="; + } + { + name = "laravel-blade"; + publisher = "onecentlin"; + version = "1.37.0"; + sha256 = "q5CTRj746404yM9mhOWYAGTzt/8CJ7Fx4QUQSJ+LdLs="; + } + # Qt Extension Pack + { + name = "qt-qml"; + publisher = "TheQtCompany"; + version = "1.7.0"; + sha256 = "QjfvZIcE4LcJU93YiYN/zykEluHtR7zVOwYiPL0k+cQ="; + } + { + name = "qt-ui"; + publisher = "TheQtCompany"; + version = "1.7.0"; + sha256 = "XDOIyCZIUYPGfcszZMUkR9MHH+zrXZgympKNhcQwITY="; + } + { + name = "qt-core"; + publisher = "TheQtCompany"; + version = "1.7.0"; + sha256 = "2413vMpvxSYBKpaD14sMgI92W8NtCYa/sJ7PZO62WfY="; + } ]; # User settings @@ -172,8 +215,10 @@ "workbench.editor.enablePreviewFromQuickOpen" = false; "editor.gotoLocation.multipleImplementations" = "goto"; "editor.gotoLocation.multipleTypeDefinitions" = "goto"; - "editor.cursorSurroundingLines" = 16; + "editor.cursorSurroundingLines" = 200; "workbench.editor.pinnedTabsOnSeparateRow" = true; + "C_Cpp.default.compileCommands" = "\${workspaceFolder}/build/compile_commands.json"; + "C_Cpp.default.configurationProvider" = "ms-vscode.cmake-tools"; "window.menuBarVisibility" = "compact"; "vim.leader" = ""; "vim.normalModeKeyBindings" = [ @@ -237,6 +282,14 @@ "svelte.enable-ts-plugin" = true; "workbench.sideBar.location" = "right"; "workbench.panel.defaultLocation" = "right"; + "zig.zls.enabled" = "on"; + "zig.path" = "${zigpkg}/bin/zig"; + "zig.zls.path" = "${pkgs.zls}/bin/zls"; + "zig.zls.zigLibPath" = "${zigpkg}/lib"; + "zig.zls.completionLabelDetails" = false; + "zig.zls.enableArgumentPlaceholders" = false; + "zig.zls.inlayHintsShowParameterName" = false; + "zig.zls.inlayHintsShowVariableTypeHints" = false; }; # Keybindings diff --git a/modules/home/home.nix b/modules/home/home.nix index a656a88..34a8e97 100755 --- a/modules/home/home.nix +++ b/modules/home/home.nix @@ -27,7 +27,6 @@ # package = pkgs.papirus-icon-theme; # }; # }; - home = { username = "javi"; homeDirectory = "/home/javi"; @@ -35,6 +34,10 @@ packages = with pkgs; [ # Basics quickshell + zoom-us + obsidian + kdePackages.kdenlive + ffmpeg # Terminal tools ripgrep @@ -66,6 +69,7 @@ go nodejs_22 bun + zls # Zig language server ]; sessionVariables = { @@ -88,6 +92,11 @@ btop = { enable = true; }; + + direnv = { + enable = true; + enableZshIntegration = true; + }; }; stylix = { diff --git a/modules/system/nfs.nix b/modules/system/nfs.nix index 55e43e8..7663389 100644 --- a/modules/system/nfs.nix +++ b/modules/system/nfs.nix @@ -7,10 +7,11 @@ let "backups" "container-data" "javi" + "xrandr" ]; configureShare = share: { - name = "/mnt/${share}"; + name = "/home/javi/network-shares/${share}"; value = { device = "${nasIp}:${baseMnt}/${share}"; fsType = "nfs"; @@ -19,11 +20,6 @@ let "noauto" "rw" "vers=4" - - # make Nautilus/Dolphin/Any File Manager show it with a friendly name/icon - "x-gvfs-show" - "x-gvfs-name=NAS — ${share}" - "x-gvfs-icon=network-server" ]; }; };