mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-12 01:48:42 +00:00
Compare commits
25 Commits
56c3345584
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
2d09c607d2 | ||
|
d56963e330 | ||
|
69ef174f4b | ||
|
7a8a0d8364 | ||
|
7ebe1d3347 | ||
|
544ab65c3b | ||
|
0869976967 | ||
|
8e2b10b474 | ||
|
7ebad6eb45 | ||
|
91629b826e | ||
|
0a024c20c5 | ||
|
c95b819054 | ||
|
3a76416843 | ||
|
e03ae63070 | ||
|
c1ca9a27e9 | ||
|
2a371ff957 | ||
|
58c06a2a70 | ||
|
28dab00b65 | ||
|
ca85c8de24 | ||
|
c45222500f | ||
|
04fab0bad0 | ||
|
04079d1082 | ||
|
6973cbbd99 | ||
|
2346cbb7ce | ||
|
247c3419a8 |
4
.github/workflows/lint.yaml
vendored
4
.github/workflows/lint.yaml
vendored
@@ -11,9 +11,9 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
uses: "actions/checkout@v4"
|
uses: "actions/checkout@v5"
|
||||||
- name: "Install Nix"
|
- 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 }}" }
|
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||||
- name: "Check flake"
|
- name: "Check flake"
|
||||||
run: "nix flake check --all-systems"
|
run: "nix flake check --all-systems"
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ result
|
|||||||
bin/
|
bin/
|
||||||
obj/
|
obj/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.direnv/
|
||||||
|
@@ -1,16 +1,10 @@
|
|||||||
{pkgs, ...}: let
|
{pkgs, ...}: let
|
||||||
mbsync = import ./mbsync.nix {inherit pkgs;};
|
mbsync = import ./mbsync.nix {inherit pkgs;};
|
||||||
in {
|
in {
|
||||||
nix.useDaemon = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search by name, run:
|
# List packages installed in system profile. To search by name, run:
|
||||||
# $ nix-env -qaP | grep wget
|
# $ nix-env -qaP | grep wget
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.alacritty
|
|
||||||
pkgs.rustup
|
|
||||||
pkgs.libiconv
|
|
||||||
pkgs.clang
|
|
||||||
pkgs.python3
|
pkgs.python3
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -111,7 +105,6 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Auto upgrade nix package and the daemon service.
|
# Auto upgrade nix package and the daemon service.
|
||||||
services.nix-daemon.enable = true;
|
|
||||||
nix.package = pkgs.nixVersions.stable;
|
nix.package = pkgs.nixVersions.stable;
|
||||||
nix.gc.automatic = true;
|
nix.gc.automatic = true;
|
||||||
|
|
||||||
@@ -134,4 +127,6 @@ in {
|
|||||||
# Used for backwards compatibility, please read the changelog before changing.
|
# Used for backwards compatibility, please read the changelog before changing.
|
||||||
# $ darwin-rebuild changelog
|
# $ darwin-rebuild changelog
|
||||||
system.stateVersion = 4;
|
system.stateVersion = 4;
|
||||||
|
|
||||||
|
system.primaryUser = "patrick";
|
||||||
}
|
}
|
||||||
|
119
flake.lock
generated
119
flake.lock
generated
@@ -4,14 +4,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"rust-overlay": "rust-overlay"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733377410,
|
"lastModified": 1756110286,
|
||||||
"narHash": "sha256-tZ9JEAaHIs3TPdRZeZzHsnJmUilkcnVaUTvyprbRb1A=",
|
"narHash": "sha256-NE0HwcQCQTgM+HuYqmiemPf/5e+3fjwowceAyJj+ikU=",
|
||||||
"owner": "tpwrules",
|
"owner": "tpwrules",
|
||||||
"repo": "nixos-apple-silicon",
|
"repo": "nixos-apple-silicon",
|
||||||
"rev": "e8c07c3ae199b55a8c1c35a7c067c5cef9c7e929",
|
"rev": "b99bf9bf7445416fe55da09034fc4a6cd733805c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733570843,
|
"lastModified": 1757015938,
|
||||||
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
|
"narHash": "sha256-1qBXNK/QxEjCqIoA2DxWn5gqM8rVxt+OxKodXu1GLTY=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
|
"rev": "eaacfa1101b84225491d2ceae9549366d74dc214",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -41,34 +41,13 @@
|
|||||||
"type": "github"
|
"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": {
|
"flake-compat": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1688025799,
|
"lastModified": 1746162366,
|
||||||
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -102,11 +81,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734093295,
|
"lastModified": 1757075491,
|
||||||
"narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=",
|
"narHash": "sha256-a+NMGl5tcvm+hyfSG2DlVPa8nZLpsumuRj1FfcKb2mQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8",
|
"rev": "f56bf065f9abedc7bc15e1f2454aa5c8edabaacf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -129,11 +108,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733212471,
|
"lastModified": 1755615617,
|
||||||
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
|
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
|
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -143,29 +122,13 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733935885,
|
"lastModified": 1756911493,
|
||||||
"narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=",
|
"narHash": "sha256-6n/n1GZQ/vi+LhFXMSyoseKdNfc2QQaSBXJdgamrbkE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5a48e3c2e435e95103d56590188cfed7b70e108c",
|
"rev": "c6a788f552b7b7af703b1a29802a7233c0067908",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -194,28 +157,11 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"apple-silicon": "apple-silicon",
|
"apple-silicon": "apple-silicon",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"emacs": "emacs",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"whisper": "whisper"
|
"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": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
@@ -231,6 +177,27 @@
|
|||||||
"type": "github"
|
"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": {
|
"whisper": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
@@ -238,11 +205,11 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734268803,
|
"lastModified": 1743962136,
|
||||||
"narHash": "sha256-KDfUObdMdMSM7prp2QO4f5DRCv9Z2TSCZEL0kFEBzN4=",
|
"narHash": "sha256-YsKxkEGqGE+c0L+k8Vczq9UHpzSktR9/tm3zrF7abzo=",
|
||||||
"owner": "Smaug123",
|
"owner": "Smaug123",
|
||||||
"repo": "whisper.cpp",
|
"repo": "whisper.cpp",
|
||||||
"rev": "8cbc79c799212037e1c7b45548179f9548ea77a5",
|
"rev": "e1faa8b19ead213f507dbabda45ac54b8765a6eb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
12
flake.nix
12
flake.nix
@@ -14,10 +14,6 @@
|
|||||||
# url = "github:Smaug123/nix-darwin/extract";
|
# url = "github:Smaug123/nix-darwin/extract";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
emacs = {
|
|
||||||
url = "github:nix-community/emacs-overlay";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
apple-silicon = {
|
apple-silicon = {
|
||||||
url = "github:tpwrules/nixos-apple-silicon";
|
url = "github:tpwrules/nixos-apple-silicon";
|
||||||
};
|
};
|
||||||
@@ -28,7 +24,6 @@
|
|||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
darwin,
|
darwin,
|
||||||
emacs,
|
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
apple-silicon,
|
apple-silicon,
|
||||||
@@ -41,7 +36,6 @@
|
|||||||
};
|
};
|
||||||
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];
|
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];
|
||||||
in let
|
in let
|
||||||
overlays = [emacs.overlay];
|
|
||||||
recursiveMerge = attrList: let
|
recursiveMerge = attrList: let
|
||||||
f = attrPath:
|
f = attrPath:
|
||||||
builtins.zipAttrsWith (n: values:
|
builtins.zipAttrsWith (n: values:
|
||||||
@@ -59,7 +53,7 @@
|
|||||||
capybara = let
|
capybara = let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in let
|
in let
|
||||||
pkgs = import nixpkgs {inherit system config overlays;};
|
pkgs = import nixpkgs {inherit system config;};
|
||||||
in
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
@@ -89,7 +83,7 @@
|
|||||||
earthworm = let
|
earthworm = let
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
in let
|
in let
|
||||||
pkgs = import nixpkgs {inherit system config overlays;};
|
pkgs = import nixpkgs {inherit system config;};
|
||||||
in
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
@@ -117,7 +111,7 @@
|
|||||||
darwinConfigurations = let
|
darwinConfigurations = let
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
in let
|
in let
|
||||||
pkgs = import nixpkgs {inherit system config overlays;};
|
pkgs = import nixpkgs {inherit system config;};
|
||||||
in {
|
in {
|
||||||
nixpkgs = pkgs;
|
nixpkgs = pkgs;
|
||||||
patrick = darwin.lib.darwinSystem {
|
patrick = darwin.lib.darwinSystem {
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
@@ -23,7 +22,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/9248-31C6";
|
device = "/dev/disk/by-uuid/5BCD-7078";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = ["fmask=0022" "dmask=0022"];
|
options = ["fmask=0022" "dmask=0022"];
|
||||||
};
|
};
|
||||||
|
@@ -13,6 +13,8 @@
|
|||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@@ -23,12 +23,15 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
userSettings = {
|
profiles.default = {
|
||||||
"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
|
userSettings = {
|
||||||
"lean.executablePath" = "/Users/${username}/.elan/toolchains/stable/bin/lean";
|
"lean.leanpkgPath" = "/Users/${username}/.elan/toolchains/stable/bin/leanpkg";
|
||||||
"lean.memoryLimit" = 16384;
|
"lean.executablePath" = "/Users/${username}/.elan/toolchains/stable/bin/lean";
|
||||||
"latex-workshop.view.pdf.viewer" = "tab";
|
"lean.memoryLimit" = 16384;
|
||||||
"lean4.toolchainPath" = "/Users/${username}/.elan/toolchains/leanprover--lean4---nightly-2022-12-16";
|
"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
28
home-manager/direnv/envrc
Normal 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
|
||||||
|
}
|
@@ -5,12 +5,10 @@
|
|||||||
|
|
||||||
hardware.asahi.peripheralFirmwareDirectory = ./../firmware;
|
hardware.asahi.peripheralFirmwareDirectory = ./../firmware;
|
||||||
hardware.asahi = {
|
hardware.asahi = {
|
||||||
useExperimentalGPUDriver = true;
|
|
||||||
experimentalGPUInstallMode = "overlay";
|
|
||||||
setupAsahiSound = true;
|
setupAsahiSound = true;
|
||||||
withRust = true;
|
|
||||||
};
|
};
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
services.actkbd = {
|
services.actkbd = {
|
||||||
@@ -26,6 +24,21 @@
|
|||||||
events = ["key"];
|
events = ["key"];
|
||||||
command = "${pkgs.light}/bin/light -U 10";
|
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 = [
|
environment.systemPackages = [
|
||||||
pkgs.vim
|
pkgs.vim
|
||||||
pkgs.wget
|
pkgs.wget
|
||||||
pkgs.mesa-asahi-edge
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.loginShellInit = ''
|
environment.loginShellInit = ''
|
||||||
|
@@ -29,12 +29,13 @@
|
|||||||
imports = [
|
imports = [
|
||||||
# ./modules/agda.nix
|
# ./modules/agda.nix
|
||||||
# ./modules/emacs.nix
|
# ./modules/emacs.nix
|
||||||
|
./modules/ghostty.nix
|
||||||
./modules/direnv.nix
|
./modules/direnv.nix
|
||||||
./modules/tmux.nix
|
./modules/tmux.nix
|
||||||
./modules/zsh.nix
|
./modules/zsh.nix
|
||||||
./modules/ripgrep.nix
|
./modules/ripgrep.nix
|
||||||
./modules/alacritty.nix
|
|
||||||
./modules/rust.nix
|
./modules/rust.nix
|
||||||
|
./modules/posix-sh.nix
|
||||||
(import ./modules/mail.nix
|
(import ./modules/mail.nix
|
||||||
{
|
{
|
||||||
inherit mbsync secretsPath;
|
inherit mbsync secretsPath;
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
gpg.program = "${nixpkgs.gnupg}/bin/gpg";
|
gpg.program = "${nixpkgs.gnupg}/bin/gpg";
|
||||||
user.signingkey =
|
user.signingkey =
|
||||||
if machinename == "darwin"
|
if machinename == "darwin"
|
||||||
then "7C97D679CF3BC4F9"
|
then "6D71064924BE1245"
|
||||||
else if machinename == "earthworm"
|
else if machinename == "earthworm"
|
||||||
then "6E8B1BA1148AD7C9"
|
then "6E8B1BA1148AD7C9"
|
||||||
else if machinename == "capybara"
|
else if machinename == "capybara"
|
||||||
@@ -76,6 +77,14 @@
|
|||||||
push = {
|
push = {
|
||||||
default = "current";
|
default = "current";
|
||||||
autoSetupRemote = true;
|
autoSetupRemote = true;
|
||||||
|
followTags = true;
|
||||||
|
};
|
||||||
|
fetch = {
|
||||||
|
prune = true;
|
||||||
|
all = true;
|
||||||
|
};
|
||||||
|
help = {
|
||||||
|
autocorrect = "prompt";
|
||||||
};
|
};
|
||||||
pull = {
|
pull = {
|
||||||
rebase = false;
|
rebase = false;
|
||||||
@@ -83,6 +92,15 @@
|
|||||||
init = {
|
init = {
|
||||||
defaultBranch = "main";
|
defaultBranch = "main";
|
||||||
};
|
};
|
||||||
|
branch = {
|
||||||
|
sort = "-committerdate";
|
||||||
|
};
|
||||||
|
column = {
|
||||||
|
ui = "auto";
|
||||||
|
};
|
||||||
|
tag = {
|
||||||
|
sort = "version:refname";
|
||||||
|
};
|
||||||
advice = {
|
advice = {
|
||||||
addIgnoredFile = false;
|
addIgnoredFile = false;
|
||||||
};
|
};
|
||||||
@@ -100,31 +118,38 @@
|
|||||||
};
|
};
|
||||||
diff = {
|
diff = {
|
||||||
colorMoved = "default";
|
colorMoved = "default";
|
||||||
|
algorithm = "histogram";
|
||||||
|
renames = true;
|
||||||
};
|
};
|
||||||
"protocol.file" = {
|
"protocol.file" = {
|
||||||
allow = "always";
|
allow = "always";
|
||||||
};
|
};
|
||||||
|
url."git@github.com:" = {
|
||||||
|
insteadOf = "https://github.com/";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableExtensionUpdateCheck = true;
|
|
||||||
enableUpdateCheck = true;
|
|
||||||
package = nixpkgs.vscode;
|
package = nixpkgs.vscode;
|
||||||
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
|
profiles.default = {
|
||||||
userSettings = {
|
extensions = import ./vscode-extensions.nix {pkgs = nixpkgs;};
|
||||||
workbench.colorTheme = "Default";
|
enableExtensionUpdateCheck = true;
|
||||||
"files.Exclude" = {
|
enableUpdateCheck = true;
|
||||||
"**/.git" = true;
|
userSettings = {
|
||||||
"**/.DS_Store" = true;
|
workbench.colorTheme = "Default";
|
||||||
"**/Thumbs.db" = true;
|
"files.Exclude" = {
|
||||||
"**/*.olean" = true;
|
"**/.git" = true;
|
||||||
"**/result" = 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;
|
config = builtins.readFile ./nvim/roslyn-nvim.lua;
|
||||||
type = "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
|
plugin = let
|
||||||
name = "venv-selector.nvim";
|
name = "venv-selector.nvim";
|
||||||
@@ -227,15 +237,16 @@
|
|||||||
type = "lua";
|
type = "lua";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = nixpkgs.vimPlugins.coq_nvim;
|
plugin = nixpkgs.vimPlugins.nvim-cmp;
|
||||||
config = ''let g:coq_settings = { 'auto_start': 'shut-up', 'xdg': v:true }'';
|
config = builtins.readFile ./nvim/nvim-cmp.lua;
|
||||||
|
type = "lua";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = nixpkgs.vimPlugins.cmp-nvim-lsp;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = nixpkgs.vimPlugins.rustaceanvim;
|
plugin = nixpkgs.vimPlugins.rustaceanvim;
|
||||||
}
|
}
|
||||||
{
|
|
||||||
plugin = nixpkgs.vimPlugins.LanguageClient-neovim;
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
plugin = nixpkgs.vimPlugins.nvim-dap;
|
plugin = nixpkgs.vimPlugins.nvim-dap;
|
||||||
config = builtins.readFile ./nvim/nvim-dap.lua;
|
config = builtins.readFile ./nvim/nvim-dap.lua;
|
||||||
@@ -269,38 +280,28 @@
|
|||||||
nixpkgs.difftastic
|
nixpkgs.difftastic
|
||||||
nixpkgs.syncthing
|
nixpkgs.syncthing
|
||||||
nixpkgs.nodePackages_latest.dockerfile-language-server-nodejs
|
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.nodePackages_latest.vscode-langservers-extracted
|
||||||
nixpkgs.hadolint
|
nixpkgs.hadolint
|
||||||
nixpkgs.yaml-language-server
|
nixpkgs.yaml-language-server
|
||||||
nixpkgs.csharp-ls
|
|
||||||
nixpkgs.netcoredbg
|
nixpkgs.netcoredbg
|
||||||
nixpkgs.nil
|
nixpkgs.nil
|
||||||
nixpkgs.fsautocomplete
|
nixpkgs.fsautocomplete
|
||||||
nixpkgs.wget
|
nixpkgs.wget
|
||||||
nixpkgs.yt-dlp
|
nixpkgs.yt-dlp
|
||||||
nixpkgs.cmake
|
|
||||||
nixpkgs.gnumake
|
|
||||||
nixpkgs.gcc
|
|
||||||
nixpkgs.lldb
|
nixpkgs.lldb
|
||||||
nixpkgs.hledger
|
nixpkgs.hledger
|
||||||
nixpkgs.hledger-web
|
nixpkgs.hledger-web
|
||||||
dotnet
|
dotnet
|
||||||
nixpkgs.elan
|
nixpkgs.elan
|
||||||
nixpkgs.coreutils-prefixed
|
nixpkgs.coreutils-prefixed
|
||||||
nixpkgs.shellcheck
|
|
||||||
nixpkgs.universal-ctags
|
|
||||||
nixpkgs.asciinema
|
nixpkgs.asciinema
|
||||||
nixpkgs.git-lfs
|
nixpkgs.git-lfs
|
||||||
nixpkgs.imagemagick
|
nixpkgs.imagemagick
|
||||||
nixpkgs.nixpkgs-fmt
|
nixpkgs.nixpkgs-fmt
|
||||||
nixpkgs.age
|
nixpkgs.age
|
||||||
nixpkgs.nodejs
|
|
||||||
nixpkgs.pyright
|
nixpkgs.pyright
|
||||||
nixpkgs.woodpecker-agent
|
nixpkgs.woodpecker-agent
|
||||||
nixpkgs.lynx
|
nixpkgs.lynx
|
||||||
nixpkgs.alejandra
|
|
||||||
nixpkgs.ffmpeg
|
nixpkgs.ffmpeg
|
||||||
nixpkgs.bat
|
nixpkgs.bat
|
||||||
nixpkgs.pandoc
|
nixpkgs.pandoc
|
||||||
@@ -314,10 +315,13 @@
|
|||||||
nixpkgs.font-awesome
|
nixpkgs.font-awesome
|
||||||
nixpkgs.gopls
|
nixpkgs.gopls
|
||||||
nixpkgs.go
|
nixpkgs.go
|
||||||
|
nixpkgs.libiconv
|
||||||
|
nixpkgs.claude-code
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
if nixpkgs.stdenv.isLinux
|
if nixpkgs.stdenv.isLinux
|
||||||
then [
|
then [
|
||||||
|
nixpkgs.kdePackages.xwaylandvideobridge
|
||||||
nixpkgs.protonmail-bridge
|
nixpkgs.protonmail-bridge
|
||||||
nixpkgs.pinentry
|
nixpkgs.pinentry
|
||||||
nixpkgs.signal-desktop
|
nixpkgs.signal-desktop
|
||||||
@@ -329,7 +333,7 @@
|
|||||||
if machinename == "capybara"
|
if machinename == "capybara"
|
||||||
then [
|
then [
|
||||||
nixpkgs.steam-run
|
nixpkgs.steam-run
|
||||||
nixpkgs.discord
|
nixpkgs.discord-canary
|
||||||
nixpkgs.anki-bin
|
nixpkgs.anki-bin
|
||||||
]
|
]
|
||||||
else []
|
else []
|
||||||
|
@@ -197,7 +197,7 @@
|
|||||||
|
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = nixpkgs.stdenv.isLinux;
|
enable = nixpkgs.stdenv.isLinux;
|
||||||
pinentryPackage = nixpkgs.pinentry-curses;
|
pinentry.package = nixpkgs.pinentry-curses;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.swayidle = {enable = true;};
|
services.swayidle = {enable = true;};
|
||||||
|
@@ -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
|
|
||||||
];
|
|
||||||
}
|
|
@@ -6,5 +6,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
|
# stdlib = builtins.readFile ../direnv/envrc;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
18
home-manager/modules/ghostty.nix
Normal file
18
home-manager/modules/ghostty.nix
Normal 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 [];
|
||||||
|
}
|
@@ -49,7 +49,7 @@ in {
|
|||||||
accounts.email.accounts."Gmail" = let
|
accounts.email.accounts."Gmail" = let
|
||||||
address = (deobfuscate "AFTN0cWdh12c") + "gmail.com";
|
address = (deobfuscate "AFTN0cWdh12c") + "gmail.com";
|
||||||
in {
|
in {
|
||||||
notmuch.enable = true;
|
notmuch.enable = false;
|
||||||
neomutt = {
|
neomutt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
@@ -82,7 +82,7 @@ in {
|
|||||||
accounts.email.accounts."BTInternet" = let
|
accounts.email.accounts."BTInternet" = let
|
||||||
address = (deobfuscate "z5WZ2VGdz5yajlmc0FGc") + "@btinternet.com";
|
address = (deobfuscate "z5WZ2VGdz5yajlmc0FGc") + "@btinternet.com";
|
||||||
in {
|
in {
|
||||||
notmuch.enable = true;
|
notmuch.enable = false;
|
||||||
neomutt = {
|
neomutt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
@@ -116,7 +116,7 @@ in {
|
|||||||
accounts.email.accounts."Proton" = let
|
accounts.email.accounts."Proton" = let
|
||||||
address = deobfuscate "gAya15ybj5ycuVmdlR3crNWayRXYwB0ajlmc0FGc";
|
address = deobfuscate "gAya15ybj5ycuVmdlR3crNWayRXYwB0ajlmc0FGc";
|
||||||
in {
|
in {
|
||||||
notmuch.enable = true;
|
# notmuch.enable = true;
|
||||||
neomutt = {
|
neomutt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
@@ -164,6 +164,7 @@ in {
|
|||||||
};
|
};
|
||||||
programs.neomutt = {
|
programs.neomutt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.neomutt.override {withNotmuch = false;};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set use_threads=threads sort=last-date sort_aux=date
|
set use_threads=threads sort=last-date sort_aux=date
|
||||||
'';
|
'';
|
||||||
@@ -171,12 +172,12 @@ in {
|
|||||||
vimKeys = true;
|
vimKeys = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.notmuch.enable = true;
|
programs.notmuch.enable = false;
|
||||||
|
|
||||||
home.file.".mailcap".source = ./mail/mailcap;
|
home.file.".mailcap".source = ./mail/mailcap;
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.notmuch
|
# pkgs.notmuch
|
||||||
pkgs.lynx
|
pkgs.lynx
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
6
home-manager/modules/posix-sh.nix
Normal file
6
home-manager/modules/posix-sh.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = [
|
||||||
|
pkgs.shellcheck
|
||||||
|
pkgs.nodePackages_latest.bash-language-server
|
||||||
|
];
|
||||||
|
}
|
@@ -14,6 +14,26 @@
|
|||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||||
set -g default-command "exec ${pkgs.zsh}/bin/zsh"
|
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"
|
||||||
|
''
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
vim = "nvim";
|
vim = "nvim";
|
||||||
view = "vim -R";
|
view = "vim -R";
|
||||||
};
|
};
|
||||||
initExtra = builtins.readFile ./zsh/zshrc;
|
initContent = builtins.readFile ./zsh/zshrc;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fzf.enableZshIntegration = true;
|
programs.fzf.enableZshIntegration = true;
|
||||||
|
@@ -24,12 +24,13 @@ precmd_functions+=(prompt_custom)
|
|||||||
|
|
||||||
export WORDCHARS=''
|
export WORDCHARS=''
|
||||||
|
|
||||||
|
export OPENAI_API_KEY=$(cat ~/.secrets/openai.txt)
|
||||||
|
export ANTHROPIC_API_KEY=$(cat ~/.secrets/anthropic.txt)
|
||||||
|
|
||||||
autoload edit-command-line
|
autoload edit-command-line
|
||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
bindkey '^X^E' edit-command-line
|
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
bindkey '^X^E' edit-command-line
|
||||||
PATH="$PATH:$HOME/.cargo/bin"
|
|
||||||
|
|
||||||
if [[ -z "$TMUX" ]]; then
|
if [[ -z "$TMUX" ]]; then
|
||||||
tmux new-session -A -s default
|
tmux new-session -A -s default
|
||||||
|
@@ -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.
|
-- Using rustaceanvim means we shouldn't set up the LSP for Rust manually.
|
||||||
-- Similarly csharp_ls is unnecessary given roslyn.nvim
|
-- Similarly csharp_ls is unnecessary given roslyn.nvim
|
||||||
@@ -34,10 +34,12 @@ require("lspconfig")["yamlls"].setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||||
|
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
require("lspconfig")["jsonls"].setup({
|
require("lspconfig")["jsonls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
cmd = { "vscode-json-languageserver", "--stdio" },
|
cmd = { "vscode-json-language-server", "--stdio" },
|
||||||
settings = {
|
settings = {
|
||||||
json = {
|
json = {
|
||||||
validate = { enable = true },
|
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 = {
|
handlers = {
|
||||||
["textDocument/publishDiagnostics"] = function(...)
|
["textDocument/publishDiagnostics"] = function(...)
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics(...)
|
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)
|
vim.api.nvim_set_current_win(window)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}))
|
})
|
||||||
|
|
||||||
require("lspconfig").nil_ls.setup(coq.lsp_ensure_capabilities({
|
require("lspconfig").nil_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
nix = {
|
nix = {
|
||||||
flake = {
|
flake = {
|
||||||
@@ -107,7 +111,7 @@ require("lspconfig").nil_ls.setup(coq.lsp_ensure_capabilities({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}))
|
})
|
||||||
|
|
||||||
function ToggleLocList()
|
function ToggleLocList()
|
||||||
local winid = vim.fn.getloclist(0, { winid = 0 }).winid
|
local winid = vim.fn.getloclist(0, { winid = 0 }).winid
|
||||||
|
45
home-manager/nvim/nvim-cmp.lua
Normal file
45
home-manager/nvim/nvim-cmp.lua
Normal 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 },
|
||||||
|
})
|
@@ -12,7 +12,6 @@ with pkgs.vscode-extensions;
|
|||||||
rust-lang.rust-analyzer
|
rust-lang.rust-analyzer
|
||||||
github.vscode-pull-request-github
|
github.vscode-pull-request-github
|
||||||
shardulm94.trailing-spaces
|
shardulm94.trailing-spaces
|
||||||
nvarner.typst-lsp
|
|
||||||
arrterian.nix-env-selector
|
arrterian.nix-env-selector
|
||||||
# Doesn't build on arm64
|
# Doesn't build on arm64
|
||||||
# vadimcn.vscode-lldb
|
# vadimcn.vscode-lldb
|
||||||
|
Reference in New Issue
Block a user