1 Commits

Author SHA1 Message Date
Smaug123
3efd22bc6b Update flake 2024-12-15 09:59:02 +00:00
24 changed files with 196 additions and 278 deletions

1
.envrc
View File

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

View File

@@ -11,9 +11,9 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v5"
uses: "actions/checkout@v4"
- name: "Install Nix"
uses: "cachix/install-nix-action@v31"
uses: "cachix/install-nix-action@v30"
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
- name: "Check flake"
run: "nix flake check --all-systems"

1
.gitignore vendored
View File

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

View File

@@ -1,10 +1,16 @@
{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
];
@@ -105,6 +111,7 @@ in {
};
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nixVersions.stable;
nix.gc.automatic = true;
@@ -127,6 +134,4 @@ in {
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
system.primaryUser = "patrick";
}

133
flake.lock generated
View File

@@ -4,14 +4,14 @@
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix"
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1756110286,
"narHash": "sha256-NE0HwcQCQTgM+HuYqmiemPf/5e+3fjwowceAyJj+ikU=",
"lastModified": 1733377410,
"narHash": "sha256-tZ9JEAaHIs3TPdRZeZzHsnJmUilkcnVaUTvyprbRb1A=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "b99bf9bf7445416fe55da09034fc4a6cd733805c",
"rev": "e8c07c3ae199b55a8c1c35a7c067c5cef9c7e929",
"type": "github"
},
"original": {
@@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1757015938,
"narHash": "sha256-1qBXNK/QxEjCqIoA2DxWn5gqM8rVxt+OxKodXu1GLTY=",
"lastModified": 1733570843,
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "eaacfa1101b84225491d2ceae9549366d74dc214",
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
"type": "github"
},
"original": {
@@ -41,13 +41,34 @@
"type": "github"
}
},
"emacs": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1734253225,
"narHash": "sha256-LnBb8SyY+WGmBtnQ9XmbpKPoGjOrf89T//xQsKZhJzE=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "d6353ce807b7845ffec114d234c90ece44c39122",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
"type": "github"
},
"original": {
@@ -61,11 +82,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
@@ -81,11 +102,11 @@
]
},
"locked": {
"lastModified": 1757075491,
"narHash": "sha256-a+NMGl5tcvm+hyfSG2DlVPa8nZLpsumuRj1FfcKb2mQ=",
"lastModified": 1734093295,
"narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f56bf065f9abedc7bc15e1f2454aa5c8edabaacf",
"rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8",
"type": "github"
},
"original": {
@@ -108,11 +129,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
"type": "github"
},
"original": {
@@ -122,13 +143,29 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1756911493,
"narHash": "sha256-6n/n1GZQ/vi+LhFXMSyoseKdNfc2QQaSBXJdgamrbkE=",
"lastModified": 1734083684,
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c6a788f552b7b7af703b1a29802a7233c0067908",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733935885,
"narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5a48e3c2e435e95103d56590188cfed7b70e108c",
"type": "github"
},
"original": {
@@ -140,11 +177,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1734254970,
"narHash": "sha256-yZzYWWWeOqSFvIirHzY1SJiuSBPmXIYJFhyt+1zkv8A=",
"lastModified": 1695033101,
"narHash": "sha256-RQ4m+ycjdLdass7Hr4+Lzwnjw7wGhcUkKqWiJS3YxPM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d388ee0ec8c623389ab3a7caead258a94cec14de",
"rev": "d941d9491804e0ca01e03468dbf6f8d3a7919a16",
"type": "github"
},
"original": {
@@ -157,11 +194,28 @@
"inputs": {
"apple-silicon": "apple-silicon",
"darwin": "darwin",
"emacs": "emacs",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"whisper": "whisper"
}
},
"rust-overlay": {
"flake": false,
"locked": {
"lastModified": 1686795910,
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -177,27 +231,6 @@
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"apple-silicon",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754847726,
"narHash": "sha256-2vX8QjO5lRsDbNYvN9hVHXLU6oMl+V/PsmIiJREG4rE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "7d81f6fb2e19bf84f1c65135d1060d829fae2408",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"whisper": {
"inputs": {
"flake-utils": "flake-utils",
@@ -205,11 +238,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1743962136,
"narHash": "sha256-YsKxkEGqGE+c0L+k8Vczq9UHpzSktR9/tm3zrF7abzo=",
"lastModified": 1704121968,
"narHash": "sha256-N8FJb+ohJ4Qt/m5RoAbwm3RP4VRjl+hA6PUCfjPhZo8=",
"owner": "Smaug123",
"repo": "whisper.cpp",
"rev": "e1faa8b19ead213f507dbabda45ac54b8765a6eb",
"rev": "04f8e0cdc73abe7c593b2c9405f0f590c51de95a",
"type": "github"
},
"original": {

View File

@@ -14,6 +14,10 @@
# url = "github:Smaug123/nix-darwin/extract";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
};
@@ -24,6 +28,7 @@
outputs = {
darwin,
emacs,
nixpkgs,
home-manager,
apple-silicon,
@@ -36,6 +41,7 @@
};
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];
in let
overlays = [emacs.overlay];
recursiveMerge = attrList: let
f = attrPath:
builtins.zipAttrsWith (n: values:
@@ -53,7 +59,7 @@
capybara = let
system = "x86_64-linux";
in let
pkgs = import nixpkgs {inherit system config;};
pkgs = import nixpkgs {inherit system config overlays;};
in
nixpkgs.lib.nixosSystem {
inherit system;
@@ -83,7 +89,7 @@
earthworm = let
system = "aarch64-linux";
in let
pkgs = import nixpkgs {inherit system config;};
pkgs = import nixpkgs {inherit system config overlays;};
in
nixpkgs.lib.nixosSystem {
inherit system;
@@ -111,7 +117,7 @@
darwinConfigurations = let
system = "aarch64-darwin";
in let
pkgs = import nixpkgs {inherit system config;};
pkgs = import nixpkgs {inherit system config overlays;};
in {
nixpkgs = pkgs;
patrick = darwin.lib.darwinSystem {

View File

@@ -4,6 +4,7 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
@@ -22,7 +23,7 @@
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5BCD-7078";
device = "/dev/disk/by-uuid/9248-31C6";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};

View File

@@ -13,8 +13,6 @@
enable32Bit = true;
};
hardware.bluetooth.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;

View File

@@ -23,15 +23,12 @@
];
programs.vscode = {
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";
"git.openRepositoryInParentFolders" = "always";
};
};
};

View File

@@ -1,28 +0,0 @@
# 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

@@ -5,10 +5,12 @@
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 = {
@@ -24,21 +26,6 @@
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";
}
];
};
@@ -72,6 +59,7 @@
environment.systemPackages = [
pkgs.vim
pkgs.wget
pkgs.mesa-asahi-edge
];
environment.loginShellInit = ''

View File

@@ -29,13 +29,12 @@
imports = [
# ./modules/agda.nix
# ./modules/emacs.nix
./modules/ghostty.nix
./modules/direnv.nix
./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;
@@ -62,7 +61,7 @@
gpg.program = "${nixpkgs.gnupg}/bin/gpg";
user.signingkey =
if machinename == "darwin"
then "6D71064924BE1245"
then "7C97D679CF3BC4F9"
else if machinename == "earthworm"
then "6E8B1BA1148AD7C9"
else if machinename == "capybara"
@@ -77,14 +76,6 @@
push = {
default = "current";
autoSetupRemote = true;
followTags = true;
};
fetch = {
prune = true;
all = true;
};
help = {
autocorrect = "prompt";
};
pull = {
rebase = false;
@@ -92,15 +83,6 @@
init = {
defaultBranch = "main";
};
branch = {
sort = "-committerdate";
};
column = {
ui = "auto";
};
tag = {
sort = "version:refname";
};
advice = {
addIgnoredFile = false;
};
@@ -118,25 +100,19 @@
};
diff = {
colorMoved = "default";
algorithm = "histogram";
renames = true;
};
"protocol.file" = {
allow = "always";
};
url."git@github.com:" = {
insteadOf = "https://github.com/";
};
};
};
programs.vscode = {
enable = true;
package = nixpkgs.vscode;
profiles.default = {
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
enableExtensionUpdateCheck = true;
enableUpdateCheck = true;
package = nixpkgs.vscode;
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
userSettings = {
workbench.colorTheme = "Default";
"files.Exclude" = {
@@ -151,7 +127,6 @@
"explorer.confirmDelete" = false;
};
};
};
services.syncthing = {
enable = true;
@@ -209,6 +184,21 @@
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";
@@ -237,16 +227,15 @@
type = "lua";
}
{
plugin = nixpkgs.vimPlugins.nvim-cmp;
config = builtins.readFile ./nvim/nvim-cmp.lua;
type = "lua";
}
{
plugin = nixpkgs.vimPlugins.cmp-nvim-lsp;
plugin = nixpkgs.vimPlugins.coq_nvim;
config = ''let g:coq_settings = { 'auto_start': 'shut-up', 'xdg': v:true }'';
}
{
plugin = nixpkgs.vimPlugins.rustaceanvim;
}
{
plugin = nixpkgs.vimPlugins.LanguageClient-neovim;
}
{
plugin = nixpkgs.vimPlugins.nvim-dap;
config = builtins.readFile ./nvim/nvim-dap.lua;
@@ -280,28 +269,38 @@
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.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.age
nixpkgs.nodejs
nixpkgs.pyright
nixpkgs.woodpecker-agent
nixpkgs.lynx
nixpkgs.alejandra
nixpkgs.ffmpeg
nixpkgs.bat
nixpkgs.pandoc
@@ -315,13 +314,10 @@
nixpkgs.font-awesome
nixpkgs.gopls
nixpkgs.go
nixpkgs.libiconv
nixpkgs.claude-code
]
++ (
if nixpkgs.stdenv.isLinux
then [
nixpkgs.kdePackages.xwaylandvideobridge
nixpkgs.protonmail-bridge
nixpkgs.pinentry
nixpkgs.signal-desktop
@@ -333,7 +329,7 @@
if machinename == "capybara"
then [
nixpkgs.steam-run
nixpkgs.discord-canary
nixpkgs.discord
nixpkgs.anki-bin
]
else []

View File

@@ -197,7 +197,7 @@
services.gpg-agent = {
enable = nixpkgs.stdenv.isLinux;
pinentry.package = nixpkgs.pinentry-curses;
pinentryPackage = nixpkgs.pinentry-curses;
};
services.swayidle = {enable = true;};

View File

@@ -0,0 +1,19 @@
{pkgs, ...}: {
programs.alacritty = {
enable = true;
settings = {
font = {
normal = {
family = "FiraCode Nerd Font Mono";
};
};
terminal = {shell = "${pkgs.zsh}/bin/zsh";};
};
};
home.packages = [
pkgs.alacritty
pkgs.nerd-fonts.fira-code
pkgs.nerd-fonts.droid-sans-mono
];
}

View File

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

View File

@@ -1,18 +0,0 @@
{pkgs, ...}: {
programs.ghostty = {
enable = pkgs.stdenv.isLinux;
enableZshIntegration = true;
settings = {
keybind = [
"shift+enter=text:\\n"
];
};
};
home.packages =
if pkgs.stdenv.isLinux
then [
pkgs.ghostty
]
else [];
}

View File

@@ -49,7 +49,7 @@ in {
accounts.email.accounts."Gmail" = let
address = (deobfuscate "AFTN0cWdh12c") + "gmail.com";
in {
notmuch.enable = false;
notmuch.enable = true;
neomutt = {
enable = true;
};
@@ -82,7 +82,7 @@ in {
accounts.email.accounts."BTInternet" = let
address = (deobfuscate "z5WZ2VGdz5yajlmc0FGc") + "@btinternet.com";
in {
notmuch.enable = false;
notmuch.enable = true;
neomutt = {
enable = true;
};
@@ -116,7 +116,7 @@ in {
accounts.email.accounts."Proton" = let
address = deobfuscate "gAya15ybj5ycuVmdlR3crNWayRXYwB0ajlmc0FGc";
in {
# notmuch.enable = true;
notmuch.enable = true;
neomutt = {
enable = true;
};
@@ -164,7 +164,6 @@ in {
};
programs.neomutt = {
enable = true;
package = pkgs.neomutt.override {withNotmuch = false;};
extraConfig = ''
set use_threads=threads sort=last-date sort_aux=date
'';
@@ -172,12 +171,12 @@ in {
vimKeys = true;
};
programs.notmuch.enable = false;
programs.notmuch.enable = true;
home.file.".mailcap".source = ./mail/mailcap;
home.packages = [
# pkgs.notmuch
pkgs.notmuch
pkgs.lynx
];
}

View File

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

View File

@@ -14,26 +14,6 @@
extraConfig = ''
set-option -sa terminal-features ',xterm-256color:RGB'
set -g default-command "exec ${pkgs.zsh}/bin/zsh"
# Vi mode
set-window-option -g mode-keys vi
# Use v to begin selection in copy mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Use Shift+V to select line
bind-key -T copy-mode-vi V send-keys -X select-line
# Use y to yank to clipboard
${
if pkgs.stdenv.isDarwin
then ''
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
''
else ''
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${pkgs.wl-clipboard}/bin/wl-copy"
''
}
'';
};
}

View File

@@ -16,7 +16,7 @@
vim = "nvim";
view = "vim -R";
};
initContent = builtins.readFile ./zsh/zshrc;
initExtra = builtins.readFile ./zsh/zshrc;
};
programs.fzf.enableZshIntegration = true;

View File

@@ -24,13 +24,12 @@ precmd_functions+=(prompt_custom)
export WORDCHARS=''
export OPENAI_API_KEY=$(cat ~/.secrets/openai.txt)
export ANTHROPIC_API_KEY=$(cat ~/.secrets/anthropic.txt)
autoload edit-command-line
zle -N edit-command-line
bindkey -e
bindkey '^X^E' edit-command-line
bindkey -e
PATH="$PATH:$HOME/.cargo/bin"
if [[ -z "$TMUX" ]]; then
tmux new-session -A -s default

View File

@@ -1,4 +1,4 @@
local nvim_cmp = require("cmp")
local coq = require("coq")
-- Using rustaceanvim means we shouldn't set up the LSP for Rust manually.
-- Similarly csharp_ls is unnecessary given roslyn.nvim
@@ -34,12 +34,10 @@ 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,
cmd = { "vscode-json-language-server", "--stdio" },
cmd = { "vscode-json-languageserver", "--stdio" },
settings = {
json = {
validate = { enable = true },
@@ -89,8 +87,7 @@ require("lspconfig")["lua_ls"].setup({
},
})
require("lspconfig").pyright.setup({
capabilities = capabilities,
require("lspconfig").pyright.setup(coq.lsp_ensure_capabilities({
handlers = {
["textDocument/publishDiagnostics"] = function(...)
vim.lsp.diagnostic.on_publish_diagnostics(...)
@@ -100,10 +97,9 @@ require("lspconfig").pyright.setup({
vim.api.nvim_set_current_win(window)
end,
},
})
}))
require("lspconfig").nil_ls.setup({
capabilities = capabilities,
require("lspconfig").nil_ls.setup(coq.lsp_ensure_capabilities({
settings = {
nix = {
flake = {
@@ -111,7 +107,7 @@ require("lspconfig").nil_ls.setup({
},
},
},
})
}))
function ToggleLocList()
local winid = vim.fn.getloclist(0, { winid = 0 }).winid

View File

@@ -1,45 +0,0 @@
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

@@ -12,6 +12,7 @@ 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