26 Commits

Author SHA1 Message Date
Patrick Stevens
c1ca9a27e9 Remove coq in favour of nvim-cmp (#112) 2025-03-07 22:03:42 +00:00
Patrick Stevens
2a371ff957 Update Git config (#111) 2025-03-07 21:47:32 +00:00
Patrick Stevens
58c06a2a70 Update flake (#110) 2025-03-01 11:41:37 +00:00
Patrick Stevens
28dab00b65 Bump nixpkgs (#109) 2025-01-25 14:55:13 +00:00
Patrick Stevens
ca85c8de24 Delete some things we should be putting in devshells, and move to ghostty (#108) 2025-01-06 23:46:35 +00:00
Patrick Stevens
c45222500f Use discord-canary (#107) 2025-01-02 19:45:42 +00:00
Patrick Stevens
04fab0bad0 Bump nixpkgs (#106) 2025-01-02 19:41:32 +00:00
Patrick Stevens
04079d1082 Enable bluetooth on earthworm (#105) 2024-12-22 22:48:05 +00:00
Patrick Stevens
6973cbbd99 Fix volume keys (#104) 2024-12-22 21:56:00 +00:00
Patrick Stevens
2346cbb7ce Bump nixpkgs (#102) 2024-12-22 21:54:14 +00:00
Patrick Stevens
247c3419a8 Bump nixpkgs (#103) 2024-12-22 21:43:54 +00:00
Patrick Stevens
8a1f2af5bb Upgrade Nixpkgs (#97) 2024-12-15 10:00:49 +00:00
Patrick Stevens
3bfb4e7ec5 Freeze tty (#101) 2024-12-13 09:27:45 +00:00
Patrick Stevens
d857f7ab9f Screenshots (#100) 2024-11-29 19:05:10 +00:00
Patrick Stevens
cb3c993507 Fix sway on Earthworm (#99) 2024-11-29 09:41:46 +00:00
Patrick Stevens
14f21cb172 Fix shutdown menu (#98) 2024-11-29 09:35:39 +00:00
Patrick Stevens
02f757bf57 Fix pavucontrol (#96) 2024-11-24 12:47:27 +00:00
Patrick Stevens
6d3804a5ee Start tmux automatically (#95) 2024-11-20 18:29:59 +00:00
Patrick Stevens
6c3bdcc4b2 AMD GPU on capybara (#94) 2024-11-20 18:23:01 +00:00
Patrick Stevens
2123c53980 Bump flake again (#93) 2024-11-14 23:40:40 +00:00
Patrick Stevens
7f712faf2c Bump flake (#92) 2024-11-14 23:31:22 +00:00
Patrick Stevens
5b8b64b0a2 Keepassxc broken on aarch64-darwin (#91) 2024-11-14 23:26:55 +00:00
Patrick Stevens
73efe7a18c Add golang (#90) 2024-10-26 08:25:43 +00:00
Patrick Stevens
f6dd2e686a Add gopls (#89) 2024-10-26 08:20:48 +00:00
Patrick Stevens
df071387b2 Pipewire on Capybara (#88) 2024-10-23 21:00:06 +00:00
Patrick Stevens
f83285dec2 Use Waybar (#87) 2024-10-21 23:23:29 +00:00
19 changed files with 266 additions and 171 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake .

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ result
bin/
obj/
.DS_Store
.direnv/

View File

@@ -1,16 +1,10 @@
{pkgs, ...}: let
mbsync = import ./mbsync.nix {inherit pkgs;};
in {
nix.useDaemon = true;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = [
pkgs.alacritty
pkgs.rustup
pkgs.libiconv
pkgs.clang
pkgs.python3
];
@@ -111,7 +105,6 @@ in {
};
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nixVersions.stable;
nix.gc.automatic = true;

98
flake.lock generated
View File

@@ -7,11 +7,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1725418254,
"narHash": "sha256-2zPzPP9Eu5NxgJxTVcuCCX5xh7CWy7rYaLHfaAZS6H8=",
"lastModified": 1738646237,
"narHash": "sha256-++0dXoZO9l5oceiGQsJmtUI5WXlPMw6QKjpg7vGPl3w=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "c5f944f49a052232015bb3c03524b69e3fdd2aa4",
"rev": "3d1c6c27b14c4b8fcbdaec779e715f30cb72ed15",
"type": "github"
},
"original": {
@@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1729382845,
"narHash": "sha256-REiWck1zIOnZIgGmmOWfwvkQw1f4UrBsxxOSKVSAG4w=",
"lastModified": 1740755725,
"narHash": "sha256-amZbqP84H/ApugaT+TADXTB3NbjkVHI9Vac1saIk0kE=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "a001f44cfc47164839eb61c6b1e7f4288813f7e8",
"rev": "5d6e0851b60508cffd66b4a6982440a40720338d",
"type": "github"
},
"original": {
@@ -43,18 +43,17 @@
},
"emacs": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1729390258,
"narHash": "sha256-z4Hg8k6iXIV55lA8HUntfJBdBzxOuG8M4ftWoJhrVqU=",
"lastModified": 1740820419,
"narHash": "sha256-Q0fbGgkpWyfadaXJmQmX+S+mF9cZSetYXZ+LQFwj0zE=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "89860b1c343648e8d71b6820e9311b98353ff14e",
"rev": "25b732c255ccb41258d70d775afb9f16e25fa3d5",
"type": "github"
},
"original": {
@@ -83,29 +82,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -121,11 +102,11 @@
]
},
"locked": {
"lastModified": 1729321331,
"narHash": "sha256-KVyQq+ez/oB30/WbdNgVD8g/bda34z8NiU187QKQb74=",
"lastModified": 1740796616,
"narHash": "sha256-JU97wIfRxeFN6rpTsUVCwWAdix+Wka4Or23907YIrFI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "122f70545b29ccb922e655b08acfe05bfb44ec68",
"rev": "f0b5e7e8a75abdea32bbff09ddd7b6eeb4b9b445",
"type": "github"
},
"original": {
@@ -148,11 +129,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725103162,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "github"
},
"original": {
@@ -164,27 +145,27 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1729181673,
"narHash": "sha256-LDiPhQ3l+fBjRATNtnuDZsBS7hqoBtPkKBkhpoBHv3I=",
"lastModified": 1740743217,
"narHash": "sha256-brsCRzLqimpyhORma84c3W2xPbIidZlIc3JGIuQVSNI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4eb33fe664af7b41a4c446f87d20c9a0a6321fa3",
"rev": "b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1729265718,
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
"lastModified": 1740762151,
"narHash": "sha256-Rn0j0gP6po1m46RsW/4jrn7938TZGR+wRZ0+MSZThBg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
"rev": "5954d3359cc7178623da6c7fd23dc7f7504d7187",
"type": "github"
},
"original": {
@@ -196,11 +177,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1695033101,
"narHash": "sha256-RQ4m+ycjdLdass7Hr4+Lzwnjw7wGhcUkKqWiJS3YxPM=",
"lastModified": 1734254970,
"narHash": "sha256-yZzYWWWeOqSFvIirHzY1SJiuSBPmXIYJFhyt+1zkv8A=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d941d9491804e0ca01e03468dbf6f8d3a7919a16",
"rev": "d388ee0ec8c623389ab3a7caead258a94cec14de",
"type": "github"
},
"original": {
@@ -250,33 +231,18 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"whisper": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"model": "model",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1704121968,
"narHash": "sha256-N8FJb+ohJ4Qt/m5RoAbwm3RP4VRjl+hA6PUCfjPhZo8=",
"lastModified": 1734268803,
"narHash": "sha256-KDfUObdMdMSM7prp2QO4f5DRCv9Z2TSCZEL0kFEBzN4=",
"owner": "Smaug123",
"repo": "whisper.cpp",
"rev": "04f8e0cdc73abe7c593b2c9405f0f590c51de95a",
"rev": "8cbc79c799212037e1c7b45548179f9548ea77a5",
"type": "github"
},
"original": {

View File

@@ -1,8 +1,6 @@
{
pkgs,
config,
username,
dotnet,
...
}: {
nixpkgs.config.allowUnfree = true;
@@ -12,33 +10,26 @@
hardware.graphics = {
enable = true;
enable32Bit = true;
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
# I don't have a Turing GPU
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.useOSProber = true;
boot.kernelParams = [
"video=DP-1:2560x1440@144"
"video=HDMI-A-1:1920x1080@144"
];
boot.extraModulePackages = [config.boot.kernelPackages.rtl8821au];
networking = {

View File

@@ -23,12 +23,14 @@
];
programs.vscode = {
userSettings = {
"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
"lean.executablePath" = "/Users/${username}/.elan/toolchains/stable/bin/lean";
"lean.memoryLimit" = 16384;
"latex-workshop.view.pdf.viewer" = "tab";
"lean4.toolchainPath" = "/Users/${username}/.elan/toolchains/leanprover--lean4---nightly-2022-12-16";
profiles.default = {
userSettings = {
"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
"lean.executablePath" = "/Users/${username}/.elan/toolchains/stable/bin/lean";
"lean.memoryLimit" = 16384;
"latex-workshop.view.pdf.viewer" = "tab";
"lean4.toolchainPath" = "/Users/${username}/.elan/toolchains/leanprover--lean4---nightly-2022-12-16";
};
};
};

28
home-manager/direnv/envrc Normal file
View File

@@ -0,0 +1,28 @@
# Configure Rider to use the correct .NET paths from an ambient .NET
use_rider_dotnet() {
# Get paths
DOTNET_PATH=$(readlink "$(which dotnet)")
SETTINGS_FILE=$(find . -maxdepth 1 -type f -name '*.sln.DotSettings.user')
MSBUILD=$(realpath "$(find "$(dirname "$DOTNET_PATH")/../share/dotnet/sdk" -maxdepth 2 -type f -name MSBuild.dll)")
# Update Rider settings if they exist
if [ -f "$SETTINGS_FILE" ] ; then
xmlstarlet ed --inplace \
-N wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" \
-N x="http://schemas.microsoft.com/winfx/2006/xaml" \
-N s="clr-namespace:System;assembly=mscorlib" \
-N ss="urn:shemas-jetbrains-com:settings-storage-xaml" \
--update "//s:String[@x:Key='/Default/Environment/Hierarchy/Build/BuildTool/DotNetCliExePath/@EntryValue']" \
--value "$(realpath "$(dirname "$DOTNET_PATH")/../share/dotnet/dotnet")" \
"$SETTINGS_FILE"
xmlstarlet ed --inplace \
-N wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" \
-N x="http://schemas.microsoft.com/winfx/2006/xaml" \
-N s="clr-namespace:System;assembly=mscorlib" \
-N ss="urn:shemas-jetbrains-com:settings-storage-xaml" \
--update "//s:String[@x:Key='/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue']" \
--value "$MSBUILD" \
"$SETTINGS_FILE"
fi
}

View File

@@ -3,7 +3,47 @@
../hardware/earthworm.nix
];
hardware.asahi.peripheralFirmwareDirectory = ../firmware;
hardware.asahi.peripheralFirmwareDirectory = ./../firmware;
hardware.asahi = {
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
setupAsahiSound = true;
withRust = true;
};
hardware.graphics.enable = true;
hardware.bluetooth.enable = true;
programs.light.enable = true;
services.actkbd = {
enable = true;
bindings = [
{
keys = [225];
events = ["key"];
command = "${pkgs.light}/bin/light -A 10";
}
{
keys = [224];
events = ["key"];
command = "${pkgs.light}/bin/light -U 10";
}
{
keys = [113];
events = ["key"];
command = "${pkgs.alsa-utils}/bin/amixer -q set Master toggle";
}
{
keys = [114];
events = ["key"];
command = "${pkgs.alsa-utils}/bin/amixer -q set Master 10- unmute";
}
{
keys = [115];
events = ["key"];
command = "${pkgs.alsa-utils}/bin/amixer -q set Master 10+ unmute";
}
];
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
@@ -14,6 +54,10 @@
networking = {
hostName = "earthworm";
networkmanager.enable = true;
wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
};
time.timeZone = "Europe/London";
@@ -31,10 +75,11 @@
environment.systemPackages = [
pkgs.vim
pkgs.wget
pkgs.mesa-asahi-edge
];
environment.loginShellInit = ''
[[ "$(tty)" == /dev/tty1 ]] && sway
[[ "$(tty)" == /dev/tty1 ]] && export WLR_RENDER_NO_EXPLICIT_SYNC=1 && sway
'';
services.openssh.enable = true;

View File

@@ -33,8 +33,8 @@
./modules/tmux.nix
./modules/zsh.nix
./modules/ripgrep.nix
./modules/alacritty.nix
./modules/rust.nix
./modules/posix-sh.nix
(import ./modules/mail.nix
{
inherit mbsync secretsPath;
@@ -76,6 +76,14 @@
push = {
default = "current";
autoSetupRemote = true;
followTags = true;
};
fetch = {
prune = true;
all = true;
};
help = {
autocorrect = "prompt";
};
pull = {
rebase = false;
@@ -83,6 +91,15 @@
init = {
defaultBranch = "main";
};
branch = {
sort = "-committerdate";
};
column = {
ui = "auto";
};
tag = {
sort = "version:refname";
};
advice = {
addIgnoredFile = false;
};
@@ -100,6 +117,8 @@
};
diff = {
colorMoved = "default";
algorithm = "histogram";
renames = true;
};
"protocol.file" = {
allow = "always";
@@ -109,22 +128,24 @@
programs.vscode = {
enable = true;
enableExtensionUpdateCheck = true;
enableUpdateCheck = true;
package = nixpkgs.vscode;
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
userSettings = {
workbench.colorTheme = "Default";
"files.Exclude" = {
"**/.git" = true;
"**/.DS_Store" = true;
"**/Thumbs.db" = true;
"**/*.olean" = true;
"**/result" = true;
profiles.default = {
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
enableExtensionUpdateCheck = true;
enableUpdateCheck = true;
userSettings = {
workbench.colorTheme = "Default";
"files.Exclude" = {
"**/.git" = true;
"**/.DS_Store" = true;
"**/Thumbs.db" = true;
"**/*.olean" = true;
"**/result" = true;
};
"git.path" = "${nixpkgs.git}/bin/git";
"update.mode" = "none";
"explorer.confirmDelete" = false;
};
"git.path" = "${nixpkgs.git}/bin/git";
"update.mode" = "none";
"explorer.confirmDelete" = false;
};
};
@@ -184,21 +205,6 @@
config = builtins.readFile ./nvim/roslyn-nvim.lua;
type = "lua";
}
{
plugin = let
name = "coq.artifacts";
rev = "9c5067a471322c6bb866545e88e5b28c82511865";
in
nixpkgs.vimUtils.buildVimPlugin {
name = name;
src = nixpkgs.fetchFromGitHub {
owner = "ms-jpq";
repo = name;
rev = rev;
hash = "sha256-BHm7U3pINtYamY7m26I4lQee7ccJ6AcHmYx7j1MRFDA=";
};
};
}
{
plugin = let
name = "venv-selector.nvim";
@@ -227,8 +233,12 @@
type = "lua";
}
{
plugin = nixpkgs.vimPlugins.coq_nvim;
config = ''let g:coq_settings = { 'auto_start': 'shut-up', 'xdg': v:true }'';
plugin = nixpkgs.vimPlugins.nvim-cmp;
config = builtins.readFile ./nvim/nvim-cmp.lua;
type = "lua";
}
{
plugin = nixpkgs.vimPlugins.cmp-nvim-lsp;
}
{
plugin = nixpkgs.vimPlugins.rustaceanvim;
@@ -269,40 +279,29 @@
nixpkgs.difftastic
nixpkgs.syncthing
nixpkgs.nodePackages_latest.dockerfile-language-server-nodejs
nixpkgs.nodePackages_latest.bash-language-server
nixpkgs.nodePackages_latest.vscode-json-languageserver
nixpkgs.nodePackages_latest.vscode-langservers-extracted
nixpkgs.hadolint
nixpkgs.yaml-language-server
nixpkgs.csharp-ls
nixpkgs.netcoredbg
nixpkgs.nil
nixpkgs.fsautocomplete
nixpkgs.keepassxc
nixpkgs.wget
nixpkgs.yt-dlp
nixpkgs.cmake
nixpkgs.gnumake
nixpkgs.gcc
nixpkgs.lldb
nixpkgs.hledger
nixpkgs.hledger-web
dotnet
nixpkgs.elan
nixpkgs.coreutils-prefixed
nixpkgs.shellcheck
nixpkgs.universal-ctags
nixpkgs.asciinema
nixpkgs.git-lfs
nixpkgs.imagemagick
nixpkgs.nixpkgs-fmt
nixpkgs.lnav
nixpkgs.age
nixpkgs.nodejs
nixpkgs.pyright
nixpkgs.woodpecker-agent
nixpkgs.lynx
nixpkgs.alejandra
nixpkgs.ffmpeg
nixpkgs.bat
nixpkgs.pandoc
@@ -314,13 +313,20 @@
nixpkgs.deno
nixpkgs.yazi
nixpkgs.font-awesome
nixpkgs.gopls
nixpkgs.go
nixpkgs.libiconv
nixpkgs.claude-code
]
++ (
if nixpkgs.stdenv.isLinux
then [
nixpkgs.ghostty
nixpkgs.kdePackages.xwaylandvideobridge
nixpkgs.protonmail-bridge
nixpkgs.pinentry
nixpkgs.signal-desktop
nixpkgs.keepassxc
]
else []
)
@@ -328,7 +334,7 @@
if machinename == "capybara"
then [
nixpkgs.steam-run
nixpkgs.discord
nixpkgs.discord-canary
nixpkgs.anki-bin
]
else []

View File

@@ -13,7 +13,7 @@
{command = "${nixpkgs.waybar}/bin/waybar";}
];
};
extraConfig = builtins.readFile ./sway.conf;
extraConfig = builtins.replaceStrings ["@@WL-COPY@@" "@@GRIM@@" "@@SLURP@@"] ["${nixpkgs.wl-clipboard}/bin/wl-copy" "${nixpkgs.grim}/bin/grim" "${nixpkgs.slurp}/bin/slurp"] (builtins.readFile ./sway.conf);
};
programs.waybar = {
@@ -157,7 +157,7 @@
"car" = "";
"default" = ["" "" ""];
};
"on-click" = "pavucontrol";
"on-click" = "${nixpkgs.pavucontrol}/bin/pavucontrol";
};
"custom/media" = {
"format" = "{icon} {text}";
@@ -178,7 +178,7 @@
"menu" = "on-click";
"menu-file" = ./modules/waybar/power_menu.xml;
"menu-actions" = {
"shutdown" = "shutdown";
"shutdown" = "shutdown now";
"reboot" = "reboot";
"suspend" = "systemctl suspend";
"hibernate" = "systemctl hibernate";

View File

@@ -1,17 +0,0 @@
{pkgs, ...}: {
programs.alacritty = {
enable = true;
settings = {
font = {
normal = {
family = "FiraCode Nerd Font Mono";
};
};
};
};
home.packages = [
pkgs.alacritty
(pkgs.nerdfonts.override {fonts = ["FiraCode" "DroidSansMono"];})
];
}

View File

@@ -6,5 +6,6 @@
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
# stdlib = builtins.readFile ../direnv/envrc;
};
}

View File

@@ -0,0 +1,9 @@
{pkgs, ...}: {
programs.ghostty = {
enable = true;
};
home.packages = [
pkgs.ghostty
];
}

View File

@@ -0,0 +1,6 @@
{pkgs, ...}: {
home.packages = [
pkgs.shellcheck
pkgs.nodePackages_latest.bash-language-server
];
}

View File

@@ -29,4 +29,8 @@ zle -N edit-command-line
bindkey '^X^E' edit-command-line
bindkey -e
PATH="$PATH:$HOME/.cargo/bin"
if [[ -z "$TMUX" ]]; then
tmux new-session -A -s default
fi
ttyctl -f

View File

@@ -1,4 +1,4 @@
local coq = require("coq")
local nvim_cmp = require("cmp")
-- Using rustaceanvim means we shouldn't set up the LSP for Rust manually.
-- Similarly csharp_ls is unnecessary given roslyn.nvim
@@ -15,6 +15,8 @@ local schemas = {
require("lspconfig")["clangd"].setup({})
require("lspconfig")["gopls"].setup({})
require("lspconfig")["yamlls"].setup({
settings = {
yaml = {
@@ -32,6 +34,8 @@ require("lspconfig")["yamlls"].setup({
})
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
capabilities.textDocument.completion.completionItem.snippetSupport = true
require("lspconfig")["jsonls"].setup({
capabilities = capabilities,
@@ -85,7 +89,8 @@ require("lspconfig")["lua_ls"].setup({
},
})
require("lspconfig").pyright.setup(coq.lsp_ensure_capabilities({
require("lspconfig").pyright.setup({
capabilities = capabilities,
handlers = {
["textDocument/publishDiagnostics"] = function(...)
vim.lsp.diagnostic.on_publish_diagnostics(...)
@@ -95,9 +100,10 @@ require("lspconfig").pyright.setup(coq.lsp_ensure_capabilities({
vim.api.nvim_set_current_win(window)
end,
},
}))
})
require("lspconfig").nil_ls.setup(coq.lsp_ensure_capabilities({
require("lspconfig").nil_ls.setup({
capabilities = capabilities,
settings = {
nix = {
flake = {
@@ -105,7 +111,7 @@ require("lspconfig").nil_ls.setup(coq.lsp_ensure_capabilities({
},
},
},
}))
})
function ToggleLocList()
local winid = vim.fn.getloclist(0, { winid = 0 }).winid

View File

@@ -0,0 +1,45 @@
local cmp = require("cmp")
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
vim.snippet.expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
}, {
{ name = "buffer" },
}),
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
},
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
}, {
{ name = "cmdline" },
}),
matching = { disallow_symbol_nonprefix_matching = false },
})

View File

@@ -2,3 +2,12 @@ output Unknown-1 scale 2
input * {
xkb_layout "gb"
}
# capture all screens to clipboard
bindsym Shift+Print exec @@GRIM@@ - | @@WL-COPY@@
# capture the specified screen area to clipboard
bindsym Shift+Alt+Print exec @@GRIM@@ -g "$(@@SLURP@@)" - | @@WL-COPY@@
# capture the focused monitor to clipboard
bindsym Shift+Control+Print exec @@GRIM@@ -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | @@WL-COPY@@

View File

@@ -12,7 +12,6 @@ with pkgs.vscode-extensions;
rust-lang.rust-analyzer
github.vscode-pull-request-github
shardulm94.trailing-spaces
nvarner.typst-lsp
arrterian.nix-env-selector
# Doesn't build on arm64
# vadimcn.vscode-lldb