mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-11 09:28:39 +00:00
Compare commits
16 Commits
more-earth
...
c1ca9a27e9
Author | SHA1 | Date | |
---|---|---|---|
|
c1ca9a27e9 | ||
|
2a371ff957 | ||
|
58c06a2a70 | ||
|
28dab00b65 | ||
|
ca85c8de24 | ||
|
c45222500f | ||
|
04fab0bad0 | ||
|
04079d1082 | ||
|
6973cbbd99 | ||
|
2346cbb7ce | ||
|
247c3419a8 | ||
|
8a1f2af5bb | ||
|
3bfb4e7ec5 | ||
|
d857f7ab9f | ||
|
cb3c993507 | ||
|
14f21cb172 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ result
|
||||
bin/
|
||||
obj/
|
||||
.DS_Store
|
||||
.direnv/
|
||||
|
@@ -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;
|
||||
|
||||
|
62
flake.lock
generated
62
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731473366,
|
||||
"narHash": "sha256-sE2WfD3YyNrCROfRZKqMDR77g3KV4FXUaJ7NWe+A7ro=",
|
||||
"lastModified": 1738646237,
|
||||
"narHash": "sha256-++0dXoZO9l5oceiGQsJmtUI5WXlPMw6QKjpg7vGPl3w=",
|
||||
"owner": "tpwrules",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"rev": "3eee753e4b074790342fadb1c4e7183d037ddac4",
|
||||
"rev": "3d1c6c27b14c4b8fcbdaec779e715f30cb72ed15",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731454423,
|
||||
"narHash": "sha256-TtwvgFxUa0wyptLhQbKaixgNW1UXf3+TDqfX3Kp63oM=",
|
||||
"lastModified": 1740755725,
|
||||
"narHash": "sha256-amZbqP84H/ApugaT+TADXTB3NbjkVHI9Vac1saIk0kE=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "6c71c49e2448e51ad830ed211024e6d0edc50116",
|
||||
"rev": "5d6e0851b60508cffd66b4a6982440a40720338d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -49,11 +49,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731604406,
|
||||
"narHash": "sha256-CUkO4CXaDcGyUqQ+/ArvekL3hlfgass7LjrnG6m2+g8=",
|
||||
"lastModified": 1740820419,
|
||||
"narHash": "sha256-Q0fbGgkpWyfadaXJmQmX+S+mF9cZSetYXZ+LQFwj0zE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "f6c94b95f529cfbd29848c12816111a2471a5293",
|
||||
"rev": "25b732c255ccb41258d70d775afb9f16e25fa3d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -82,11 +82,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 +102,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731604581,
|
||||
"narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=",
|
||||
"lastModified": 1740796616,
|
||||
"narHash": "sha256-JU97wIfRxeFN6rpTsUVCwWAdix+Wka4Or23907YIrFI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10",
|
||||
"rev": "f0b5e7e8a75abdea32bbff09ddd7b6eeb4b9b445",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -129,11 +129,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1731139594,
|
||||
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
|
||||
"lastModified": 1738410390,
|
||||
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
|
||||
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -145,27 +145,27 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1731386116,
|
||||
"narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=",
|
||||
"lastModified": 1740743217,
|
||||
"narHash": "sha256-brsCRzLqimpyhORma84c3W2xPbIidZlIc3JGIuQVSNI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "689fed12a013f56d4c4d3f612489634267d86529",
|
||||
"rev": "b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1731531548,
|
||||
"narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=",
|
||||
"lastModified": 1740762151,
|
||||
"narHash": "sha256-Rn0j0gP6po1m46RsW/4jrn7938TZGR+wRZ0+MSZThBg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "24f0d4acd634792badd6470134c387a3b039dace",
|
||||
"rev": "5954d3359cc7178623da6c7fd23dc7f7504d7187",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -177,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": {
|
||||
@@ -238,11 +238,11 @@
|
||||
"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": {
|
||||
|
@@ -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
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
|
||||
}
|
@@ -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;
|
||||
|
@@ -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,39 +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.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
|
||||
@@ -315,10 +315,14 @@
|
||||
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
|
||||
@@ -330,7 +334,7 @@
|
||||
if machinename == "capybara"
|
||||
then [
|
||||
nixpkgs.steam-run
|
||||
nixpkgs.discord
|
||||
nixpkgs.discord-canary
|
||||
nixpkgs.anki-bin
|
||||
]
|
||||
else []
|
||||
|
@@ -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 = {
|
||||
@@ -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";
|
||||
|
@@ -1,18 +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.nerdfonts.override {fonts = ["FiraCode" "DroidSansMono"];})
|
||||
];
|
||||
}
|
@@ -6,5 +6,6 @@
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
# stdlib = builtins.readFile ../direnv/envrc;
|
||||
};
|
||||
}
|
||||
|
9
home-manager/modules/ghostty.nix
Normal file
9
home-manager/modules/ghostty.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{pkgs, ...}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.ghostty
|
||||
];
|
||||
}
|
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
|
||||
];
|
||||
}
|
@@ -29,8 +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
|
||||
|
@@ -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,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,
|
||||
@@ -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
|
||||
|
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 },
|
||||
})
|
@@ -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@@
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user