mirror of
https://github.com/softinio/nix-config.git
synced 2025-10-18 19:16:41 -07:00
Compare commits
9 commits
d5d302cff3
...
04daf58e43
Author | SHA1 | Date | |
---|---|---|---|
![]() |
04daf58e43 | ||
57313eb0d8 | |||
91aa2d907a | |||
cd7c51855f | |||
2708a86df9 | |||
5151384820 | |||
3c210cf84c | |||
f1beef4094 | |||
6be92be9dc |
23 changed files with 900 additions and 39 deletions
90
CLAUDE.md
Normal file
90
CLAUDE.md
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This is a nix-darwin and home-manager configuration for managing a macOS system (Apple Silicon M3 Max) declaratively. The configuration uses Nix flakes and manages both system-level packages (via nix-darwin) and user-level packages and dotfiles (via home-manager).
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Flake Structure
|
||||||
|
|
||||||
|
The repository follows a modular architecture:
|
||||||
|
|
||||||
|
- **`flake.nix`**: Entry point defining inputs (nixpkgs, nix-darwin, home-manager, nur) and outputs. Defines the main darwin configuration `salarm3max` for aarch64-darwin.
|
||||||
|
- **`home.nix`**: Main home-manager configuration importing all program modules and defining system-wide packages.
|
||||||
|
- **`programs/default.nix`**: List of program module imports (each program has its own subdirectory with `default.nix`).
|
||||||
|
- **`programs/*/default.nix`**: Individual program configurations (fish, git, jujutsu, ghostty, wezterm, zed, etc.).
|
||||||
|
|
||||||
|
### Key Design Patterns
|
||||||
|
|
||||||
|
1. **Modular Program Configuration**: Each program (fish, git, ghostty, etc.) has its own directory under `programs/` with a `default.nix` file.
|
||||||
|
2. **Allowlist for Unfree Packages**: Unfree packages are explicitly allowlisted in `home.nix` using `allowUnfreePredicate`.
|
||||||
|
3. **External Config Fetching**: Neovim config is fetched from external GitHub repo (`softinio/nvim-config`) rather than managed in this repo.
|
||||||
|
4. **Integration Through Imports**: `programs/default.nix` is a simple list that gets imported into `home.nix`, making it easy to enable/disable programs.
|
||||||
|
|
||||||
|
## Common Commands
|
||||||
|
|
||||||
|
**Note**: User uses Fish shell, not Bash. All commands below work in Fish.
|
||||||
|
|
||||||
|
### Building and Activating Configuration
|
||||||
|
|
||||||
|
```fish
|
||||||
|
# Build and switch to new configuration (PREFERRED - use this alias)
|
||||||
|
nixre
|
||||||
|
|
||||||
|
# Full command (if needed)
|
||||||
|
darwin-rebuild switch --flake ~/.config/nixpkgs#salarm3max
|
||||||
|
|
||||||
|
# Build without switching
|
||||||
|
darwin-rebuild build --flake ~/.config/nixpkgs#salarm3max
|
||||||
|
```
|
||||||
|
|
||||||
|
### Updating Dependencies
|
||||||
|
|
||||||
|
```fish
|
||||||
|
# Update all flake inputs
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
# Update specific input
|
||||||
|
nix flake lock --update-input nixpkgs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testing Changes
|
||||||
|
|
||||||
|
```fish
|
||||||
|
# Build configuration locally to test before switching
|
||||||
|
nix build .#darwinConfigurations.salarm3max.system
|
||||||
|
```
|
||||||
|
|
||||||
|
### Maintenance
|
||||||
|
|
||||||
|
```fish
|
||||||
|
# Garbage collection
|
||||||
|
nix-collect-garbage -d # Also aliased as: nixgc
|
||||||
|
|
||||||
|
# Repair Nix store
|
||||||
|
nix-store --repair --verify --check-contents # Also aliased as: nixstorerepair
|
||||||
|
|
||||||
|
# Check system info
|
||||||
|
nix-shell -p nix-info --run "nix-info -m" # Also aliased as: nixinfo
|
||||||
|
```
|
||||||
|
|
||||||
|
## Adding New Programs
|
||||||
|
|
||||||
|
To add a new program configuration:
|
||||||
|
|
||||||
|
1. Create directory: `programs/newprogram/`
|
||||||
|
2. Create `programs/newprogram/default.nix` with configuration
|
||||||
|
3. Add `./newprogram` to the list in `programs/default.nix`
|
||||||
|
4. Run `nixre` to apply changes
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
- **Platform**: This configuration is specifically for `aarch64-darwin` (Apple Silicon Macs).
|
||||||
|
- **User**: Configuration is for user `salar` with home directory `/Users/salar`.
|
||||||
|
- **Shell**: Fish is the default shell with extensive customizations.
|
||||||
|
- **Nix Features**: Experimental features `nix-command` and `flakes` are enabled.
|
||||||
|
- **Version Control**: Uses jujutsu (jj) as the primary VCS alongside git.
|
||||||
|
- **Editor**: Neovim is the default editor (`$EDITOR` and `$VISUAL` environment variables).
|
176
flake.lock
generated
176
flake.lock
generated
|
@ -1,6 +1,27 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1759362264,
|
||||||
|
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"nur",
|
"nur",
|
||||||
|
@ -21,6 +42,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -28,11 +67,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758296614,
|
"lastModified": 1759536080,
|
||||||
"narHash": "sha256-l60D1i0aaSqemy9dL7wP0ePMfcv/oZbeKpvUMY+q0kQ=",
|
"narHash": "sha256-0aXlKPxm2M+F5oywX2TTbY0e6h+tQ+6OYyx7UZn3A4A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "55b1f5b7b191572257545413b98e37abab2fdb00",
|
"rev": "edafd6da1936426708f1be0b1a4288007f16639a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -41,6 +80,34 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ixx": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1754860581,
|
||||||
|
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "ixx",
|
||||||
|
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"ref": "v0.1.1",
|
||||||
|
"repo": "ixx",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-darwin": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -48,11 +115,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758102940,
|
"lastModified": 1758805352,
|
||||||
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=",
|
"narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd",
|
"rev": "c48e963a5558eb1c3827d59d21c5193622a1477c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -63,11 +130,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758262103,
|
"lastModified": 1759417375,
|
||||||
"narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=",
|
"narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01",
|
"rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -79,11 +146,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758198701,
|
"lastModified": 1759381078,
|
||||||
"narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=",
|
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d",
|
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -93,17 +160,40 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1759527752,
|
||||||
|
"narHash": "sha256-+sncyvy1dkwRBeq7vw/YpsKqB18UuaKuW2lKRRv6/EI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "42d87fd4d8f51ea8c591b0b72af76b0aba991f54",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nur": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758314668,
|
"lastModified": 1759527694,
|
||||||
"narHash": "sha256-UeSA8UbYgBeeI/r6YRlkwKrBMhnE2ZliSFb7QB7p4zQ=",
|
"narHash": "sha256-fuQw+vP25GSQxPKTPAHZBUXuoFeN9dCTwfJxEv5sv0Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "180ae0f66d4d50d36c01e750bd7c05f49ff8f24b",
|
"rev": "b2b1349ad22d5ba62a3e069e9a3745f40fbb9203",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -112,13 +202,67 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"ixx": "ixx",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758662783,
|
||||||
|
"narHash": "sha256-igrxT+/MnmcftPOHEb+XDwAMq3Xg1Xy7kVYQaHhPlAg=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "7d4c0fc4ffe3bd64e5630417162e9e04e64b27a4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixvim": "nixvim",
|
||||||
"nur": "nur"
|
"nur": "nur"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -7,6 +7,10 @@
|
||||||
url = "github:LnL7/nix-darwin";
|
url = "github:LnL7/nix-darwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
nur.url = "github:nix-community/nur";
|
nur.url = "github:nix-community/nur";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
|
@ -18,6 +22,7 @@
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
nix-darwin,
|
nix-darwin,
|
||||||
|
nixvim,
|
||||||
home-manager,
|
home-manager,
|
||||||
nur,
|
nur,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
@ -86,6 +91,11 @@
|
||||||
home-manager.backupFileExtension = "backup";
|
home-manager.backupFileExtension = "backup";
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inputs = {
|
||||||
|
inherit nixvim;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
|
17
home.nix
17
home.nix
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
|
@ -8,11 +9,15 @@
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
imports = (import ./programs);
|
imports = [
|
||||||
|
inputs.nixvim.homeModules.nixvim
|
||||||
|
]
|
||||||
|
++ (import ./programs);
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate =
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
pkg:
|
pkg:
|
||||||
builtins.elem (lib.getName pkg) [
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"copilot.vim"
|
||||||
"discord"
|
"discord"
|
||||||
"gh-copilot"
|
"gh-copilot"
|
||||||
"slack"
|
"slack"
|
||||||
|
@ -58,11 +63,9 @@
|
||||||
marksman
|
marksman
|
||||||
marp-cli
|
marp-cli
|
||||||
maven
|
maven
|
||||||
meld
|
|
||||||
metals
|
metals
|
||||||
multimarkdown
|
multimarkdown
|
||||||
mypy
|
mypy
|
||||||
neovim
|
|
||||||
nerd-fonts.fira-code
|
nerd-fonts.fira-code
|
||||||
nil
|
nil
|
||||||
niv
|
niv
|
||||||
|
@ -216,12 +219,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Neovim Configuration
|
|
||||||
xdg.configFile."nvim".source = pkgs.fetchFromGitHub {
|
|
||||||
owner = "softinio";
|
|
||||||
repo = "nvim-config";
|
|
||||||
rev = "e89dc85e3a4116796d4393d37c12c31737e6f17c";
|
|
||||||
sha256 = "sha256-HCLF7vM4pUbW2OlOuat1isnuyfqfPxjJ4wWYLcNcu0M=";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
./ghostty
|
./ghostty
|
||||||
./git
|
./git
|
||||||
./jujutsu
|
./jujutsu
|
||||||
./kitty
|
# ./kitty
|
||||||
|
./nixvim
|
||||||
./tmux
|
./tmux
|
||||||
./wezterm
|
./wezterm
|
||||||
./vscode
|
./vscode
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
fenv source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
fenv source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
end
|
end
|
||||||
|
|
||||||
set -xg PATH $HOME/bin $HOME/.cargo/bin $HOME/.npm-global/bin /Users/salar/.luarocks/bin:/Users/salar/bin:/Users/salar/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin $PATH
|
set -xg PATH $HOME/bin $HOME/.cargo/bin $HOME/.npm-global/bin /Users/salar/.luarocks/bin:/Users/salar/bin:/Users/salar/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin "/Applications/IntelliJ IDEA.app/Contents/MacOS" $PATH
|
||||||
|
|
||||||
set -xg WORKSPACE /Users/salar/Projects
|
set -xg WORKSPACE /Users/salar/Projects
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,10 @@ let
|
||||||
copy-on-select = "clipboard";
|
copy-on-select = "clipboard";
|
||||||
font-family = "SF Mono";
|
font-family = "SF Mono";
|
||||||
font-size = 16;
|
font-size = 16;
|
||||||
|
link-previews = true;
|
||||||
|
macos-shortcuts = "ask";
|
||||||
macos-titlebar-style = "transparent";
|
macos-titlebar-style = "transparent";
|
||||||
|
maximize = true;
|
||||||
mouse-hide-while-typing = true;
|
mouse-hide-while-typing = true;
|
||||||
split-divider-color = "orange";
|
split-divider-color = "orange";
|
||||||
theme = "Builtin Tango Dark";
|
theme = "Builtin Tango Dark";
|
||||||
|
@ -14,6 +17,9 @@ let
|
||||||
working-directory = "home";
|
working-directory = "home";
|
||||||
keybind = [
|
keybind = [
|
||||||
"shift+enter=text:\n"
|
"shift+enter=text:\n"
|
||||||
|
"super+k=toggle_split_zoom"
|
||||||
|
"super+b>'=new_split:right"
|
||||||
|
"super+b>-=new_split:down"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
l = [
|
l = [
|
||||||
"log"
|
"log"
|
||||||
"-r"
|
"-r"
|
||||||
"(main..@):: | (main..@)-"
|
"(main@origin..@):: | (main@origin..@)-"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -17,6 +17,7 @@ in
|
||||||
key = "~/.ssh/id_ed25519.pub";
|
key = "~/.ssh/id_ed25519.pub";
|
||||||
};
|
};
|
||||||
ui = {
|
ui = {
|
||||||
|
default-command = "log";
|
||||||
diff-formatter = [
|
diff-formatter = [
|
||||||
"difft"
|
"difft"
|
||||||
"--color=always"
|
"--color=always"
|
||||||
|
@ -25,11 +26,10 @@ in
|
||||||
];
|
];
|
||||||
editor = "nvim";
|
editor = "nvim";
|
||||||
merge-editor = [
|
merge-editor = [
|
||||||
"meld"
|
"idea"
|
||||||
"$left"
|
"$left"
|
||||||
"$base"
|
|
||||||
"$right"
|
"$right"
|
||||||
"-o"
|
"$base"
|
||||||
"$output"
|
"$output"
|
||||||
];
|
];
|
||||||
pager = "less -FRX";
|
pager = "less -FRX";
|
||||||
|
|
17
programs/nixvim/_plugins/avante.nix
Normal file
17
programs/nixvim/_plugins/avante.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.avante = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
provider = "claude";
|
||||||
|
providers = {
|
||||||
|
claude = {
|
||||||
|
model = "claude-sonnet-4-5-20250929";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
36
programs/nixvim/_plugins/conform.nix
Normal file
36
programs/nixvim/_plugins/conform.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = [ "stylua" ];
|
||||||
|
nix = [ "nixfmt" ];
|
||||||
|
python = ''
|
||||||
|
function(bufnr)
|
||||||
|
if require("conform").get_formatter_info("ruff_format", bufnr).available then
|
||||||
|
return { "ruff_fix", "ruff_format" }
|
||||||
|
else
|
||||||
|
return { "isort", "black", "flake8" }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
scala = [ "scalafmt" ];
|
||||||
|
swift = [ "swift_format" ];
|
||||||
|
"*" = [ "trim_whitespace" "trim_newlines" ];
|
||||||
|
};
|
||||||
|
format_on_save = ''
|
||||||
|
function(bufnr)
|
||||||
|
-- Disable with a global or buffer-local variable
|
||||||
|
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return { timeout_ms = 500, lsp_fallback = true }
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
105
programs/nixvim/_plugins/default.nix
Normal file
105
programs/nixvim/_plugins/default.nix
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./avante.nix
|
||||||
|
./conform.nix
|
||||||
|
./floaterm.nix
|
||||||
|
./lsp.nix
|
||||||
|
./lualine.nix
|
||||||
|
./neo-tree.nix
|
||||||
|
./telescope.nix
|
||||||
|
./treesitter.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Global plugin configurations can go here
|
||||||
|
programs.nixvim = {
|
||||||
|
colorschemes.tokyonight = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
style = "night";
|
||||||
|
on_colors.__raw = "function(colors) colors.bg = \"#000000\" end";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
# Lazy loading
|
||||||
|
lz-n.enable = true;
|
||||||
|
|
||||||
|
web-devicons.enable = true;
|
||||||
|
|
||||||
|
gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
settings.signs = {
|
||||||
|
add.text = "+";
|
||||||
|
change.text = "~";
|
||||||
|
delete.text = "_";
|
||||||
|
topdelete.text = "‾";
|
||||||
|
changedelete.text = "~";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nvim-autopairs.enable = true;
|
||||||
|
|
||||||
|
colorizer = {
|
||||||
|
enable = true;
|
||||||
|
settings.user_default_options.names = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
copilot-vim.enable = true;
|
||||||
|
|
||||||
|
fidget.enable = true;
|
||||||
|
|
||||||
|
flash.enable = true;
|
||||||
|
|
||||||
|
img-clip = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
default = {
|
||||||
|
embed_image_as_base64 = false;
|
||||||
|
prompt_for_file_name = false;
|
||||||
|
drag_and_drop = {
|
||||||
|
insert_mode = true;
|
||||||
|
};
|
||||||
|
use_absolute_path = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
indent-blankline.enable = true;
|
||||||
|
|
||||||
|
markview.enable = true;
|
||||||
|
|
||||||
|
nui.enable = true;
|
||||||
|
|
||||||
|
oil = {
|
||||||
|
enable = true;
|
||||||
|
lazyLoad.settings.cmd = "Oil";
|
||||||
|
};
|
||||||
|
|
||||||
|
snacks.enable = true;
|
||||||
|
|
||||||
|
todo-comments = {
|
||||||
|
enable = true;
|
||||||
|
keymaps.todoTelescope.key = "<leader>t";
|
||||||
|
};
|
||||||
|
|
||||||
|
trim = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
highlight = true;
|
||||||
|
ft_blocklist = [
|
||||||
|
"checkhealth"
|
||||||
|
"floaterm"
|
||||||
|
"lspinfo"
|
||||||
|
"neo-tree"
|
||||||
|
"TelescopePrompt"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
trouble.enable = true;
|
||||||
|
which-key.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
14
programs/nixvim/_plugins/floaterm.nix
Normal file
14
programs/nixvim/_plugins/floaterm.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.floaterm = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
width = 0.8;
|
||||||
|
height = 0.8;
|
||||||
|
title = "";
|
||||||
|
keymap_toggle = "<leader>,";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
61
programs/nixvim/_plugins/lsp.nix
Normal file
61
programs/nixvim/_plugins/lsp.nix
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
diagnostic.settings.virtual_text = true;
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
inlayHints.enable = true;
|
||||||
|
servers = {
|
||||||
|
bashls.enable = true;
|
||||||
|
html.enable = true;
|
||||||
|
jqls.enable = true;
|
||||||
|
jsonls.enable = true;
|
||||||
|
lua_ls = {
|
||||||
|
enable = true;
|
||||||
|
settings.settings.diagnostics.globals = [ "vim" ];
|
||||||
|
};
|
||||||
|
marksman.enable = true;
|
||||||
|
metals.enable = true;
|
||||||
|
nil_ls.enable = true;
|
||||||
|
nixd.enable = true;
|
||||||
|
pyrefly.enable = true;
|
||||||
|
rust_analyzer.enable = true;
|
||||||
|
sourcekit.enable = true;
|
||||||
|
ts_ls.enable = true;
|
||||||
|
yamlls.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps =
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(
|
||||||
|
key: props:
|
||||||
|
{
|
||||||
|
inherit key;
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
// props
|
||||||
|
)
|
||||||
|
{
|
||||||
|
"<leader>k".action.__raw = "function() vim.diagnostic.jump({ count=-1, float=true }) end";
|
||||||
|
"<leader>j".action.__raw = "function() vim.diagnostic.jump({ count=1, float=true }) end";
|
||||||
|
gd.lspBufAction = "definition";
|
||||||
|
gD.lspBufAction = "references";
|
||||||
|
gt.lspBufAction = "type_definition";
|
||||||
|
gi.lspBufAction = "implementation";
|
||||||
|
K.lspBufAction = "hover";
|
||||||
|
"<F2>".lspBufAction = "rename";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
lsp-format = {
|
||||||
|
enable = true;
|
||||||
|
lspServersToEnable = "all";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Sane defaults for all servers
|
||||||
|
lspconfig.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
49
programs/nixvim/_plugins/lualine.nix
Normal file
49
programs/nixvim/_plugins/lualine.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.lualine = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
options.globalstatus = true;
|
||||||
|
|
||||||
|
sections = {
|
||||||
|
lualine_a = [ "mode" ];
|
||||||
|
lualine_b = [ "branch" ];
|
||||||
|
lualine_c = [
|
||||||
|
"filename"
|
||||||
|
"diff"
|
||||||
|
];
|
||||||
|
|
||||||
|
lualine_x = [
|
||||||
|
"diagnostics"
|
||||||
|
|
||||||
|
{
|
||||||
|
__unkeyed.__raw = ''
|
||||||
|
function()
|
||||||
|
local msg = ""
|
||||||
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||||
|
local clients = vim.lsp.get_clients()
|
||||||
|
if next(clients) == nil then
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
local filetypes = client.config.filetypes
|
||||||
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||||
|
return client.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
icon = "";
|
||||||
|
color.fg = "#ffffff";
|
||||||
|
}
|
||||||
|
"encoding"
|
||||||
|
"fileformat"
|
||||||
|
"filetype"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
25
programs/nixvim/_plugins/neo-tree.nix
Normal file
25
programs/nixvim/_plugins/neo-tree.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>m";
|
||||||
|
action = ":Neotree action=focus reveal toggle<CR>";
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
plugins.neo-tree = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
closeIfLastWindow = true;
|
||||||
|
window = {
|
||||||
|
width = 30;
|
||||||
|
autoExpandWidth = true;
|
||||||
|
position = "right";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
54
programs/nixvim/_plugins/telescope.nix
Normal file
54
programs/nixvim/_plugins/telescope.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extensions = {
|
||||||
|
fzf-native.enable = true;
|
||||||
|
ui-select.enable = true;
|
||||||
|
undo.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
"<leader>ff" = "find_files";
|
||||||
|
"<leader>fg" = "live_grep";
|
||||||
|
"<leader>b" = "buffers";
|
||||||
|
"<leader>fh" = "help_tags";
|
||||||
|
"<leader>fd" = "diagnostics";
|
||||||
|
|
||||||
|
"<C-p>" = "git_files";
|
||||||
|
"<leader>?" = "oldfiles";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings.defaults = {
|
||||||
|
file_ignore_patterns = [
|
||||||
|
"^.git/"
|
||||||
|
"^.mypy_cache/"
|
||||||
|
"^__pycache__/"
|
||||||
|
"^output/"
|
||||||
|
"^data/"
|
||||||
|
"%.ipynb"
|
||||||
|
];
|
||||||
|
set_env.COLORTERM = "truecolor";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<C-t>";
|
||||||
|
action.__raw = ''
|
||||||
|
function()
|
||||||
|
require('telescope.builtin').live_grep({
|
||||||
|
default_text="TODO",
|
||||||
|
initial_mode="normal"
|
||||||
|
})
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
69
programs/nixvim/_plugins/treesitter.nix
Normal file
69
programs/nixvim/_plugins/treesitter.nix
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||||
|
awk
|
||||||
|
bash
|
||||||
|
c
|
||||||
|
cpp
|
||||||
|
css
|
||||||
|
dockerfile
|
||||||
|
fish
|
||||||
|
git-rebase
|
||||||
|
gitattributes
|
||||||
|
gitcommit
|
||||||
|
gitignore
|
||||||
|
go
|
||||||
|
haskell
|
||||||
|
hocon
|
||||||
|
html
|
||||||
|
http
|
||||||
|
java
|
||||||
|
javascript
|
||||||
|
json
|
||||||
|
json5
|
||||||
|
jsonc
|
||||||
|
lua
|
||||||
|
make
|
||||||
|
markdown
|
||||||
|
markdown-inline
|
||||||
|
nix
|
||||||
|
proto
|
||||||
|
python
|
||||||
|
rust
|
||||||
|
scala
|
||||||
|
sql
|
||||||
|
swift
|
||||||
|
terraform
|
||||||
|
toml
|
||||||
|
typescript
|
||||||
|
vim
|
||||||
|
xml
|
||||||
|
yaml
|
||||||
|
];
|
||||||
|
|
||||||
|
nixvimInjections = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
|
indent.enable = true;
|
||||||
|
};
|
||||||
|
folding = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
treesitter-refactor = {
|
||||||
|
enable = true;
|
||||||
|
highlightDefinitions = {
|
||||||
|
enable = true;
|
||||||
|
# Set to false if you have an `updatetime` of ~100.
|
||||||
|
clearOnCursorMove = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hmts.enable = true;
|
||||||
|
};
|
||||||
|
}
|
65
programs/nixvim/completion.nix
Normal file
65
programs/nixvim/completion.nix
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
opts.completeopt = [
|
||||||
|
"menu"
|
||||||
|
"menuone"
|
||||||
|
"noselect"
|
||||||
|
];
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
luasnip.enable = true;
|
||||||
|
|
||||||
|
lspkind = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
menu = {
|
||||||
|
nvim_lsp = "[LSP]";
|
||||||
|
nvim_lua = "[api]";
|
||||||
|
path = "[path]";
|
||||||
|
luasnip = "[snip]";
|
||||||
|
buffer = "[buffer]";
|
||||||
|
cmp_tabby = "[Tabby]";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cmp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
snippet.expand = ''
|
||||||
|
function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
|
||||||
|
mapping = {
|
||||||
|
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||||
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||||
|
"<C-Space>" = "cmp.mapping.complete()";
|
||||||
|
"<C-e>" = "cmp.mapping.close()";
|
||||||
|
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||||
|
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||||
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||||
|
};
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
{ name = "path"; }
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "luasnip"; }
|
||||||
|
{
|
||||||
|
name = "buffer";
|
||||||
|
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
21
programs/nixvim/default.nix
Normal file
21
programs/nixvim/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./options.nix
|
||||||
|
./keymappings.nix
|
||||||
|
./completion.nix
|
||||||
|
./_plugins
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
|
nixpkgs.useGlobalPackages = true;
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
};
|
||||||
|
}
|
55
programs/nixvim/keymappings.nix
Normal file
55
programs/nixvim/keymappings.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
keymaps =
|
||||||
|
let
|
||||||
|
normal =
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(
|
||||||
|
key: action: {
|
||||||
|
mode = "n";
|
||||||
|
inherit action key;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
{
|
||||||
|
"<Space>" = "<NOP>";
|
||||||
|
"<esc>" = ":noh<CR>";
|
||||||
|
"Y" = "y$";
|
||||||
|
"<C-c>" = ":b#<CR>";
|
||||||
|
"<C-x>" = ":close<CR>";
|
||||||
|
"<leader>s" = ":w<CR>";
|
||||||
|
"<C-s>" = ":w<CR>";
|
||||||
|
"<leader>h" = "<C-w>h";
|
||||||
|
"<leader>l" = "<C-w>l";
|
||||||
|
"L" = "$";
|
||||||
|
"H" = "^";
|
||||||
|
"<C-Up>" = ":resize -2<CR>";
|
||||||
|
"<C-Down>" = ":resize +2<CR>";
|
||||||
|
"<C-Left>" = ":vertical resize +2<CR>";
|
||||||
|
"<C-Right>" = ":vertical resize -2<CR>";
|
||||||
|
"<M-k>" = ":move-2<CR>";
|
||||||
|
"<M-j>" = ":move+<CR>";
|
||||||
|
};
|
||||||
|
visual =
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(
|
||||||
|
key: action: {
|
||||||
|
mode = "v";
|
||||||
|
inherit action key;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
{
|
||||||
|
# Removed gv to allow dot-repeat
|
||||||
|
">" = ">";
|
||||||
|
"<" = "<";
|
||||||
|
# TAB keeps gv for convenience
|
||||||
|
"<TAB>" = ">gv";
|
||||||
|
"<S-TAB>" = "<gv";
|
||||||
|
"K" = ":m '<-2<CR>gv=gv";
|
||||||
|
"J" = ":m '>+1<CR>gv=gv";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
normal ++ visual;
|
||||||
|
};
|
||||||
|
}
|
36
programs/nixvim/options.nix
Normal file
36
programs/nixvim/options.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
|
||||||
|
clipboard = {
|
||||||
|
register = "unnamedplus";
|
||||||
|
};
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
backup = false;
|
||||||
|
breakindent = true;
|
||||||
|
expandtab = true;
|
||||||
|
hlsearch = true;
|
||||||
|
incsearch = true;
|
||||||
|
mouse = "a";
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
scrolloff = 8;
|
||||||
|
shiftwidth = 2;
|
||||||
|
signcolumn = "yes";
|
||||||
|
smartindent = true;
|
||||||
|
swapfile = false;
|
||||||
|
tabstop = 2;
|
||||||
|
termguicolors = true;
|
||||||
|
undofile = true;
|
||||||
|
updatetime = 250;
|
||||||
|
wrap = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -15,19 +15,26 @@ in
|
||||||
extraConfig = tmuxConfig;
|
extraConfig = tmuxConfig;
|
||||||
plugins = with pkgs.tmuxPlugins; [
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
sensible
|
sensible
|
||||||
|
tokyo-night-tmux
|
||||||
yank
|
yank
|
||||||
kanagawa
|
|
||||||
{
|
{
|
||||||
plugin = kanagawa;
|
plugin = tokyo-night-tmux;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g @kanagawa-theme 'wave'
|
set -g @tokyo-night-tmux_theme night
|
||||||
set -g @kanagawa-plugins "cpu-usage git"
|
set -g @tokyo-night-tmux_transparent 1
|
||||||
set -g @kanagawa-show-powerline true
|
set -g @tokyo-night-tmux_terminal_icon
|
||||||
set -g @kanagawa-refresh-rate 10
|
set -g @tokyo-night-tmux_active_terminal_icon
|
||||||
|
|
||||||
|
set -g @tokyo-night-tmux_show_path 1
|
||||||
|
set -g @tokyo-night-tmux_path_format full
|
||||||
|
|
||||||
|
# No extra spaces between icons
|
||||||
|
set -g @tokyo-night-tmux_window_tidy_icons 0
|
||||||
|
|
||||||
set -g status-right " #(tms sessions)"
|
set -g status-right " #(tms sessions)"
|
||||||
bind -r '(' switch-client -p\; refresh-client -S
|
bind -r '(' switch-client -p\; refresh-client -S
|
||||||
bind -r ')' switch-client -n\; refresh-client -S
|
bind -r ')' switch-client -n\; refresh-client -S
|
||||||
|
bind C-o display-popup -E "tms"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,7 @@ in
|
||||||
model = "claude-4-sonnet";
|
model = "claude-4-sonnet";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
auto_save = "on_focus_change";
|
||||||
language_models = {
|
language_models = {
|
||||||
anthropic = {
|
anthropic = {
|
||||||
available_models = [
|
available_models = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue