Compare commits

..

No commits in common. "d6cb17635750af8238055c85090c247486764307" and "d76b16ddc72efb08cceea3efc5114ed7d3786d1d" have entirely different histories.

7 changed files with 25 additions and 51 deletions

View file

@ -14,6 +14,7 @@ let
]; ];
gnomePkgs = with pkgs; [ gnomePkgs = with pkgs; [
gnomecast
gnome-tweaks gnome-tweaks
gnomeExtensions.worksets gnomeExtensions.worksets
]; ];
@ -22,9 +23,11 @@ in
imports = [ imports = [
(import ./commandline.nix) (import ./commandline.nix)
(import ./programs/alacritty) (import ./programs/alacritty)
# (import ./programs/kitty)
# (import ./programs/wezterm)
]; ];
nixpkgs.overlays = []; nixpkgs.overlays = [ (import ../overlays/paperwm.nix) ];
home = { home = {
packages = defaultPkgs ++ gnomePkgs; packages = defaultPkgs ++ gnomePkgs;

View file

@ -1,8 +1,4 @@
{ 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 = { programs.helix = {
enable = true; enable = true;
@ -13,29 +9,10 @@ in
}; };
typescript-language-server = { typescript-language-server = {
command = "${pkgs.typescript-language-server}/bin/typescript-language-server"; command = "typescript-language-server";
args = [ "--stdio" ]; args = [ "--stdio" ];
config.hostInfo = "helix"; 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 = [ language = [
@ -48,13 +25,11 @@ in
} }
{ {
name = "typescript"; name = "typescript";
file-types = [ "tsx" "ts" ];
auto-format = true; auto-format = true;
formatter = { command = "prettier"; args = ["--parser=typescript"]; };
language-servers = [ language-servers = [
{ name = "eslint"; }
{ {
name = "typescript-language-server"; name = "typescript-language-server";
except-features = [ "format" "diagnostics" ];
} }
]; ];
} }
@ -70,7 +45,6 @@ in
normal = "block"; normal = "block";
select = "block"; select = "block";
}; };
bufferline = "multiple";
}; };
keys = { keys = {
normal = { normal = {
@ -78,6 +52,7 @@ in
"ret" = [ "move_line_down" "goto_first_nonwhitespace" ]; # Maps the enter key to move to start of next line "ret" = [ "move_line_down" "goto_first_nonwhitespace" ]; # Maps the enter key to move to start of next line
X = "extend_line_above"; X = "extend_line_above";
D = "delete_char_backward"; 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" ]; "S-ret" = [ "move_line_up" "goto_first_nonwhitespace" ];
}; };
insert = { insert = {

View file

@ -124,13 +124,12 @@ with builtins;
config = '' config = ''
lua << EOF lua << EOF
${readFile ( ${readFile (
pkgs.replaceVars ./nvim-lspconfig.lua { pkgs.substituteAll {
src = ./nvim-lspconfig.lua;
# since both of these are used for actually configuring the system, # since both of these are used for actually configuring the system,
# we'll probably always want them around. # we'll probably always want them around.
lua_ls = pkgs.sumneko-lua-language-server; lua_ls = pkgs.sumneko-lua-language-server;
nixd = pkgs.nixd; nixd = pkgs.nixd;
ts_server = pkgs.nodePackages.typescript-language-server;
diagnostic_server = pkgs.nodePackages.diagnostic-languageserver;
} }
) } ) }
EOF EOF

View file

@ -62,7 +62,6 @@ vim.api.nvim_create_autocmd("BufWritePre", {
}) })
nvim_lsp.diagnosticls.setup { nvim_lsp.diagnosticls.setup {
cmd = { "@diagnostic_server@/bin/diagnostic-languageserver", '--stdio' },
filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'markdown', 'pandoc', filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'css', 'scss', 'markdown', 'pandoc',
'prisma' }, 'prisma' },
init_options = { init_options = {
@ -151,7 +150,6 @@ capabilitiesWithoutFomatting.textDocument.rangeFormatting = false
capabilitiesWithoutFomatting.textDocument.range_formatting = false capabilitiesWithoutFomatting.textDocument.range_formatting = false
nvim_lsp.ts_ls.setup { nvim_lsp.ts_ls.setup {
cmd = { "@ts_server@/bin/typescript-language-server", '--stdio' },
init_options = { init_options = {
hostInfo = "neovim", hostInfo = "neovim",
maxTsServerMemory = "8192", maxTsServerMemory = "8192",

12
nix/overlays/paperwm.nix Normal file
View file

@ -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";
};
});
};
}

View file

@ -69,7 +69,6 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cachix cachix
colmena colmena
gnomeExtensions.paperwm
vim vim
wget wget
zsh zsh
@ -103,18 +102,6 @@
# List services that you want to enable: # List services that you want to enable:
services.dbus.packages = with pkgs; [ dconf ]; 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. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;
@ -135,7 +122,7 @@
networking.wireguard.enable = true; networking.wireguard.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = false;
alsa.enable = true; alsa.enable = true;
jack.enable = true; jack.enable = true;
pulse.enable = true; pulse.enable = true;

View file

@ -104,14 +104,14 @@ in
../../home/programs/alacritty ../../home/programs/alacritty
]; ];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nix; # nix.package = pkgs.nix;
# Create /etc/bashrc that loads the nix-darwin environment. # Create /etc/bashrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true; # programs.fish.enable = true;
system.primaryUser = "haak";
# We need this snippet to allow spotlight to find the applications installed # We need this snippet to allow spotlight to find the applications installed
# by nix-darwin # by nix-darwin
system.activationScripts.applications.text = pkgs.lib.mkForce ( system.activationScripts.applications.text = pkgs.lib.mkForce (