diff --git a/configuration.nix b/configuration.nix index 026801f..c9bfbcb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -11,6 +11,8 @@ in home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + services.xserver.videoDrivers = [ "displaylink" "modesetting" ]; + hardware = { pulseaudio = { enable = true; diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index 85e5dd4..89d445d 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -35,7 +35,8 @@ function M.setup() "hrsh7th/cmp-cmdline", -- cmdline completion perhaps? "hrsh7th/nvim-cmp", -- completion engine "L3MON4D3/LuaSnip", -- snippeting engine - "saadparwaiz1/cmp_luasnip" -- snippet support for cmp + "saadparwaiz1/cmp_luasnip", -- snippet support for cmp + "wakatime/vim-wakatime" -- track time usage } for _, v in ipairs(themePackages) do diff --git a/dotfiles/neovim/lua/my/plugins/lspconfig.lua b/dotfiles/neovim/lua/my/plugins/lspconfig.lua index adbef3a..b51453c 100644 --- a/dotfiles/neovim/lua/my/plugins/lspconfig.lua +++ b/dotfiles/neovim/lua/my/plugins/lspconfig.lua @@ -110,7 +110,8 @@ local servers = { -- set formatter formattingProvider = "ormolu" } - } + }, + cssls = {} -- agda = {}, Haven't gotten this one to work yet } diff --git a/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua b/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua index 8cf9332..54e543f 100644 --- a/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua +++ b/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua @@ -1,4 +1,4 @@ -local map = require("my.keymaps").mapSilent +local map = require("my.keymaps").map local M = {} @@ -6,10 +6,10 @@ local M = {} function M.setup() vim.g.tmux_navigator_no_mappings = 1 - map("inv", "", ":TmuxNavigateLeft") - map("inv", "", ":TmuxNavigateDown") - map("inv", "", ":TmuxNavigateUp") - map("inv", "", ":TmuxNavigateRight") + map("n", "h", ":TmuxNavigateLeft") + map("n", "j", ":TmuxNavigateDown") + map("n", "k", ":TmuxNavigateUp") + map("n", "l", ":TmuxNavigateRight") end return M diff --git a/modules/applications/neovim.nix b/modules/applications/neovim.nix index 00e154c..d018e1d 100644 --- a/modules/applications/neovim.nix +++ b/modules/applications/neovim.nix @@ -24,6 +24,7 @@ let prettierd # prettier but faster # Others + wakatime # time tracking fd # file finder ripgrep # grep rewrite (I think?) nodePackages.typescript # typescript language @@ -37,7 +38,6 @@ let myConfig = '' vim.g.lualineTheme = ${theme.neovim.lualineTheme} vim.opt.runtimepath:append("${paths.dotfiles}/neovim") - -- dofile("${paths.dotfiles}/neovim/my/init.lua").setup() require("my.init").setup() ''; @@ -59,7 +59,11 @@ in home.file.".local/share/nvim/site/pack/paqs/start/paq-nvim".source = paq; xdg.configFile."nvim/init.lua".text = myConfig; xdg.configFile."nvim/lua/my/theme.lua".source = theme.neovim.theme; - home.packages = [ neovim ]; + home.packages = [ + neovim + # idk why I need to install this here + vscode-langservers-extracted # css and shit + ]; programs.neovim = { enable = false; diff --git a/modules/overlays/npm.nix b/modules/overlays/npm.nix index 7b85275..22202a5 100644 --- a/modules/overlays/npm.nix +++ b/modules/overlays/npm.nix @@ -4,4 +4,7 @@ in with self; { # Faster prettier for editors prettierd = customPackages."@fsouza/prettierd"; + + # I need this for the css lang server thingy + vscode-langservers-extracted = customPackages."vscode-langservers-extracted"; } diff --git a/modules/overlays/npm/node-packages.json b/modules/overlays/npm/node-packages.json index 0fb51e5..72a60e0 100644 --- a/modules/overlays/npm/node-packages.json +++ b/modules/overlays/npm/node-packages.json @@ -1 +1 @@ -["@fsouza/prettierd"] +["@fsouza/prettierd", "vscode-langservers-extracted"] diff --git a/modules/overlays/npm/node-packages.nix b/modules/overlays/npm/node-packages.nix index 08f5f65..91e488b 100644 --- a/modules/overlays/npm/node-packages.nix +++ b/modules/overlays/npm/node-packages.nix @@ -4,13 +4,22 @@ let sources = { - "core_d-3.2.0" = { + "core-js-3.22.5" = { + name = "core-js"; + packageName = "core-js"; + version = "3.22.5"; + src = fetchurl { + url = "https://registry.npmjs.org/core-js/-/core-js-3.22.5.tgz"; + sha512 = "VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA=="; + }; + }; + "core_d-4.0.0" = { name = "core_d"; packageName = "core_d"; - version = "3.2.0"; + version = "4.0.0"; src = fetchurl { - url = "https://registry.npmjs.org/core_d/-/core_d-3.2.0.tgz"; - sha512 = "waKkgHU2P19huhuMjCqCDWTYjxCIHoB+nnYjI7pVMUOC1giWxMNDrXkPw9QjWY+PWCFm49bD3wA/J+c7BGZ+og=="; + url = "https://registry.npmjs.org/core_d/-/core_d-4.0.0.tgz"; + sha512 = "dBxd0Ocxj3D3K+rJxutTAZ9LQHkuMZoc9HPWYwYRYK7swou5wuIRXxgJ39YLNDvFHfHyV3JbxVYluF/AOhcRnw=="; }; }; "has-flag-4.0.0" = { @@ -22,6 +31,15 @@ let sha512 = "EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="; }; }; + "jsonc-parser-3.0.0" = { + name = "jsonc-parser"; + packageName = "jsonc-parser"; + version = "3.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz"; + sha512 = "fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA=="; + }; + }; "nanolru-1.0.0" = { name = "nanolru"; packageName = "nanolru"; @@ -31,13 +49,31 @@ let sha512 = "GyQkE8M32pULhQk7Sko5raoIbPalAk90ICG+An4fq6fCsFHsP6fB2K46WGXVdoJpy4SGMnZ/EKbo123fZJomWg=="; }; }; - "prettier-2.5.1" = { + "prettier-2.6.2" = { name = "prettier"; packageName = "prettier"; - version = "2.5.1"; + version = "2.6.2"; src = fetchurl { - url = "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz"; - sha512 = "vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg=="; + url = "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz"; + sha512 = "PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew=="; + }; + }; + "regenerator-runtime-0.13.9" = { + name = "regenerator-runtime"; + packageName = "regenerator-runtime"; + version = "0.13.9"; + src = fetchurl { + url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz"; + sha512 = "p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="; + }; + }; + "request-light-0.5.8" = { + name = "request-light"; + packageName = "request-light"; + version = "0.5.8"; + src = fetchurl { + url = "https://registry.npmjs.org/request-light/-/request-light-0.5.8.tgz"; + sha512 = "3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="; }; }; "supports-color-8.1.1" = { @@ -49,32 +85,166 @@ let sha512 = "MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="; }; }; + "typescript-4.6.4" = { + name = "typescript"; + packageName = "typescript"; + version = "4.6.4"; + src = fetchurl { + url = "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz"; + sha512 = "9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg=="; + }; + }; + "vscode-css-languageservice-5.4.2" = { + name = "vscode-css-languageservice"; + packageName = "vscode-css-languageservice"; + version = "5.4.2"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-5.4.2.tgz"; + sha512 = "DT7+7vfdT2HDNjDoXWtYJ0lVDdeDEdbMNdK4PKqUl2MS8g7PWt7J5G9B6k9lYox8nOfhCEjLnoNC3UKHHCR1lg=="; + }; + }; + "vscode-html-languageservice-4.2.5" = { + name = "vscode-html-languageservice"; + packageName = "vscode-html-languageservice"; + version = "4.2.5"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-4.2.5.tgz"; + sha512 = "dbr10KHabB9EaK8lI0XZW7SqOsTfrNyT3Nuj0GoPi4LjGKUmMiLtsqzfedIzRTzqY+w0FiLdh0/kQrnQ0tLxrw=="; + }; + }; + "vscode-json-languageservice-4.2.1" = { + name = "vscode-json-languageservice"; + packageName = "vscode-json-languageservice"; + version = "4.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.2.1.tgz"; + sha512 = "xGmv9QIWs2H8obGbWg+sIPI/3/pFgj/5OWBhNzs00BkYQ9UaB2F6JJaGB/2/YOZJ3BvLXQTC4Q7muqU25QgAhA=="; + }; + }; + "vscode-jsonrpc-8.0.1" = { + name = "vscode-jsonrpc"; + packageName = "vscode-jsonrpc"; + version = "8.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.1.tgz"; + sha512 = "N/WKvghIajmEvXpatSzvTvOIz61ZSmOSa4BRA4pTLi+1+jozquQKP/MkaylP9iB68k73Oua1feLQvH3xQuigiQ=="; + }; + }; + "vscode-languageserver-8.0.1" = { + name = "vscode-languageserver"; + packageName = "vscode-languageserver"; + version = "8.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-8.0.1.tgz"; + sha512 = "sn7SjBwWm3OlmLtgg7jbM0wBULppyL60rj8K5HF0ny/MzN+GzPBX1kCvYdybhl7UW63V5V5tRVnyB8iwC73lSQ=="; + }; + }; + "vscode-languageserver-protocol-3.17.1" = { + name = "vscode-languageserver-protocol"; + packageName = "vscode-languageserver-protocol"; + version = "3.17.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.1.tgz"; + sha512 = "BNlAYgQoYwlSgDLJhSG+DeA8G1JyECqRzM2YO6tMmMji3Ad9Mw6AW7vnZMti90qlAKb0LqAlJfSVGEdqMMNzKg=="; + }; + }; + "vscode-languageserver-textdocument-1.0.4" = { + name = "vscode-languageserver-textdocument"; + packageName = "vscode-languageserver-textdocument"; + version = "1.0.4"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.4.tgz"; + sha512 = "/xhqXP/2A2RSs+J8JNXpiiNVvvNM0oTosNVmQnunlKvq9o4mupHOBAnnzH0lwIPKazXKvAKsVp1kr+H/K4lgoQ=="; + }; + }; + "vscode-languageserver-types-3.17.1" = { + name = "vscode-languageserver-types"; + packageName = "vscode-languageserver-types"; + version = "3.17.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.1.tgz"; + sha512 = "K3HqVRPElLZVVPtMeKlsyL9aK0GxGQpvtAUTfX4k7+iJ4mc1M+JM+zQwkgGy2LzY0f0IAafe8MKqIkJrxfGGjQ=="; + }; + }; + "vscode-nls-5.0.1" = { + name = "vscode-nls"; + packageName = "vscode-nls"; + version = "5.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.1.tgz"; + sha512 = "hHQV6iig+M21lTdItKPkJAaWrxALQb/nqpVffakO4knJOh3DrU2SXOMzUzNgo1eADPzu3qSsJY1weCzvR52q9A=="; + }; + }; + "vscode-uri-3.0.3" = { + name = "vscode-uri"; + packageName = "vscode-uri"; + version = "3.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.3.tgz"; + sha512 = "EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA=="; + }; + }; }; in { "@fsouza/prettierd" = nodeEnv.buildNodePackage { name = "_at_fsouza_slash_prettierd"; packageName = "@fsouza/prettierd"; - version = "0.18.1"; + version = "0.20.0"; src = fetchurl { - url = "https://registry.npmjs.org/@fsouza/prettierd/-/prettierd-0.18.1.tgz"; - sha512 = "W2H1E09e1B31MuyOlpXOtemxZ+9qZk7TTOzebVDh5WqHB7+jo1WOJtGwwTyp1k9irlvqqF/FpRzIUrKBR4KGqA=="; + url = "https://registry.npmjs.org/@fsouza/prettierd/-/prettierd-0.20.0.tgz"; + sha512 = "FQ2WX17r2RErbsheFTg6ZjdP1FTZ02Urc9uORAxc3OXPRJaVmx1AzYgTY0w3LmPZs4YyiH0IZO+BrstobhjCjA=="; }; dependencies = [ - sources."core_d-3.2.0" + sources."core_d-4.0.0" sources."has-flag-4.0.0" sources."nanolru-1.0.0" - sources."prettier-2.5.1" + sources."prettier-2.6.2" sources."supports-color-8.1.1" ]; buildInputs = globalBuildInputs; meta = { description = "prettier, as a daemon"; - homepage = "https://github.com/fsouza/prettierd#readme"; + homepage = "https://github.com/fsouza/prettierd"; license = "ISC"; }; production = true; bypassCache = true; reconstructLock = true; }; + vscode-langservers-extracted = nodeEnv.buildNodePackage { + name = "vscode-langservers-extracted"; + packageName = "vscode-langservers-extracted"; + version = "4.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/vscode-langservers-extracted/-/vscode-langservers-extracted-4.2.1.tgz"; + sha512 = "Un7gzQgvACjGtsT0Yll5QqHgL65a4mTK5ChgMnO4dgTZ3tuwJCaP84oztBqvuFZzN9QxA3C07J4QEQvf1xjcgQ=="; + }; + dependencies = [ + sources."core-js-3.22.5" + sources."jsonc-parser-3.0.0" + sources."regenerator-runtime-0.13.9" + sources."request-light-0.5.8" + sources."typescript-4.6.4" + sources."vscode-css-languageservice-5.4.2" + sources."vscode-html-languageservice-4.2.5" + sources."vscode-json-languageservice-4.2.1" + sources."vscode-jsonrpc-8.0.1" + sources."vscode-languageserver-8.0.1" + sources."vscode-languageserver-protocol-3.17.1" + sources."vscode-languageserver-textdocument-1.0.4" + sources."vscode-languageserver-types-3.17.1" + sources."vscode-nls-5.0.1" + sources."vscode-uri-3.0.3" + ]; + buildInputs = globalBuildInputs; + meta = { + description = "HTML/CSS/JSON language servers extracted from [vscode](https://github.com/Microsoft/vscode)."; + homepage = "https://github.com/hrsh7th/vscode-langservers-extracted#readme"; + license = "MIT"; + }; + production = true; + bypassCache = true; + reconstructLock = true; + }; } diff --git a/modules/xserver.nix b/modules/xserver.nix index cacf910..b99bb13 100644 --- a/modules/xserver.nix +++ b/modules/xserver.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: let theme = pkgs.myThemes.current; in @@ -60,6 +60,10 @@ in }; }; + services.xserver.displayManager.sessionCommands = '' + ${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0 + ''; + services.fractalart.enable = true; hardware.opengl.enable = true; }