Compare commits

..

4 commits

Author SHA1 Message Date
Haak Saxberg
d6cb176357 restore audio to framework 2025-09-25 00:30:29 -07:00
Haak Saxberg
a66ba69b61 actually set up paperwm on the framework 2025-09-25 00:30:29 -07:00
Haak Saxberg
fc1075fc52 Setting up helix LSPs more reproducibly 2025-09-25 00:28:38 -07:00
Haak Saxberg
7a7e3d56b2 Updating nix channels, requires responding to deprecations 2025-09-25 00:27:41 -07:00
7 changed files with 51 additions and 25 deletions

View file

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

View file

@ -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 = { programs.helix = {
enable = true; enable = true;
@ -9,10 +13,29 @@
}; };
typescript-language-server = { typescript-language-server = {
command = "typescript-language-server"; command = "${pkgs.typescript-language-server}/bin/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 = [
@ -25,11 +48,13 @@
} }
{ {
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" ];
} }
]; ];
} }
@ -45,6 +70,7 @@
normal = "block"; normal = "block";
select = "block"; select = "block";
}; };
bufferline = "multiple";
}; };
keys = { keys = {
normal = { normal = {
@ -52,7 +78,6 @@
"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,12 +124,13 @@ with builtins;
config = '' config = ''
lua << EOF lua << EOF
${readFile ( ${readFile (
pkgs.substituteAll { pkgs.replaceVars ./nvim-lspconfig.lua {
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,6 +62,7 @@ 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 = {
@ -150,6 +151,7 @@ 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",

View file

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

View file

@ -69,6 +69,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cachix cachix
colmena colmena
gnomeExtensions.paperwm
vim vim
wget wget
zsh zsh
@ -102,6 +103,18 @@
# 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;
@ -122,7 +135,7 @@
networking.wireguard.enable = true; networking.wireguard.enable = true;
services.pipewire = { services.pipewire = {
enable = false; enable = true;
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 (