25 Commits

Author SHA1 Message Date
Patrick Stevens
2d09c607d2 Switch boot partition (#126) 2025-09-06 15:21:17 +01:00
dependabot[bot]
d56963e330 Bump actions/checkout from 4 to 5 (#125) 2025-08-18 08:14:48 +01:00
Patrick Stevens
69ef174f4b Add ghostty module (#124) 2025-07-25 16:09:15 +01:00
Patrick Stevens
7a8a0d8364 Shift-enter in ghostty (#123) 2025-07-16 20:05:09 +00:00
Patrick Stevens
7ebe1d3347 Tmux copy-paste (#122) 2025-07-16 20:49:53 +01:00
Patrick Stevens
544ab65c3b Switcheroo on github urls (#121) 2025-07-16 19:16:36 +00:00
Patrick Stevens
0869976967 Fix keybinding (#120) 2025-07-16 18:41:01 +00:00
Patrick Stevens
8e2b10b474 Fix a deprecation (#119) 2025-07-05 21:36:26 +01:00
Patrick Stevens
7ebad6eb45 Bump flake (#118) 2025-07-05 19:29:34 +01:00
Patrick Stevens
91629b826e Bump flake (#117) 2025-05-25 00:07:22 +01:00
Patrick Stevens
0a024c20c5 Remove emacs (#116) 2025-05-23 13:29:50 +01:00
Patrick Stevens
c95b819054 Bump flake (#115) 2025-04-27 11:41:05 +01:00
Patrick Stevens
3a76416843 Update GPG key (#114) 2025-04-15 21:52:01 +00:00
dependabot[bot]
e03ae63070 Bump cachix/install-nix-action from 30 to 31 (#113) 2025-03-17 07:41:11 +00:00
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
24 changed files with 277 additions and 195 deletions

1
.envrc Normal file
View File

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

View File

@@ -11,9 +11,9 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
uses: "actions/checkout@v5"
- name: "Install Nix"
uses: "cachix/install-nix-action@v30"
uses: "cachix/install-nix-action@v31"
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,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;
@@ -134,4 +127,6 @@ in {
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
system.primaryUser = "patrick";
}

131
flake.lock generated
View File

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

View File

@@ -14,10 +14,6 @@
# 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";
};
@@ -28,7 +24,6 @@
outputs = {
darwin,
emacs,
nixpkgs,
home-manager,
apple-silicon,
@@ -41,7 +36,6 @@
};
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];
in let
overlays = [emacs.overlay];
recursiveMerge = attrList: let
f = attrPath:
builtins.zipAttrsWith (n: values:
@@ -59,7 +53,7 @@
capybara = let
system = "x86_64-linux";
in let
pkgs = import nixpkgs {inherit system config overlays;};
pkgs = import nixpkgs {inherit system config;};
in
nixpkgs.lib.nixosSystem {
inherit system;
@@ -89,7 +83,7 @@
earthworm = let
system = "aarch64-linux";
in let
pkgs = import nixpkgs {inherit system config overlays;};
pkgs = import nixpkgs {inherit system config;};
in
nixpkgs.lib.nixosSystem {
inherit system;
@@ -117,7 +111,7 @@
darwinConfigurations = let
system = "aarch64-darwin";
in let
pkgs = import nixpkgs {inherit system config overlays;};
pkgs = import nixpkgs {inherit system config;};
in {
nixpkgs = pkgs;
patrick = darwin.lib.darwinSystem {

View File

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

View File

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

View File

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

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

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

View File

@@ -29,12 +29,13 @@
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;
@@ -61,7 +62,7 @@
gpg.program = "${nixpkgs.gnupg}/bin/gpg";
user.signingkey =
if machinename == "darwin"
then "7C97D679CF3BC4F9"
then "6D71064924BE1245"
else if machinename == "earthworm"
then "6E8B1BA1148AD7C9"
else if machinename == "capybara"
@@ -76,6 +77,14 @@
push = {
default = "current";
autoSetupRemote = true;
followTags = true;
};
fetch = {
prune = true;
all = true;
};
help = {
autocorrect = "prompt";
};
pull = {
rebase = false;
@@ -83,6 +92,15 @@
init = {
defaultBranch = "main";
};
branch = {
sort = "-committerdate";
};
column = {
ui = "auto";
};
tag = {
sort = "version:refname";
};
advice = {
addIgnoredFile = false;
};
@@ -100,31 +118,38 @@
};
diff = {
colorMoved = "default";
algorithm = "histogram";
renames = true;
};
"protocol.file" = {
allow = "always";
};
url."git@github.com:" = {
insteadOf = "https://github.com/";
};
};
};
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 +209,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,15 +237,16 @@
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;
}
{
plugin = nixpkgs.vimPlugins.LanguageClient-neovim;
}
{
plugin = nixpkgs.vimPlugins.nvim-dap;
config = builtins.readFile ./nvim/nvim-dap.lua;
@@ -269,38 +280,28 @@
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
@@ -314,10 +315,13 @@
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
@@ -329,7 +333,7 @@
if machinename == "capybara"
then [
nixpkgs.steam-run
nixpkgs.discord
nixpkgs.discord-canary
nixpkgs.anki-bin
]
else []

View File

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

View File

@@ -1,19 +0,0 @@
{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,5 +6,6 @@
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
# stdlib = builtins.readFile ../direnv/envrc;
};
}

View File

@@ -0,0 +1,18 @@
{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 = true;
notmuch.enable = false;
neomutt = {
enable = true;
};
@@ -82,7 +82,7 @@ in {
accounts.email.accounts."BTInternet" = let
address = (deobfuscate "z5WZ2VGdz5yajlmc0FGc") + "@btinternet.com";
in {
notmuch.enable = true;
notmuch.enable = false;
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,6 +164,7 @@ in {
};
programs.neomutt = {
enable = true;
package = pkgs.neomutt.override {withNotmuch = false;};
extraConfig = ''
set use_threads=threads sort=last-date sort_aux=date
'';
@@ -171,12 +172,12 @@ in {
vimKeys = true;
};
programs.notmuch.enable = true;
programs.notmuch.enable = false;
home.file.".mailcap".source = ./mail/mailcap;
home.packages = [
pkgs.notmuch
# pkgs.notmuch
pkgs.lynx
];
}

View File

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

View File

@@ -14,6 +14,26 @@
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";
};
initExtra = builtins.readFile ./zsh/zshrc;
initContent = builtins.readFile ./zsh/zshrc;
};
programs.fzf.enableZshIntegration = true;

View File

@@ -24,12 +24,13 @@ 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 '^X^E' edit-command-line
bindkey -e
PATH="$PATH:$HOME/.cargo/bin"
bindkey '^X^E' edit-command-line
if [[ -z "$TMUX" ]]; then
tmux new-session -A -s default

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
@@ -34,10 +34,12 @@ 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-languageserver", "--stdio" },
cmd = { "vscode-json-language-server", "--stdio" },
settings = {
json = {
validate = { enable = true },
@@ -87,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(...)
@@ -97,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 = {
@@ -107,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

@@ -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