From 7a7e3d56b2f1642454f31ab5762b4bd112da656d Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Wed, 30 Apr 2025 14:01:00 -0700 Subject: [PATCH 1/4] Updating nix channels, requires responding to deprecations --- nix/home/programs/nvim/default.nix | 5 +++-- nix/home/programs/nvim/nvim-lspconfig.lua | 2 ++ nix/system/worktop/darwin-configuration.nix | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nix/home/programs/nvim/default.nix b/nix/home/programs/nvim/default.nix index ef7cd36..d8bafd0 100644 --- a/nix/home/programs/nvim/default.nix +++ b/nix/home/programs/nvim/default.nix @@ -124,12 +124,13 @@ with builtins; config = '' lua << EOF ${readFile ( - pkgs.substituteAll { - src = ./nvim-lspconfig.lua; + pkgs.replaceVars ./nvim-lspconfig.lua { # since both of these are used for actually configuring the system, # we'll probably always want them around. lua_ls = pkgs.sumneko-lua-language-server; nixd = pkgs.nixd; + ts_server = pkgs.nodePackages.typescript-language-server; + diagnostic_server = pkgs.nodePackages.diagnostic-languageserver; } ) } EOF diff --git a/nix/home/programs/nvim/nvim-lspconfig.lua b/nix/home/programs/nvim/nvim-lspconfig.lua index 337bac1..9862892 100644 --- a/nix/home/programs/nvim/nvim-lspconfig.lua +++ b/nix/home/programs/nvim/nvim-lspconfig.lua @@ -62,6 +62,7 @@ vim.api.nvim_create_autocmd("BufWritePre", { }) nvim_lsp.diagnosticls.setup { + cmd = { "@diagnostic_server@/bin/diagnostic-languageserver", '--stdio' }, filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'markdown', 'pandoc', 'prisma' }, init_options = { @@ -150,6 +151,7 @@ capabilitiesWithoutFomatting.textDocument.rangeFormatting = false capabilitiesWithoutFomatting.textDocument.range_formatting = false nvim_lsp.ts_ls.setup { + cmd = { "@ts_server@/bin/typescript-language-server", '--stdio' }, init_options = { hostInfo = "neovim", maxTsServerMemory = "8192", diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index 4de61c8..b964df5 100644 --- a/nix/system/worktop/darwin-configuration.nix +++ b/nix/system/worktop/darwin-configuration.nix @@ -104,14 +104,14 @@ in ../../home/programs/alacritty ]; - # Auto upgrade nix package and the daemon service. - services.nix-daemon.enable = true; # nix.package = pkgs.nix; # Create /etc/bashrc that loads the nix-darwin environment. programs.zsh.enable = true; # default shell on catalina # programs.fish.enable = true; + system.primaryUser = "haak"; + # We need this snippet to allow spotlight to find the applications installed # by nix-darwin system.activationScripts.applications.text = pkgs.lib.mkForce ( From fc1075fc52cec668d84180fc60af8e3d1c4b6a24 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Thu, 25 Sep 2025 00:28:07 -0700 Subject: [PATCH 2/4] Setting up helix LSPs more reproducibly --- nix/home/programs/helix/default.nix | 33 +++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/nix/home/programs/helix/default.nix b/nix/home/programs/helix/default.nix index f5e34bd..e3c016b 100644 --- a/nix/home/programs/helix/default.nix +++ b/nix/home/programs/helix/default.nix @@ -1,4 +1,8 @@ -{ pkgs, ... }: +{ pkgs, ...}: +let + # We need a version of vscode-language-servers that's less than 4.10 + oldNixpkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/f68797befe20fc56153363e71ea0f0b74542db4b.tar.gz") {}; +in { programs.helix = { enable = true; @@ -9,10 +13,29 @@ }; typescript-language-server = { - command = "typescript-language-server"; + command = "${pkgs.typescript-language-server}/bin/typescript-language-server"; args = [ "--stdio" ]; config.hostInfo = "helix"; }; + + eslint = { + command = "${oldNixpkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-eslint-language-server"; + args = ["--stdio"]; + config = { + run = "onType"; + validate = "on"; + nodePath = ""; + rulesCustomizations = []; + workingDirectory.mode = "location"; + showDocumentation.enable = true; + experimental = { useFlatConfig = false; }; + problems = { shortenToSingleLine = false; }; + codeAction = { + enable = true; + location = "separateLine"; + }; + }; + }; }; language = [ @@ -25,11 +48,13 @@ } { name = "typescript"; + file-types = [ "tsx" "ts" ]; auto-format = true; + formatter = { command = "prettier"; args = ["--parser=typescript"]; }; language-servers = [ + { name = "eslint"; } { name = "typescript-language-server"; - except-features = [ "format" "diagnostics" ]; } ]; } @@ -45,6 +70,7 @@ normal = "block"; select = "block"; }; + bufferline = "multiple"; }; keys = { normal = { @@ -52,7 +78,6 @@ "ret" = [ "move_line_down" "goto_first_nonwhitespace" ]; # Maps the enter key to move to start of next line X = "extend_line_above"; D = "delete_char_backward"; - ";" = "command_mode"; # Note: this shadows the normal use of ";", which is to reset the selection to the cursor. "S-ret" = [ "move_line_up" "goto_first_nonwhitespace" ]; }; insert = { From a66ba69b6180b075b080613f06eb4b7114e2a213 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Fri, 14 Mar 2025 22:00:18 -0700 Subject: [PATCH 3/4] actually set up paperwm on the framework --- nix/home/desktop.nix | 5 +---- nix/overlays/paperwm.nix | 12 ------------ nix/system/framework/configuration.nix | 13 +++++++++++++ 3 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 nix/overlays/paperwm.nix diff --git a/nix/home/desktop.nix b/nix/home/desktop.nix index 8d689bc..bb38238 100644 --- a/nix/home/desktop.nix +++ b/nix/home/desktop.nix @@ -14,7 +14,6 @@ let ]; gnomePkgs = with pkgs; [ - gnomecast gnome-tweaks gnomeExtensions.worksets ]; @@ -23,11 +22,9 @@ in imports = [ (import ./commandline.nix) (import ./programs/alacritty) - # (import ./programs/kitty) - # (import ./programs/wezterm) ]; - nixpkgs.overlays = [ (import ../overlays/paperwm.nix) ]; + nixpkgs.overlays = []; home = { packages = defaultPkgs ++ gnomePkgs; diff --git a/nix/overlays/paperwm.nix b/nix/overlays/paperwm.nix deleted file mode 100644 index 47e5182..0000000 --- a/nix/overlays/paperwm.nix +++ /dev/null @@ -1,12 +0,0 @@ -# Keep until https://github.com/paperwm/PaperWM/issues/376 is fixed -self: super: { - gnomeExtensions = super.gnomeExtensions // { - paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: { - version = "pre-40.0"; - src = builtins.fetchGit { - url = https://github.com/paperwm/paperwm.git; - ref = "next-release"; - }; - }); - }; -} diff --git a/nix/system/framework/configuration.nix b/nix/system/framework/configuration.nix index 86b7fbb..6968e46 100644 --- a/nix/system/framework/configuration.nix +++ b/nix/system/framework/configuration.nix @@ -69,6 +69,7 @@ environment.systemPackages = with pkgs; [ cachix colmena + gnomeExtensions.paperwm vim wget zsh @@ -102,6 +103,18 @@ # List services that you want to enable: services.dbus.packages = with pkgs; [ dconf ]; + ### Set dconf to enable PaperWM out of the box + programs.dconf = + { enable = true; + profiles."user".databases = [ + { settings = + { "org/gnome/shell" = + { enabled-extensions = [ "paperwm@paperwm.github.com" ]; + }; + }; + } + ]; + }; # Enable the OpenSSH daemon. # services.openssh.enable = true; From d6cb17635750af8238055c85090c247486764307 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Wed, 19 Mar 2025 00:24:07 -0700 Subject: [PATCH 4/4] restore audio to framework --- nix/system/framework/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/system/framework/configuration.nix b/nix/system/framework/configuration.nix index 6968e46..a602dab 100644 --- a/nix/system/framework/configuration.nix +++ b/nix/system/framework/configuration.nix @@ -135,7 +135,7 @@ networking.wireguard.enable = true; services.pipewire = { - enable = false; + enable = true; alsa.enable = true; jack.enable = true; pulse.enable = true;