diff --git a/nix/home/desktop.nix b/nix/home/desktop.nix index bb38238..8d689bc 100644 --- a/nix/home/desktop.nix +++ b/nix/home/desktop.nix @@ -14,6 +14,7 @@ let ]; gnomePkgs = with pkgs; [ + gnomecast gnome-tweaks gnomeExtensions.worksets ]; @@ -22,9 +23,11 @@ in imports = [ (import ./commandline.nix) (import ./programs/alacritty) + # (import ./programs/kitty) + # (import ./programs/wezterm) ]; - nixpkgs.overlays = []; + nixpkgs.overlays = [ (import ../overlays/paperwm.nix) ]; home = { packages = defaultPkgs ++ gnomePkgs; diff --git a/nix/home/programs/helix/default.nix b/nix/home/programs/helix/default.nix index e3c016b..f5e34bd 100644 --- a/nix/home/programs/helix/default.nix +++ b/nix/home/programs/helix/default.nix @@ -1,8 +1,4 @@ -{ 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 +{ pkgs, ... }: { programs.helix = { enable = true; @@ -13,29 +9,10 @@ in }; typescript-language-server = { - command = "${pkgs.typescript-language-server}/bin/typescript-language-server"; + command = "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 = [ @@ -48,13 +25,11 @@ in } { 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" ]; } ]; } @@ -70,7 +45,6 @@ in normal = "block"; select = "block"; }; - bufferline = "multiple"; }; keys = { normal = { @@ -78,6 +52,7 @@ in "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 = { diff --git a/nix/home/programs/nvim/default.nix b/nix/home/programs/nvim/default.nix index d8bafd0..ef7cd36 100644 --- a/nix/home/programs/nvim/default.nix +++ b/nix/home/programs/nvim/default.nix @@ -124,13 +124,12 @@ with builtins; config = '' lua << EOF ${readFile ( - pkgs.replaceVars ./nvim-lspconfig.lua { + pkgs.substituteAll { + src = ./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 9862892..337bac1 100644 --- a/nix/home/programs/nvim/nvim-lspconfig.lua +++ b/nix/home/programs/nvim/nvim-lspconfig.lua @@ -62,7 +62,6 @@ 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 = { @@ -151,7 +150,6 @@ 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/overlays/paperwm.nix b/nix/overlays/paperwm.nix new file mode 100644 index 0000000..47e5182 --- /dev/null +++ b/nix/overlays/paperwm.nix @@ -0,0 +1,12 @@ +# 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 a602dab..86b7fbb 100644 --- a/nix/system/framework/configuration.nix +++ b/nix/system/framework/configuration.nix @@ -69,7 +69,6 @@ environment.systemPackages = with pkgs; [ cachix colmena - gnomeExtensions.paperwm vim wget zsh @@ -103,18 +102,6 @@ # 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; @@ -135,7 +122,7 @@ networking.wireguard.enable = true; services.pipewire = { - enable = true; + enable = false; alsa.enable = true; jack.enable = true; pulse.enable = true; diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index b964df5..4de61c8 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 (