Compare commits

...

81 Commits

Author SHA1 Message Date
9965ca8816 chore: better swap behavior 2025-12-28 12:02:31 -05:00
dce002cc24 chore: update llamacpp 2025-12-28 10:04:00 -05:00
ece872fdeb chore: update flake & llama-cpp 2025-12-26 21:38:46 -05:00
1c1f976186 chore: asahi flake 2025-12-26 20:55:10 -05:00
d40596d56f chore: up fsnotify on rke2 2025-12-26 20:51:59 -05:00
93edba05a9 chore: update model paths 2025-12-26 09:00:25 -05:00
9b1514243b chore: update nix-darwin to 25.11 and enable opencode 2025-12-21 15:22:51 -05:00
bf4e50a970 refactor: migrate from opencode to codecompanion with updated model configurations 2025-12-21 10:50:01 -05:00
a33790cfc7 feat: add opencode package and update models 2025-12-20 20:19:19 -05:00
c3aa7802ad feat(nvim): reorganize and modernize Neovim configuration
- Remove deprecated config files: git-ref.lua, git-signs.lua, diffview-config.lua, lsp-lines-config.lua, neotree-config.lua, fidget-spinner.lua, silicon-config.lua, telescope-config.lua, llm.lua
- Add new configuration files: diagnostics-config.lua, git-config.lua, llm-config.lua, snacks-config.lua
- Update existing config files: base.lua, dap-config.lua, init.lua, lsp-config.lua, lualine-config.lua, noice-config.lua, octo-config.lua, toggleterm-config.lua, which-key-config.lua
- Update nvim and opencode module configurations
2025-12-18 13:42:16 -05:00
b93249daf7 feat(llm): add Qwen3-VL-8B and Qwen2.5-Coder support, update CUDA config
- Add new `qwen3-8b-vision` model with multimodal support using mmproj file
- Add new `qwen2.5-coder-7b-instruct` model with FIM enabled via `--fim-qwen-7b-default`
- Update CUDA device usage from `CUDA0` to `CUDA1` for `olmoe-7b-instruct` and `phi-mini-8b-instruct`
- Upgrade llama.cpp to version 7426 with updated hash and CUDA architectures (61;86)
- Add Copilot acceptance shortcut `<C-J>` in insert mode and disable tab mapping
- Improve cache type settings across multiple models for better performance
2025-12-17 09:27:15 -05:00
e947e13a02 feat: comprehensive NixOS and home-manager configuration updates
This commit includes significant updates to the Nix configuration including:
- Added common NixOS module with system packages
- Updated home-manager configurations for various systems
- Enhanced terminal programs including Claude Code integration
- Updated LLM server configurations with new models
- Improved btop configuration with custom package
- Added opencode support with permission settings
- Updated tmux and nvim configurations

The changes introduce new features, update existing configurations, and improve the overall system setup.
2025-12-14 16:24:11 -05:00
80033fd2ae chore(release): bump NixOS to 25.11 and update channels
Upgrade the NixOS `stateVersion` from 25.05 to 25.11 in all system configuration files and update all nix channel URLs to the 25.11 releases. Adjust Home Manager and terminal module configurations accordingly, clean up duplicated SSH keys, and update LLaMA server command lines. Minor housekeeping changes to package definitions and other configuration files are also included.
2025-12-12 12:40:09 -05:00
a367f724ce feat: add opencode 2025-12-10 13:51:05 -05:00
c1a650a90e chore(llm): clean up models & fix llama-cpp issue 2025-12-10 12:12:50 -05:00
30934c8f7c switch llm endpoint 2025-12-06 08:55:48 -05:00
6dc1ee512e chore(llm): add vulkan support and update llama.cpp to 7278 2025-12-05 16:53:44 -05:00
d64cc0e47b feat(nvim): integrate CodeCompanion with LlamaSwap and Copilot
- Remove old code-companion-config.lua file
- Move LLM configuration to llm.lua with LlamaSwap and Copilot integration
- Add copilot-vim plugin to default.nix
- Update which-key bindings to include new CodeCompanion commands
- Configure CodeCompanion with chat, inline, and command strategies using LlamaSwap adapter
- Add memory configuration with default project files
- Update LSP configuration for CodeCompanion markdown rendering
2025-12-04 17:36:45 -05:00
50b03508e1 update llama-cpp 2025-12-03 21:07:13 -05:00
0ed577e815 more things 2025-12-03 11:40:01 -05:00
3089d6fdd1 chore: switch to qwen3 coder 30b FIM 2025-12-02 10:41:31 -05:00
8a5e2a9823 chore: llama-swap + fim 2025-12-02 09:47:35 -05:00
cf5fadf040 chore: add desktop 2025-12-01 21:09:44 -05:00
23a871a1c9 chore: upgrade 25.11 2025-11-30 19:35:10 -05:00
e804894036 fix: use nvtop for intel gpus 2025-11-20 17:00:00 -05:00
c60cb58d14 chore: native lsp 2025-11-15 16:04:57 -05:00
167c1d811c chore: update flake 2025-11-10 16:23:48 -05:00
bf9e3a044b fix: determinate nix + nix darwin 2025-11-08 11:32:50 -05:00
56921235b3 fix: actually fix user shell 2025-11-08 11:28:35 -05:00
b111cf4197 chore: remove csharp_ls 2025-11-08 11:19:44 -05:00
567e8c10d2 feat(nvim): add omnisharp 2025-11-06 09:26:34 -05:00
3480837c26 add: common tools 2025-11-04 21:02:25 -05:00
ad6de45681 add: strawberry 2025-11-03 08:58:33 -05:00
e7ee14a3c1 feat: add csharp lsp 2025-11-02 18:27:34 -05:00
667df4e8e6 fix: thinkpad sleep 2025-10-31 09:26:05 -04:00
5c429b8a6b block firefox ai crap 2025-10-28 08:41:12 -04:00
4f054051e5 fix: thinkpad L14 S4 hibernate 2025-10-25 13:02:36 -04:00
318c6f6984 asahi update 2025-10-22 10:19:21 -04:00
0c2bf58cfa fix: prevent clangd from formatting proto files 2025-10-15 10:36:09 -04:00
70df72a6f5 fix: incorrect bash shell in toggleterm 2025-10-10 14:24:22 -04:00
8c417d8e56 add aws stuff 2025-10-10 10:29:17 -04:00
7ce476adb3 update libvirt & add clangd lsp 2025-10-03 13:10:09 -04:00
e173ddffc9 fix tmux over mosh copy & boot config 2025-10-01 17:55:44 -04:00
eb0c28d2f0 add qemu & battery notifs 2025-09-29 20:37:53 -04:00
2a40dc791d more 2025-09-28 18:32:02 -04:00
1098c68073 wip 2025-09-27 12:28:43 -04:00
74e6684783 add ssh key 2025-09-23 20:32:31 -04:00
5b05dffb20 enable ts 2025-09-23 20:31:07 -04:00
1d9517a37f enable mosh 2025-09-23 19:23:35 -04:00
ff62814436 update nameserver 2025-09-23 16:18:43 -04:00
be5c3e9cb8 tmux 2025-09-23 15:44:57 -04:00
bf4148dab0 split bash from ghostty 2025-09-22 19:05:18 -04:00
fbb274a50a more systems 2025-09-19 14:37:17 -04:00
9159465836 add headscale specific node 2025-09-16 16:30:56 -04:00
cff9bcaecc alias 2025-09-07 21:03:27 -04:00
2492bb8825 tailscale 2025-09-07 15:20:47 -04:00
788697561a add kubectl 2025-09-06 20:33:36 -04:00
f6dbe8ad1d mkopt systemd vs grub 2025-09-06 09:47:27 -04:00
26f32d3225 chore: added llama-cpp and migrate office 2025-09-05 22:58:00 -04:00
9433abcaf4 update nix flake, remote nix-anywhere, update readme 2025-09-03 08:12:35 -04:00
f5c4e6c9db back to vmware 2025-09-01 20:51:48 -04:00
b970f6f550 add cloud 2025-09-01 20:09:23 -04:00
93b7c6ee25 update nix 2025-09-01 15:10:31 -04:00
cc045f225b feat(nvim): add octo 2025-08-28 17:04:54 -04:00
e63dd8d5d1 add: remmina & thinkpad hardware mod 2025-07-28 16:55:28 -04:00
6b42b3cc22 vim deprecated functions 2025-07-27 18:22:11 -04:00
73b9bf063e update 25.05 2025-07-27 18:17:35 -04:00
dea1fc8790 chore: update vim stuff 2025-07-27 18:09:57 -04:00
57dbafb5a4 update 24.11 2025-07-27 17:57:35 -04:00
5bb653f561 add bt to tp 2025-07-27 17:49:29 -04:00
f09e2a9ec1 chore: nvim autopep8 line limit 2025-07-23 20:21:10 -04:00
6cd0437fb5 feat: add wireshark 2025-07-23 11:17:48 -04:00
d6c908dc70 git signs tweak 2025-06-09 13:22:03 -04:00
b1981a2dcc autopep8 2025-05-01 14:06:05 -04:00
a58d02d1bd nvim: use pyright for starlark 2025-04-30 13:12:00 -04:00
c2af87fce5 add telescope undo tree 2025-04-22 19:11:08 -04:00
93d50641c1 macos update instructions 2025-04-22 11:47:10 -04:00
a6a9a97650 add pin hyprland bind 2025-04-22 07:46:05 -04:00
5455230930 add gimp 2025-04-20 21:16:56 -04:00
b632c0c3af sync system clipboard 2025-04-20 21:10:15 -04:00
cf0fa75058 Migrate to Snowfall (#1)
Reviewed-on: #1
Co-authored-by: Evan Reichard <evan@reichard.io>
Co-committed-by: Evan Reichard <evan@reichard.io>
2025-04-21 00:56:53 +00:00
181 changed files with 6939 additions and 2478 deletions

1
.envrc Normal file
View File

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

1
.gitignore vendored Normal file → Executable file
View File

@@ -1,3 +1,4 @@
.DS_Store .DS_Store
_scratch _scratch
result result
._*

22
.sops.yaml Normal file
View File

@@ -0,0 +1,22 @@
keys:
# Admin - Age Native
- &admin_reichard age1sac93wpnjcv62s7583jv6a4yspndh6k0r25g3qx3k7gq748uvafst6nz4w
# lin-va-mbp-personal@evanreichard - SSH Derived
- &user_lin-va-mbp-personal age17ayje4uv2mhwehhp9jr3u9l0ds07396kt7ef40sufx89vm7cgfjq6d5d4y
# mac-va-mbp-personal@evanreichard - SSH Derived
- &user_mac-va-mbp-personal age1dccte7xtwswgef089nd80dutp96xnezx5lrqnneh9cusegsnda8sj3dj6c
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *admin_reichard
- path_regex: secrets/lin-va-mbp-personal/evanreichard/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *admin_reichard
- *user_lin-va-mbp-personal
- path_regex: secrets/mac-va-mbp-personal/evanreichard/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *admin_reichard
- *user_mac-va-mbp-personal

114
README.md Normal file → Executable file
View File

@@ -2,59 +2,79 @@
This repository contains the configuration for multiple machines, as well as my home / IDE config (home-manager). This repository contains the configuration for multiple machines, as well as my home / IDE config (home-manager).
```bash
# Install NixOS
./bootstrap.sh install --name lin-va-nix-builder
# Remote Image Build (NixOS Builder)
./bootstrap.sh image --name lin-va-rke2 --remote
# Home Manager Install
home-manager switch --flake .#evanreichard@mac-va-mbp-personal
# Update Flake
nix flake update
```
## Manual
```bash
# Install NixOS
sudo nixos-rebuild switch --flake .#lin-va-mbp-personal
# Install NixOS (Remote)
nix run github:nix-community/nixos-anywhere -- --flake .#lin-cloud-kube1 --target-host \<USER\>@\<IP\>
# Build Image
nix build .#vmwareConfigurations.lin-va-rke2
```
## Nix Darwin
```bash
# Install Nix Without Determinate
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
# Switch Nix Darwin
sudo nix run nix-darwin#darwin-rebuild -- switch --flake .#mac-va-mbp-personal
sudo darwin-rebuild switch --flake .#mac-va-mbp-personal
```
## Clean Garbage
NOTE: This will remove previous generations
```bash
sudo nix-collect-garbage --delete-old
nix-collect-garbage --delete-old
```
## Home Manager ## Home Manager
Utilizing [Home Manager](https://nix-community.github.io/home-manager/). Check out the [README.md](./home-manager/README.md).
## NixOS
### NixOS Generators
```bash ```bash
nix build .#packages.x86_64-linux.rke2-image # Update System Channels
sudo nix-channel --add https://nixos.org/channels/nixpkgs-25.11-darwin nixpkgs
sudo nix-channel --update
# Update Home Manager
nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz home-manager
nix-channel --update
# Link Repo
ln -s /Users/evanreichard/Development/git/personal/nix/home-manager ~/.config/home-manager
# Build Home Manager
home-manager switch
``` ```
### NixOS Hosts ### OS Update
#### Copy Config `/etc/bashrc` may get overridden. To properly load Nix, prepend the following:
```bash ```bash
rsync -av --exclude='.git' . root@HOST:/etc/nixos # Nix
``` if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
#### Partition Drives fi
# End Nix
```bash
# Validate Disk
ls -l /dev/disk/by-id
# Partition Disk
# WARNING: This will destroy all data on the disk(s)
sudo nix \
--experimental-features "nix-command flakes" \
run github:nix-community/disko -- \
--mode disko \
--flake /etc/nixos#HOST_CONFIG
```
#### Install NixOS
```bash
# Install
sudo nixos-install --flake /etc/nixos#HOST_CONFIG
# Reboot
sudo reboot
```
#### Copy Config Back to Host
```bash
rsync -av --exclude='.git' . root@HOST:/etc/nixos
```
#### Rebuild NixOS
```bash
sudo nixos-rebuild switch
``` ```

View File

@@ -1,7 +1,9 @@
#!/bin/sh #!/bin/sh
export NIX_CONFIG="experimental-features = nix-command flakes"
function cmd_image() { function cmd_image() {
local usage="Usage: $0 image --name <image-name>" local usage="Usage: $0 image --name <image-name> [--remote]"
local name="" local name=""
local remote=false local remote=false
@@ -29,14 +31,13 @@ function cmd_image() {
# Validate Config Exists # Validate Config Exists
if ! nix eval --json --impure \ if ! nix eval --json --impure \
--experimental-features "nix-command flakes" \ ".#vmwareConfigurations" \
".#packages.x86_64-linux" \
--apply "s: builtins.hasAttr \"$name\" s" 2>/dev/null | grep -q "true"; then --apply "s: builtins.hasAttr \"$name\" s" 2>/dev/null | grep -q "true"; then
echo "Error: NixOS Generator Config '$name' not found" echo "Error: NixOS Generator Config '$name' not found"
exit 1 exit 1
fi fi
build_args=(".#packages.x86_64-linux.$name") build_args=(".#vmwareConfigurations.$name")
if [ "$remote" = true ]; then if [ "$remote" = true ]; then
build_args+=("-j0") build_args+=("-j0")
fi fi
@@ -50,8 +51,9 @@ function cmd_image() {
} }
function cmd_install() { function cmd_install() {
local usage="Usage: $0 install --name <system-name>" local usage="Usage: $0 install --name <system-name> [--remote <user@remote-host>]"
local name="" local name=""
local remote=""
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case "$1" in case "$1" in
@@ -59,6 +61,10 @@ function cmd_install() {
name="$2" name="$2"
shift 2 shift 2
;; ;;
--remote)
remote="$2"
shift 2
;;
*) *)
echo "$usage" echo "$usage"
exit 1 exit 1
@@ -73,7 +79,6 @@ function cmd_install() {
# Validate Config Exists # Validate Config Exists
if ! nix eval --json --impure \ if ! nix eval --json --impure \
--experimental-features "nix-command flakes" \
".#nixosConfigurations" \ ".#nixosConfigurations" \
--apply "s: builtins.hasAttr \"$name\" s" 2>/dev/null | grep -q "true"; then --apply "s: builtins.hasAttr \"$name\" s" 2>/dev/null | grep -q "true"; then
echo "Error: NixOS configuration '$name' not found" echo "Error: NixOS configuration '$name' not found"
@@ -82,12 +87,23 @@ function cmd_install() {
# Validate mainDiskID Exists # Validate mainDiskID Exists
if ! disk_id=$(nix eval --raw --impure \ if ! disk_id=$(nix eval --raw --impure \
--experimental-features "nix-command flakes" \ ".#nixosConfigurations.$name.config.disko.devices.disk.main.device" 2>/dev/null); then
".#nixosConfigurations.$name.config.mainDiskID" 2>/dev/null); then
echo "Error: mainDiskID not defined for configuration '$name'" echo "Error: mainDiskID not defined for configuration '$name'"
exit 1 exit 1
fi fi
# Remote or Local
if [ -n "$remote" ]; then
cmd_install_remote "$name" "$remote"
else
cmd_install_local "$name" "$disk_id"
fi
}
function cmd_install_local(){
local name="$1"
local disk_id="$2"
# Validate Disk Exists # Validate Disk Exists
if [ ! -e "$disk_id" ]; then if [ ! -e "$disk_id" ]; then
echo "Error: Disk $disk_id not found on system" echo "Error: Disk $disk_id not found on system"
@@ -134,6 +150,27 @@ function cmd_install() {
sudo reboot sudo reboot
} }
function cmd_install_remote(){
local name="$1"
local remote="$2"
# Prompt Install
read -p "This will completely wipe and install NixOS on $remote with configuration $name. Continue? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Operation Cancelled"
exit 1
fi
# Install NixOS
echo "Installing $name to remote host: $remote"
if ! nix run github:nix-community/nixos-anywhere -- --flake ".#$name" --target-host "$remote"; then
echo "Error: Remote NixOS installation failed"
exit 1
fi
echo "Successfully installed $name to remote host: $remote"
}
case "$1" in case "$1" in
image) image)
shift shift

263
flake.lock generated Normal file → Executable file
View File

@@ -1,15 +1,57 @@
{ {
"nodes": { "nodes": {
"apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766064315,
"narHash": "sha256-aMoYLYIj+yYGhDKuSromj+VZYnMyN3lRRAZ+dk1IOiE=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "f94f4496775f9ca6e8a9e9e83f5aa4e4210fbb5d",
"type": "github"
},
"original": {
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1765066094,
"narHash": "sha256-0YSU35gfRFJzx/lTGgOt6ubP8K6LeW0vaywzNNqxkl4=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "688427b1aab9afb478ca07989dc754fa543e03d5",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "nix-darwin-25.11",
"repo": "nix-darwin",
"type": "github"
}
},
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1739841949, "lastModified": 1766150702,
"narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=", "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "15dbf8cebd8e2655a883b74547108e089f051bf0", "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -18,6 +60,117 @@
"type": "github" "type": "github"
} }
}, },
"firefox-addons": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1766762570,
"narHash": "sha256-Nevsj5NYurwp3I6nSMeh3uirwoinVSbCldqOXu4smms=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "03d7d310ea91d6e4b47ed70aa86c781fcc5b38e1",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"flake-compat": {
"locked": {
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766553861,
"narHash": "sha256-ZbnG01yA3O8Yr1vUm3+NQ2qk9iRhS5bloAnuXHHy7+c=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0999ed8f965bbbd991437ad9c5ed3434cecbc30e",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1736643958, "lastModified": 1736643958,
@@ -41,11 +194,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737057290, "lastModified": 1764234087,
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=", "narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453", "rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -56,11 +209,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1738136902, "lastModified": 1763618868,
"narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=", "narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c", "rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -70,27 +223,107 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1739758141, "lastModified": 1766651565,
"narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=", "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c618e28f70257593de75a7044438efc1c1fc0791", "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.11", "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1766736597,
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"apple-silicon": "apple-silicon",
"darwin": "darwin",
"disko": "disko", "disko": "disko",
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1765361626,
"narHash": "sha256-kX0Dp/kYSRbQ+yd9e3lmmUWdNbipufvKfL2IzbrSpnY=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "c566ad8b7352c30ec3763435de7c8f1c46ebb357",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766289575,
"narHash": "sha256-BOKCwOQQIP4p9z8DasT5r+qjri3x7sPCOq+FTjY8Z+o=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "9836912e37aef546029e48c8749834735a6b9dad",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },

143
flake.nix Normal file → Executable file
View File

@@ -2,95 +2,80 @@
description = "NixOS Hosts"; description = "NixOS Hosts";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = { nixos-generators = {
url = "github:nix-community/nixos-generators"; url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, disko, nixos-generators }: outputs =
let inputs:
mkSystem = { systemConfig ? { }, moduleConfig }: nixpkgs.lib.nixosSystem { inputs.snowfall-lib.mkFlake {
system = "x86_64-linux"; inherit inputs;
modules = [ src = ./.;
snowfall = {
namespace = "reichard";
meta = {
title = "Reichard";
name = "reichard";
};
};
channels-config = {
allowUnfree = true;
permittedInsecurePackages = [
"intel-ocl-5.0-63503"
];
};
outputs-builder = channels: {
devShells = {
default = import ./shells/default/default.nix { pkgs = channels.nixpkgs; };
};
};
homes.modules = with inputs; [
sops-nix.homeManagerModules.sops
];
systems.modules = {
nixos = with inputs; [
disko.nixosModules.disko disko.nixosModules.disko
./lib/disk-config.nix sops-nix.nixosModules.sops
./lib/common-system.nix ./modules/nixos/common
systemConfig
({ ... }: moduleConfig)
]; ];
}; darwin = with inputs; [
in home-manager.darwinModules.home-manager
{ sops-nix.darwinModules.sops
# NixOS Generators
packages.x86_64-linux = {
# RKE2
rke2-image = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "vmware";
modules = [
./hosts/rke2-image.nix
]; ];
}; };
usb-image = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "raw-efi";
modules = [
./hosts/usb-image.nix
];
};
};
# NixOS Configurations
nixosConfigurations = {
# Office Server (LLaMA / ADS-B)
lin-va-office = mkSystem {
systemConfig = ./hosts/office-server.nix;
moduleConfig = {
hostName = "lin-va-office";
mainDiskID = "/dev/disk/by-id/ata-MTFDDAK512MBF-1AN1ZABHA_161212233628";
network = {
interface = "enp5s0";
address = "10.0.50.120";
defaultGateway = "10.0.50.254";
nameservers = [ "10.0.50.254" ];
};
};
};
# Utility Room Desktop
lin-va-utility = mkSystem {
systemConfig = ./hosts/utility-desktop.nix;
moduleConfig = {
hostName = "lin-va-utility";
mainDiskID = "/dev/disk/by-id/nvme-eui.0026b768429d3eb5";
network = {
interface = "eno1";
address = "10.0.20.50";
defaultGateway = "10.0.20.254";
nameservers = [ "10.0.20.254" ];
};
};
};
# Nix Builder
lin-va-nix-builder = mkSystem {
systemConfig = ./hosts/builder.nix;
moduleConfig = {
hostName = "lin-va-nix-builder";
mainDiskID = "/dev/xvda";
enableXenGuest = true;
network = {
interface = "enX0";
address = "10.0.50.130";
defaultGateway = "10.0.50.254";
nameservers = [ "10.0.50.254" ];
};
};
};
};
}; };
} }

View File

@@ -1,40 +0,0 @@
# Nix Home Manager Configuration
## Upgrade
```bash
# Update System Channels
sudo nix-channel --add https://nixos.org/channels/nixpkgs-24.11-darwin nixpkgs
sudo nix-channel --update
# Update Home Manager
nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
nix-channel --update
# Link Repo
ln -s /Users/evanreichard/Development/git/personal/nix/home-manager ~/.config/home-manager
# Build Home Manager
home-manager switch
```
## Clean Garbage
NOTE: This will remove previous generations
```bash
sudo nix-collect-garbage --delete-old
nix-collect-garbage --delete-old
```
## OS Update
`/etc/bashrc` may get overridden. To properly load Nix, prepend the following:
```bash
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
```

View File

@@ -1,18 +0,0 @@
{
programs.bash = {
enable = true;
shellAliases = {
grep = "grep --color";
ssh = "TERM=xterm-256color ssh";
flush_dns = "sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder";
};
profileExtra = ''
SHELL="$BASH"
PATH=~/.bin:$PATH
eval "$(thefuck --alias)"
set -o vi
bind "set show-mode-in-prompt on"
fastfetch
'';
};
}

View File

@@ -1,10 +0,0 @@
{
programs.btop = {
enable = true;
};
home.file.".config/btop/btop.conf".text =
builtins.readFile ./config/btop.conf;
home.file.".config/btop/themes/catppuccin_mocha.theme".text =
builtins.readFile ./config/catppuccin_mocha.theme;
}

View File

@@ -1,6 +0,0 @@
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View File

@@ -1,7 +0,0 @@
{
xdg.configFile = {
"fastfetch/config.jsonc" = {
source = ./config/config.jsonc;
};
};
}

View File

@@ -1,7 +0,0 @@
{
xdg.configFile = {
"ghostty/config" = {
source = ./config/ghostty.conf;
};
};
}

View File

@@ -1,72 +0,0 @@
{
programs.git = {
enable = true;
userName = "Evan Reichard";
aliases = {
lg = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15";
};
includes = [
{
path = "~/.config/git/work";
condition = "gitdir:~/Development/git/work/";
}
{
path = "~/.config/git/personal";
condition = "gitdir:~/Development/git/personal/";
}
];
extraConfig = {
core = {
autocrlf = "input";
safecrlf = "true";
excludesFile = "~/.config/git/.gitignore";
};
column = {
ui = "auto";
};
fetch = {
prune = true;
pruneTags = true;
all = true;
};
help = {
autocorrect = true;
};
diff = {
algorithm = "histogram";
colorMoved = "plain";
mnemonicPrefix = true;
renames = true;
};
rebase = {
autoSquash = true;
autoStash = true;
updateRefs = true;
};
rerere = {
enabled = true;
autoupdate = true;
};
commit = {
verbose = true;
};
branch = {
sort = "-committerdate";
};
merge = {
conflictstyle = "zdiff3";
};
push = {
autoSetupRemote = true;
};
};
};
# Copy Configuration
xdg.configFile = {
git = {
source = ./config;
recursive = true;
};
};
}

View File

@@ -1,86 +0,0 @@
{ pkgs, ... }:
let
inherit (pkgs.lib) optionals mkForce;
inherit (pkgs.stdenv) isLinux isDarwin;
in
{
imports = [
./bash
./btop
./direnv
./fastfetch
./ghostty
./git
./nvim
./powerline
./readline
./hyprland
./waybar
];
# Home Manager Config
home.stateVersion = "24.11";
home.username = "evanreichard";
home.homeDirectory = mkForce (if isLinux then "/home/evanreichard" else "/Users/evanreichard");
programs.home-manager.enable = true;
# Global Packages
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "Meslo" ]; })
# ghostty - Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788
android-tools
awscli2
bashInteractive
cw
fastfetch
gitAndTools.gh
google-cloud-sdk
imagemagick
kubectl
kubernetes-helm
mosh
pre-commit
python311
ssm-session-manager-plugin
texliveSmall # Pandoc PDF Dep
thefuck
tldr
]
++ optionals isLinux [
ghostty
hyprpaper
firefox
]
++ optionals isDarwin [ ];
# GitHub CLI
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
# Misc Programs
programs.jq.enable = true;
programs.k9s.enable = true;
programs.pandoc.enable = true;
# Enable Flakes & Commands
nix = {
package = mkForce pkgs.nix;
settings = {
experimental-features = "nix-command flakes";
};
};
# SQLite Configuration
home.file.".sqliterc".text = ''
.headers on
.mode column
'';
# Darwin Spotlight Indexing Hack
disabledModules = [ "targets/darwin/linkapps.nix" ];
}

View File

@@ -1,296 +0,0 @@
# #######################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
################
### MONITORS ###
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1.0
# monitor=HDMI-A-1,1920x1080,0x0,1
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = ghostty
$fileManager = dolphin
$menu = wofi --show drun
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
exec-once = waybar & $terminal & firefox
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 5
gaps_out = 20
border_size = 2
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 10
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
enabled = yes, please :)
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = easeOutQuint,0.23,1,0.32,1
bezier = easeInOutCubic,0.65,0.05,0.36,1
bezier = linear,0,0,1,1
bezier = almostLinear,0.5,0.5,0.75,1.0
bezier = quick,0.15,0,0.1,1
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
}
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
###################
### KEYBINDINGS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

View File

@@ -1,8 +0,0 @@
{ pkgs, lib, ... }:
lib.mkIf pkgs.stdenv.isLinux {
wayland.windowManager.hyprland = {
enable = true;
extraConfig = builtins.readFile ./config/hyprland.conf;
};
}

View File

@@ -1,8 +0,0 @@
require('aerial').setup({
on_attach = function(bufnr)
vim.keymap.set('n', '{', '<cmd>AerialPrev<CR>', {buffer = bufnr})
vim.keymap.set('n', '}', '<cmd>AerialNext<CR>', {buffer = bufnr})
end
})
vim.keymap.set('n', '<leader>a', '<cmd>AerialToggle!<CR>')

View File

@@ -1,66 +0,0 @@
-- Set Theme
-- vim.g.nord_borders = true
-- vim.g.nord_contrast = true
-- vim.cmd('colorscheme nord')
vim.cmd('colorscheme melange')
-- Set Leader
vim.keymap.set("n", "<Space>", "<Nop>", {silent = true})
vim.g.mapleader = " "
-- Set Timeout
vim.opt.timeoutlen = 250
-- Disable NetRW
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Set Term Colors
vim.opt.termguicolors = true
-- Synchronize with system clipboard
vim.opt.clipboard = "unnamed"
-- Always show the signcolumn
vim.opt.signcolumn = "yes"
-- Set nowrap, line numbers, hightlight search
vim.opt.wrap = false
vim.opt.nu = true
vim.opt.hlsearch = true
vim.opt.shiftwidth = 2
-- Set fold settings
vim.opt.foldmethod = "indent"
vim.opt.foldnestmax = 10
vim.opt.foldlevel = 2
-- Diagnostics Mappings
local diagnostics_active = true
local toggle_diagnostics = function()
diagnostics_active = not diagnostics_active
if diagnostics_active then
vim.diagnostic.enable()
else
vim.diagnostic.disable()
end
end
local diagnostics_loclist_active = false
local toggle_diagnostics_loclist = function()
diagnostics_loclist_active = not diagnostics_loclist_active
if diagnostics_loclist_active then
vim.diagnostic.setloclist()
else
vim.cmd('lclose')
end
end
local opts = {noremap = true, silent = true}
vim.keymap.set('n', '<leader>qt', toggle_diagnostics, opts)
vim.keymap.set('n', '<leader>qN',
function() vim.diagnostic.goto_prev({float = false}) end, opts)
vim.keymap.set('n', '<leader>qn',
function() vim.diagnostic.goto_next({float = false}) end, opts)
vim.keymap.set('n', '<leader>qq', toggle_diagnostics_loclist, opts)
vim.keymap.set('n', '<leader>qe', vim.diagnostic.open_float, opts)

View File

@@ -1,71 +0,0 @@
local cmp = require('cmp')
require("luasnip.loaders.from_vscode").lazy_load()
-- Check Tab Completion
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col,
col)
:match("%s") == nil
end
cmp.setup({
snippet = {
expand = function(args) require'luasnip'.lsp_expand(args.body) end
},
mapping = cmp.mapping.preset.insert({
-- Tab Completion
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, {"i", "s"}),
-- Reverse Tab Completion
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, {"i", "s"}),
-- Misc Mappings
['<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})
}),
-- Default Sources
sources = cmp.config.sources({
{name = 'nvim_lsp'}, {name = 'luasnip'}, {name = 'path'},
{name = 'buffer'}
})
})
-- Completion - `/` and `?`
cmp.setup.cmdline({'/', '?'}, {
mapping = cmp.mapping.preset.cmdline(),
sources = {{name = 'buffer'}}
})
-- Completion = `:`
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({{name = 'path'}, {name = 'cmdline'}})
})
-- Autopairs
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())

View File

@@ -1,70 +0,0 @@
local dap = require("dap")
local dapui = require("dapui")
local dapgo = require("dap-go")
dapui.setup({
controls = {
element = "repl",
enabled = true,
icons = {
disconnect = "",
pause = "",
play = "",
run_last = "",
step_back = "",
step_into = "",
step_out = "",
step_over = "",
terminate = ""
}
},
element_mappings = {},
expand_lines = false,
floating = {border = "single", mappings = {close = {"q", "<Esc>"}}},
force_buffers = true,
icons = {collapsed = "", current_frame = "", expanded = ""},
layouts = {
{
elements = {{id = "repl", size = 0.5}, {id = "scopes", size = 0.5}},
position = "bottom",
size = 10
}, {
elements = {
{id = "breakpoints", size = 0.5}, {id = "stacks", size = 0.5}
},
position = "left",
size = 40
}
},
mappings = {
edit = "e",
expand = {"<CR>", "<2-LeftMouse>"},
open = "o",
remove = "d",
repl = "r",
toggle = "t"
},
render = {indent = 1, max_value_lines = 100}
})
dapgo.setup()
-- Auto Open UI
dap.listeners.before.attach.dapui_config = function() dapui.open() end
dap.listeners.before.launch.dapui_config = function() dapui.open() end
-- Continue Hotkey ("c")
vim.api.nvim_create_autocmd("FileType", {
pattern = "dap-repl",
callback = function()
vim.api.nvim_buf_set_keymap(0, 'n', 'c',
"<cmd>lua require'dap'.continue()<CR>",
{noremap = true, silent = true})
end
})
-- Leader Keys
local opts = {noremap = true, silent = true}
vim.keymap.set('n', '<leader>db', dap.toggle_breakpoint, opts)
vim.keymap.set('n', '<leader>du', dapui.toggle, opts)
vim.keymap.set('n', '<leader>dc', dap.continue, opts)
vim.keymap.set('n', '<leader>dt', dapgo.debug_test, opts)

View File

@@ -1,6 +0,0 @@
vim.keymap.set('n', '<leader>go', '<cmd>DiffviewOpen<CR>')
vim.keymap.set('n', '<leader>gO', '<cmd>DiffviewOpen origin/main...HEAD<CR>')
vim.keymap.set('n', '<leader>gh', '<cmd>DiffviewFileHistory<CR>')
vim.keymap.set('n', '<leader>gH',
'<cmd>DiffviewFileHistory --range=origin..HEAD<CR>')
vim.keymap.set('n', '<leader>gc', '<cmd>DiffviewClose<CR>')

View File

@@ -1,41 +0,0 @@
function get_git_info()
local abs_path = vim.fn.expand("%:p")
local git_root = vim.fn.systemlist(
"git -C " .. vim.fn.escape(vim.fn.fnamemodify(abs_path, ":h"), " ") .. " rev-parse --show-toplevel"
)[1]
if vim.v.shell_error ~= 0 then
return
end
local git_repo = vim.fn.system("git remote get-url origin"):match("([^/:]+/[^/.]+)%.?[^/]*$"):gsub("\n", "")
local git_branch = vim.fn.system("git rev-parse --abbrev-ref HEAD"):gsub("\n", "")
return {
file = vim.fn.fnamemodify(abs_path, ":s?" .. git_root .. "/??"),
branch = git_branch,
repo = git_repo,
}
end
vim.keymap.set("v", "<Leader>gy", function()
local git_info = get_git_info()
if git_info == nil then
vim.notify("Failed to get git info", vim.log.levels.ERROR)
return
end
local start_line = vim.fn.line("v")
local end_line = vim.fn.line(".")
local message = string.format(
"https://github.com/%s/blob/%s/%s#L%d-L%d",
git_info.repo,
git_info.branch,
git_info.file,
start_line,
end_line
)
vim.fn.setreg("+", message)
vim.notify("Copied:\n\t" .. message, vim.log.levels.INFO)
end, { noremap = true, silent = true, desc = "Copy GitHub Link" })

View File

@@ -1,16 +0,0 @@
require('gitsigns').setup {
on_attach = function(bufnr)
local gitsigns = require('gitsigns')
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
map('n', '<leader>gb', gitsigns.toggle_current_line_blame)
map('n', '<leader>gB', function()
gitsigns.blame_line {full = true}
end)
end
}

View File

@@ -1,20 +0,0 @@
-- Configure LLama LLM
vim.g.llama_config = {
endpoint = "http://10.0.50.120:8080/infill",
api_key = "",
n_prefix = 256,
n_suffix = 64,
n_predict = 256,
t_max_prompt_ms = 500,
t_max_predict_ms = 500,
show_info = 2,
auto_fim = true,
max_line_suffix = 8,
max_cache_keys = 256,
ring_n_chunks = 8,
ring_chunk_size = 32,
ring_scope = 512,
ring_update_ms = 1000,
}
-- require("gen").setup({ model = "codegemma" })

View File

@@ -1,237 +0,0 @@
------------------------------------------------------
------------------- Custom Settings ------------------
------------------------------------------------------
vim.api.nvim_create_autocmd("FileType", {
pattern = "go",
callback = function()
vim.bo.textwidth = 120
end,
})
vim.filetype.add({
extension = {
templ = "templ",
},
})
------------------------------------------------------
-------------------- Built-in LSP --------------------
------------------------------------------------------
local nix_vars = require("nix-vars")
local nvim_lsp = require("lspconfig")
local on_attach = function(client, bufnr)
local bufopts = { noremap = true, silent = true, buffer = bufnr }
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ async = false, timeout_ms = 2000 })
end,
})
end
vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
vim.keymap.set("n", "<leader>lD", vim.lsp.buf.declaration, bufopts)
vim.keymap.set("n", "<leader>ld", vim.lsp.buf.definition, bufopts)
vim.keymap.set("n", "<leader>li", vim.lsp.buf.implementation, bufopts)
vim.keymap.set("n", "<leader>ln", vim.lsp.buf.rename, bufopts)
vim.keymap.set("n", "<leader>lr", vim.lsp.buf.references, bufopts)
vim.keymap.set("n", "<leader>lt", vim.lsp.buf.type_definition, bufopts)
vim.keymap.set("n", "<leader>lf", function()
vim.lsp.buf.format({ async = true, timeout_ms = 2000 })
end, bufopts)
end
local on_attach_no_formatting = function(client, bufnr)
-- Disable Formatting
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
on_attach(client, bufnr)
end
local organize_go_imports = function()
local encoding = vim.lsp.util._get_offset_encoding()
local params = vim.lsp.util.make_range_params(nil, encoding)
params.context = { only = { "source.organizeImports" } }
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000)
for _, res in pairs(result or {}) do
for _, r in pairs(res.result or {}) do
if r.edit then
vim.lsp.util.apply_workspace_edit(r.edit, encoding)
else
vim.lsp.buf.execute_command(r.command)
end
end
end
end
-- Define LSP Flags & Capabilities
local lsp_flags = { debounce_text_changes = 150 }
local capabilities = require("cmp_nvim_lsp").default_capabilities()
-- Python LSP Configuration
nvim_lsp.pyright.setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
})
-- HTML LSP Configuration
nvim_lsp.html.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.vscls .. "/bin/vscode-html-language-server", "--stdio" },
})
-- JSON LSP Configuration
nvim_lsp.jsonls.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.vscls .. "/bin/vscode-html-language-server", "--stdio" },
})
-- CSS LSP Configuration
nvim_lsp.cssls.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.vscls .. "/bin/vscode-html-language-server", "--stdio" },
})
-- Typescript / Javascript LSP Configuration
nvim_lsp.ts_ls.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.tsls, "--stdio" },
})
-- Svelte LSP Configuration
nvim_lsp.svelte.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.sveltels, "--stdio" },
})
-- Lua LSP Configuration
nvim_lsp.lua_ls.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.luals },
})
-- Templ LSP Configuration
nvim_lsp.templ.setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
})
-- Nix LSP Configuration
nvim_lsp.nil_ls.setup({
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
})
-- Go LSP Configuration
nvim_lsp.gopls.setup({
on_attach = function(client, bufnr)
on_attach(client, bufnr)
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = organize_go_imports,
})
end,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.gopls },
settings = {
gopls = {
buildFlags = { "-tags=e2e" },
},
},
})
-- Go LSP Linting
nvim_lsp.golangci_lint_ls.setup({
on_attach = on_attach_no_formatting,
flags = lsp_flags,
capabilities = capabilities,
cmd = { nix_vars.golintls },
init_options = {
command = {
"golangci-lint",
"run",
"--out-format",
"json",
"--issues-exit-code=1",
},
},
})
------------------------------------------------------
--------------------- Null-LS LSP --------------------
------------------------------------------------------
local null_ls = require("null-ls")
local eslintFiles = {
".eslintrc",
".eslintrc.js",
".eslintrc.cjs",
".eslintrc.yaml",
".eslintrc.yml",
".eslintrc.json",
"eslint.config.js",
"eslint.config.mjs",
"eslint.config.cjs",
"eslint.config.ts",
"eslint.config.mts",
"eslint.config.cts",
}
has_eslint_in_parents = function(fname)
root_file = nvim_lsp.util.insert_package_json(eslintFiles, "eslintConfig", fname)
return nvim_lsp.util.root_pattern(unpack(root_file))(fname)
end
null_ls.setup({
sources = {
-- Prettier Formatting
null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }),
require("none-ls.diagnostics.eslint_d").with({
condition = function(utils)
return has_eslint_in_parents(vim.fn.getcwd())
end,
}),
null_ls.builtins.completion.spell,
null_ls.builtins.formatting.nixpkgs_fmt,
null_ls.builtins.formatting.stylua,
null_ls.builtins.diagnostics.sqlfluff,
null_ls.builtins.formatting.sqlfluff,
},
on_attach = function(client, bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ async = false, timeout_ms = 2000 })
end,
})
end
end,
})

View File

@@ -1,2 +0,0 @@
require("lsp_lines").setup()
vim.diagnostic.config({virtual_text = false})

View File

@@ -1,49 +0,0 @@
-- Cached variable
local cached_pr_status = ""
-- Read process output
local function read_output(err, data)
if err then return end
if not data then return end
cached_pr_status = data
end
-- Spawn process
local function execute_command()
local stdout = vim.loop.new_pipe(false)
local spawn_opts = {
detached = true,
stdio = {nil, stdout, nil},
args = {"-c", "gh pr checks | awk -F'\t' '{ print $2 }'"}
}
vim.loop.spawn("bash", spawn_opts,
function() stdout:read_start(read_output) end)
end
-- Spawn & schedule process
execute_command()
vim.fn.timer_start(300000, execute_command)
-- Return status from cache
function pr_status()
--   
--    
--
-- PENDING COLOR - #d29922
-- PASS COLOR - #3fb950
-- FAIL COLOR - #f85149
return cached_pr_status:gsub("\n", ""):gsub("fail", ""):gsub("pass",
"")
:gsub("pending", ""):gsub("skipping", ""):sub(1, -2)
end
require('lualine').setup({
options = {
theme = "gruvbox_dark"
-- theme = "nord"
-- theme = "OceanicNext",
},
sections = {lualine_c = {{pr_status}}}
})

View File

@@ -1,2 +0,0 @@
require("neo-tree").setup({ window = { mappings = { ["<space>"] = "none" } } })
vim.keymap.set("n", "<leader>t", ":Neotree toggle<CR>", { silent = true })

View File

@@ -1,26 +0,0 @@
-- Noice Doc Scrolling
vim.keymap.set("n", "<c-f>", function()
if not require("noice.lsp").scroll(4) then return "<c-f>" end
end, {silent = true, expr = true})
vim.keymap.set("n", "<c-b>", function()
if not require("noice.lsp").scroll(-4) then return "<c-b>" end
end, {silent = true, expr = true})
-- Noice Setup
require("noice").setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = false
},
signature = {enabled = false}
},
presets = {
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false -- add a border to hover docs and signature help
}
})

View File

@@ -1,10 +0,0 @@
local silicon = require('silicon')
silicon.setup({})
vim.keymap.set('v', '<Leader>ss', function() silicon.visualise_api({}) end)
vim.keymap.set('v', '<Leader>sb',
function() silicon.visualise_api({show_buf = true}) end)
vim.keymap.set('n', '<Leader>sv',
function() silicon.visualise_api({visible = true}) end)
vim.keymap.set('n', '<Leader>sb',
function() silicon.visualise_api({show_buf = true}) end)

View File

@@ -1,20 +0,0 @@
require('telescope').setup {
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case"
}
}
}
require('telescope').load_extension('fzf')
require("telescope").load_extension("ui-select")
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', '<leader>fj', builtin.jumplist, {})

View File

@@ -1,20 +0,0 @@
require("toggleterm").setup({open_mapping = [[<c-\>]]})
-- Get PR status on terminal load
-- require("toggleterm").setup({
-- open_mapping = [[<c-\>]],
-- on_create = function(term)
-- vim.cmd("startinsert")
-- term:send("gh pr checks")
-- end
-- })
-- Duplicate C-w & Esc Behavior
function _G.set_terminal_keymaps()
local opts = {buffer = 0}
vim.opt.signcolumn = "no"
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
end
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')

View File

@@ -1,3 +0,0 @@
require'nvim-treesitter.configs'.setup {
highlight = {enable = true, additional_vim_regex_highlighting = false}
}

View File

@@ -1,47 +0,0 @@
local wk = require("which-key")
wk.setup({})
wk.add({
{ "<C-k>", desc = "Signature Help" },
{ "<leader>a", desc = "Aerial" },
{ "<leader>d", group = "Debug" },
{ "<leader>db", desc = "Toggle Breakpoint" },
{ "<leader>dc", desc = "Continue" },
{ "<leader>dt", desc = "Run Test" },
{ "<leader>du", desc = "Toggle UI" },
{ "<leader>f", group = "Find - Telescope" },
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Find Buffer" },
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find File" },
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live Grep" },
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help Tags" },
{ "<leader>fj", "<cmd>Telescope jumplist<cr>", desc = "Jump List" },
{ "<leader>g", group = "DiffView" },
{ "<leader>gB", desc = "Git Blame Full" },
{ "<leader>gH", "<cmd>DiffviewFileHistory --range=origin..HEAD<cr>", desc = "Diff History - Main" },
{ "<leader>gO", "<cmd>DiffviewOpen origin/main...HEAD<cr>", desc = "Open Diff - Main" },
{ "<leader>gb", desc = "Git Blame Line" },
{ "<leader>gc", "<cmd>DiffviewClose<cr>", desc = "Close Diff" },
{ "<leader>gh", "<cmd>DiffviewFileHistory<cr>", desc = "Diff History" },
{ "<leader>go", "<cmd>DiffviewOpen<cr>", desc = "Open Diff - Current" },
{ "<leader>l", group = "LSP" },
{ "<leader>lD", desc = "Declaration" },
{ "<leader>ld", desc = "Definition" },
{ "<leader>lf", desc = "Format" },
{ "<leader>li", desc = "Implementation" },
{ "<leader>ln", desc = "Rename" },
{ "<leader>lr", desc = "References" },
{ "<leader>lt", desc = "Type Definition" },
{ "<leader>q", group = "Diagnostics" },
{ "<leader>qN", desc = "Previous Diagnostic" },
{ "<leader>qe", desc = "Open Diagnostic Float" },
{ "<leader>qn", desc = "Next Diagnostic" },
{ "<leader>qq", desc = "Toggle Diagnostic List" },
{ "<leader>qt", desc = "Toggle Inline Diagnostics" },
{ "<leader>sv", desc = "Visual Screenshot" },
{ "<leader>t", desc = "NeoTree" },
{ "K", desc = "Definition Hover" },
{ "<leader>ss", desc = "Selected Screenshot", mode = "v" },
{ "<leader>s", group = "Screenshot", mode = { "n", "v" } },
{ "<leader>sb", desc = "Buffer Screenshot", mode = { "n", "v" } },
})

View File

@@ -1,194 +0,0 @@
{ pkgs, ... }:
{
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
plugins = with pkgs.vimPlugins; [
# ------------------
# --- Completion ---
# ------------------
cmp-buffer # Buffer Word Completion
cmp-cmdline # Command Line Completion
cmp-nvim-lsp # Main LSP
cmp-path # Path Completion
cmp_luasnip # Snippets Completion
friendly-snippets # Snippets
lsp_lines-nvim # Inline Diagnostics
luasnip # Snippets
nvim-cmp # Completions
nvim-lspconfig # LSP Config
# -------------------
# ----- Helpers -----
# -------------------
aerial-nvim # Code Outline
comment-nvim # Code Comments
diffview-nvim # Diff View
gitsigns-nvim # Git Blame
leap-nvim # Quick Movement
markdown-preview-nvim # Markdown Preview
neo-tree-nvim # File Explorer
none-ls-nvim # Formatters
numb-nvim # Peek / Jump to Lines
nvim-autopairs # Automatically Close Pairs (),[],{}
telescope-fzf-native-nvim # Faster Telescope
telescope-nvim # Fuzzy Finder
telescope-ui-select-nvim # UI
toggleterm-nvim # Terminal Helper
vim-nix # Nix Helpers
which-key-nvim # Shortcut Helper
# ------------------
# --- Theme / UI ---
# ------------------
lualine-nvim # Bottom Line
noice-nvim # UI Tweaks
# nord-nvim # Theme
melange-nvim # Theme
nvim-notify # Noice Dependency
nvim-web-devicons # Dev Icons
# ------------------
# --- Treesitter ---
# ------------------
nvim-treesitter-context
nvim-treesitter.withAllGrammars
# -------------------
# ------- DAP -------
# -------------------
nvim-dap
nvim-dap-go
nvim-dap-ui
# --------------------
# -- NONE-LS EXTRAS --
# --------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "none-ls-extras.nvim";
version = "2024-06-11";
src = pkgs.fetchFromGitHub {
owner = "nvimtools";
repo = "none-ls-extras.nvim";
rev = "336e84b9e43c0effb735b08798ffac382920053b";
sha256 = "sha256-UtU4oWSRTKdEoMz3w8Pk95sROuo3LEwxSDAm169wxwk=";
};
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
}
)
# -------------------
# ----- Silicon -----
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "silicon.lua";
version = "2022-12-03";
src = pkgs.fetchFromGitHub {
owner = "mhanberg";
repo = "silicon.lua";
rev = "5ca462bee0a39b058786bc7fbeb5d16ea49f3a23";
sha256 = "0vlp645d5mmii513v72jca931miyrhkvhwb9bfzhix1199zx7vi2";
};
meta.homepage = "https://github.com/mhanberg/silicon.lua/";
}
)
# -------------------
# ------- LLM -------
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "llm.nvim";
version = "2024-05-25";
src = pkgs.fetchFromGitHub {
owner = "David-Kunz";
repo = "gen.nvim";
rev = "bd19cf584b5b82123de977b44105e855e61e5f39";
sha256 = "sha256-0AEB6im8Jz5foYzmL6KEGSAYo48g1bkFpjlCSWT6JeE=";
};
meta.homepage = "https://github.com/David-Kunz/gen.nvim/";
}
)
# -------------------
# ---- LLAMA.VIM ----
# -------------------
(
pkgs.vimUtils.buildVimPlugin {
pname = "llama.vim";
version = "2025-01-23";
src = pkgs.fetchFromGitHub {
owner = "ggml-org";
repo = "llama.vim";
rev = "143fe910b8d47a054ed464c38d8b7c17d5354468";
sha256 = "sha256-PW0HKzhSxcZiWzpDOuy98rl/X0o2nE7tMjZjwwh0qLE=";
};
meta.homepage = "https://github.com/ggml-org/llama.vim/";
}
)
];
extraPackages = with pkgs; [
# Telescope Dependencies
fd
ripgrep
tree-sitter
# LSP Dependencies
go
golangci-lint
golangci-lint-langserver
gopls
lua-language-server
nil
nodePackages.eslint
nodePackages.svelte-language-server
nodePackages.typescript
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
pyright
eslint_d
# Formatters
luaformatter
nixpkgs-fmt
nodePackages.prettier
sqlfluff
stylua
# Silicon
silicon
];
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
};
xdg.configFile = {
# Copy Configuration
nvim = {
source = ./config;
recursive = true;
};
# Generate Nix Vars
"nvim/lua/nix-vars.lua".text = ''
local nix_vars = {
gopls = "${pkgs.gopls}/bin/gopls",
luals = "${pkgs.lua-language-server}/bin/lua-language-server",
sveltels = "${pkgs.nodePackages.svelte-language-server}/bin/svelteserver",
tsls = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server",
golintls = "${pkgs.golangci-lint-langserver}/bin/golangci-lint-langserver",
vscls = "${pkgs.nodePackages.vscode-langservers-extracted}",
}
return nix_vars
'';
};
}

View File

@@ -1,16 +0,0 @@
{
programs.powerline-go = {
enable = true;
settings = {
git-mode = "compact";
theme = "gruvbox";
};
modules = [
"host"
"cwd"
"git"
"docker"
"venv"
];
};
}

View File

@@ -1,10 +0,0 @@
{
programs.readline = {
enable = true;
extraConfig = ''
# Approximate VIM Dracula Colors
set vi-ins-mode-string \1\e[01;38;5;23;48;5;231m\2 I \1\e[38;5;231;48;5;238m\2\1\e[0m\2
set vi-cmd-mode-string \1\e[01;38;5;22;48;5;148m\2 C \1\e[38;5;148;48;5;238m\2\1\e[0m\2
'';
};
}

View File

@@ -1,88 +0,0 @@
* {
border: none;
border-radius: 0;
font-family:
Cartograph CF Nerd Font,
monospace;
font-weight: bold;
font-size: 14px;
min-height: 0;
}
window#waybar {
background: rgba(21, 18, 27, 0);
color: #cdd6f4;
}
tooltip {
}
#workspaces button {
}
#workspaces button.active {
color: #9ccfd8;
}
#workspaces button.focused {
color: #9ccfd8;
}
#workspaces button.urgent {
}
#workspaces button:hover {
}
#custom-language,
#custom-updates,
#custom-caffeine,
#custom-weather,
#window,
#clock,
#battery,
#pulseaudio,
#network,
#workspaces,
#tray,
#backlight {
}
#tray {
}
#workspaces {
}
#custom-caffeine {
}
#custom-language {
}
#custom-updates {
}
#window {
}
#clock {
}
#network {
}
#pulseaudio {
}
#pulseaudio.microphone {
}
#battery {
}
#custom-weather {
}
#custom-endright {
}

View File

@@ -1,114 +0,0 @@
{ lib, pkgs, ... }:
lib.mkIf pkgs.stdenv.isLinux {
programs.waybar = {
enable = true;
style = builtins.readFile ./config/style.css;
settings = [{
layer = "top";
position = "top";
mod = "dock";
exclusive = true;
passtrough = false;
gtk-layer-shell = true;
height = 0;
modules-left = [
"hyprland/workspaces"
"custom/divider"
"custom/divider"
"cpu"
"custom/divider"
"memory"
];
modules-center = [ "hyprland/window" ];
modules-right = [
"tray"
"network"
"custom/divider"
"backlight"
"custom/divider"
"pulseaudio"
"custom/divider"
"battery"
"custom/divider"
"clock"
];
"hyprland/window" = { format = "{}"; };
"wlr/workspaces" = {
on-scroll-up = "hyprctl dispatch workspace e+1";
on-scroll-down = "hyprctl dispatch workspace e-1";
all-outputs = true;
on-click = "activate";
};
battery = { format = "󰁹 {}%"; };
cpu = {
interval = 10;
format = "󰻠 {}%";
max-length = 10;
on-click = "";
};
memory = {
interval = 30;
format = " {}%";
format-alt = " {used:0.1f}G";
max-length = 10;
};
backlight = {
format = "󰖨 {}";
device = "acpi_video0";
};
tray = {
icon-size = 13;
tooltip = false;
spacing = 10;
};
network = {
format = "󰖩 {essid}";
format-disconnected = "󰖪 disconnected";
};
clock = {
format = " {:%I:%M %p %m/%d} ";
tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
};
pulseaudio = {
format = "{icon} {volume}%";
tooltip = false;
format-muted = " Muted";
on-click = "pamixer -t";
on-scroll-up = "pamixer -i 5";
on-scroll-down = "pamixer -d 5";
scroll-step = 5;
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ];
};
};
"pulseaudio#microphone" = {
format = "{format_source}";
tooltip = false;
format-source = " {volume}%";
format-source-muted = " Muted";
on-click = "pamixer --default-source -t";
on-scroll-up = "pamixer --default-source -i 5";
on-scroll-down = "pamixer --default-source -d 5";
scroll-step = 5;
};
"custom/divider" = {
format = " | ";
interval = "once";
tooltip = false;
};
"custom/endright" = {
format = "_";
interval = "once";
tooltip = false;
};
}];
};
}

View File

@@ -0,0 +1,34 @@
{ lib
, config
, namespace
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "25.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
programs = {
graphical = {
ghostty = enabled;
ghidra = enabled;
};
terminal = {
btop = enabled;
direnv = enabled;
git = enabled;
k9s = enabled;
nvim = enabled;
opencode = enabled;
};
};
};
}

View File

@@ -0,0 +1,46 @@
{ pkgs
, lib
, config
, namespace
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "25.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
programs = {
graphical = {
ghostty = enabled;
};
terminal = {
aws = enabled;
btop = enabled;
claude-code = enabled;
direnv = enabled;
git = enabled;
k9s = enabled;
nvim = enabled;
opencode = enabled;
};
};
};
# Global Packages
programs.jq = enabled;
programs.pandoc = enabled;
home.packages = with pkgs; [
colima
docker
reichard.qwen-code
codex
];
}

View File

@@ -0,0 +1,81 @@
{ pkgs
, lib
, config
, namespace
, osConfig
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "25.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
services = {
ssh-agent = enabled;
fusuma = enabled;
swww = enabled;
sops = {
enable = true;
defaultSopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
};
};
programs = {
graphical = {
wms.hyprland = {
enable = true;
monitors = [
",highres,auto,2" # Optional - 1.68
];
};
ghostty = enabled;
ghidra = enabled;
browsers.firefox = {
enable = true;
gpuAcceleration = true;
hardwareDecoding = true;
};
};
terminal = {
btop = enabled;
direnv = enabled;
git = enabled;
k9s = enabled;
nvim = enabled;
};
};
};
dconf = {
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "catppuccin-macchiato-mauve-cursors";
cursor-size = 24;
};
};
};
home.pointerCursor = {
gtk.enable = true;
name = "catppuccin-macchiato-mauve-cursors";
package = pkgs.catppuccin-cursors.macchiatoMauve;
size = 24;
};
# Kubernetes Secrets
sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
rke2_kubeconfig = {
path = "${config.home.homeDirectory}/.kube/rke2";
};
};
}

View File

@@ -0,0 +1,31 @@
{ lib
, config
, namespace
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "25.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
services = {
ssh-agent = enabled;
};
programs = {
terminal = {
bash = enabled;
btop = enabled;
direnv = enabled;
tmux = enabled;
};
};
};
}

View File

@@ -0,0 +1,36 @@
{ lib
, config
, namespace
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "25.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
services = {
ssh-agent = enabled;
};
programs = {
terminal = {
bash = enabled;
btop = enabled;
claude-code = enabled;
direnv = enabled;
git = enabled;
k9s = enabled;
nvim = enabled;
opencode = enabled;
tmux = enabled;
};
};
};
}

View File

@@ -0,0 +1,81 @@
{ pkgs
, lib
, config
, namespace
, osConfig
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "25.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
services = {
ssh-agent = enabled;
fusuma = enabled;
swww = enabled;
poweralertd = enabled;
sops = {
enable = true;
defaultSopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
};
};
programs = {
graphical = {
wms.hyprland = enabled;
ghostty = enabled;
strawberry = enabled;
gimp = enabled;
wireshark = enabled;
ghidra = enabled;
remmina = enabled;
browsers.firefox = {
enable = true;
gpuAcceleration = true;
hardwareDecoding = true;
};
};
terminal = {
btop = enabled;
direnv = enabled;
git = enabled;
k9s = enabled;
nvim = enabled;
};
};
};
dconf = {
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "catppuccin-macchiato-mauve-cursors";
cursor-size = 24;
};
};
};
home.pointerCursor = {
gtk.enable = true;
name = "catppuccin-macchiato-mauve-cursors";
package = pkgs.catppuccin-cursors.macchiatoMauve;
size = 24;
};
# Kubernetes Secrets
sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
rke2_kubeconfig = {
path = "${config.home.homeDirectory}/.kube/rke2";
};
};
}

View File

@@ -0,0 +1,84 @@
{ pkgs
, lib
, config
, namespace
, osConfig
, ...
}:
let
inherit (lib.${namespace}) enabled;
in
{
home.stateVersion = "24.11";
reichard = {
user = {
enable = true;
inherit (config.snowfallorg.user) name;
};
services = {
ssh-agent = enabled;
fusuma = enabled;
swww = enabled;
sops = {
enable = true;
defaultSopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
};
};
programs = {
graphical = {
wms.hyprland = enabled;
ghostty = enabled;
ghidra = enabled;
browsers.firefox = {
enable = true;
gpuAcceleration = true;
hardwareDecoding = true;
};
};
terminal = {
btop = enabled;
direnv = enabled;
git = enabled;
k9s = enabled;
nvim = enabled;
};
};
};
# home.packages = with pkgs; [
# catppuccin-gtk
# ];
dconf = {
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "catppuccin-macchiato-mauve-cursors";
cursor-size = 24;
# enable-hot-corners = false;
# font-name = osConfig.${namespace}.system.fonts.default;
# gtk-theme = cfg.theme.name;
# icon-theme = cfg.icon.name;
};
};
};
home.pointerCursor = {
gtk.enable = true;
name = "catppuccin-macchiato-mauve-cursors";
package = pkgs.catppuccin-cursors.macchiatoMauve;
size = 24;
};
# Kubernetes Secrets
sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
rke2_kubeconfig = {
path = "${config.home.homeDirectory}/.kube/rke2";
};
};
}

View File

@@ -1,19 +0,0 @@
{ pkgs, ... }:
{
# User Authorized Keys
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIe1n9l9pVF5+kjWJCOt3AvBVf1HOSZkEDZxCWVPSIkr evan@reichard"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEGGGpRpDQRstoqnCAQioSnh6PZRzNQL7lGJHksIkcoF builder"
];
hashedPassword = null;
};
# System Packages
environment.systemPackages = with pkgs; [
htop
tmux
vim
];
}

View File

@@ -1,175 +0,0 @@
{ config, pkgs, ... }:
let
cuda-llama = (pkgs.llama-cpp.override {
cudaSupport = true;
}).overrideAttrs (oldAttrs: {
cmakeFlags = oldAttrs.cmakeFlags ++ [
"-DGGML_CUDA_ENABLE_UNIFIED_MEMORY=1"
# Disable CPU Instructions - Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
"-DLLAMA_FMA=OFF"
"-DLLAMA_AVX2=OFF"
"-DLLAMA_AVX512=OFF"
"-DGGML_FMA=OFF"
"-DGGML_AVX2=OFF"
"-DGGML_AVX512=OFF"
];
});
# Define Model Vars
modelDir = "/models";
# 7B
# modelName = "qwen2.5-coder-7b-q8_0.gguf";
# modelUrl = "https://huggingface.co/ggml-org/Qwen2.5-Coder-7B-Q8_0-GGUF/resolve/main/${modelName}?download=true";
# 3B
modelName = "qwen2.5-coder-3b-q8_0.gguf";
modelUrl = "https://huggingface.co/ggml-org/Qwen2.5-Coder-3B-Q8_0-GGUF/resolve/main/${modelName}?download=true";
modelPath = "${modelDir}/${modelName}";
in
{
# Allow Nvidia & CUDA
nixpkgs.config.allowUnfree = true;
# Enable Graphics
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = [ pkgs.cudatoolkit ];
};
# Load Nvidia Driver Module
services.xserver.videoDrivers = [ "nvidia" ];
# Nvidia Package Configuration
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = true;
open = false;
nvidiaSettings = true;
};
# Networking Configuration
networking.firewall = {
enable = true;
allowedTCPPorts = [
1234 # RTL-TCP
8080 # LLama API
];
};
# RTL-SDR
hardware.rtl-sdr.enable = true;
systemd.services = {
# LLama Download Model
download-model = {
description = "Download Model";
wantedBy = [ "multi-user.target" ];
before = [ "llama-cpp.service" ];
path = [ pkgs.curl pkgs.coreutils ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
User = "root";
Group = "root";
};
script = ''
set -euo pipefail
if [ ! -f "${modelPath}" ]; then
mkdir -p "${modelDir}"
# Add -f flag to follow redirects and -L for location
# Add --fail flag to exit with error on HTTP errors
# Add -C - to resume interrupted downloads
curl -f -L -C - \
-H "Accept: application/octet-stream" \
--retry 3 \
--retry-delay 5 \
--max-time 1800 \
"${modelUrl}" \
-o "${modelPath}.tmp" && \
mv "${modelPath}.tmp" "${modelPath}"
fi
'';
};
# RTL-SDR TCP Server Service
rtl-tcp = {
description = "RTL-SDR TCP Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.rtl-sdr}/bin/rtl_tcp -a 0.0.0.0 -f 1090000000 -s 2400000";
Restart = "on-failure";
RestartSec = "10s";
User = "root";
Group = "root";
};
};
};
# Setup LLama API Service
systemd.services.llama-cpp = {
after = [ "download-model.service" ];
requires = [ "download-model.service" ];
};
# Enable LLama API
services.llama-cpp = {
enable = true;
host = "0.0.0.0";
package = cuda-llama;
model = modelPath;
port = 8080;
openFirewall = true;
# 7B
# extraFlags = [
# "-ngl"
# "99"
# "-fa"
# "-ub"
# "512"
# "-b"
# "512"
# "-dt"
# "0.1"
# "--ctx-size"
# "4096"
# "--cache-reuse"
# "256"
# ];
# 3B
extraFlags = [
"-ngl"
"99"
"-fa"
"-ub"
"1024"
"-b"
"1024"
"--ctx-size"
"0"
"--cache-reuse"
"256"
];
};
# System Packages
environment.systemPackages = with pkgs; [
htop
nvtopPackages.full
rtl-sdr
tmux
vim
wget
];
}

View File

@@ -1,189 +0,0 @@
{ pkgs, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
config = {
# Basic System
system.stateVersion = "24.11";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
time.timeZone = "UTC";
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
boot = {
initrd = {
availableKernelModules = [
# Xen
"xen_blkfront"
"xen_netfront"
];
kernelModules = [ "xen_netfront" "xen_blkfront" ];
supportedFilesystems = [ "ext4" "xenfs" ];
};
kernelModules = [
# Xen VM Requirements
"xen_netfront"
"xen_blkfront"
"xenfs"
# iSCSI
"iscsi_tcp"
];
};
# Add Intel Arc A310 GPU Drivers
nixpkgs.config.allowUnfree = true;
hardware.enableRedistributableFirmware = true;
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
libvdpau-va-gl
intel-vaapi-driver
intel-media-driver
intel-compute-runtime
intel-ocl
];
};
# Network Configuration
networking = {
hostName = lib.mkForce "";
useNetworkd = true;
useDHCP = false;
firewall = {
enable = true;
allowedTCPPorts = [
# RKE2 Ports - https://docs.rke2.io/install/requirements#networking
6443 # Kubernetes API
9345 # RKE2 supervisor API
2379 # etcd Client Port
2380 # etcd Peer Port
2381 # etcd Metrics Port
10250 # kubelet metrics
9099 # Canal CNI health checks
];
allowedUDPPorts = [
# RKE2 Ports - https://docs.rke2.io/install/requirements#networking
8472 # Canal CNI with VXLAN
# 51820 # Canal CNI with WireGuard IPv4 (if using encryption)
# 51821 # Canal CNI with WireGuard IPv6 (if using encryption)
];
# Allow Multicast
extraCommands = ''
iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
'';
};
};
services = {
# Enable Xen Guest Utilities
xe-guest-utilities.enable = true;
# Enable iSCSI
openiscsi = {
enable = true;
name = "iqn.2025.placeholder:initiator"; # Overridden @ Runtime
};
# Cloud Init
cloud-init = {
enable = true;
network.enable = true;
settings = {
datasource_list = [ "NoCloud" ];
preserve_hostname = false;
system_info.distro = "nixos";
system_info.network.renderers = [ "networkd" ];
};
};
# Enable SSH
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
# Enable RKE2
rke2 = {
enable = true;
disable = [ "rke2-ingress-nginx" ];
};
};
systemd.services = {
# RKE2 - Wait Cloud Init
rke2-server = {
after = [ "cloud-final.service" ];
requires = [ "cloud-final.service" ];
};
# Runtime iSCSI Initiator Setup
iscsi-initiator-setup = {
description = "Setup iSCSI Initiator Name";
requires = [ "cloud-final.service" ];
before = [ "iscsid.service" ];
after = [ "cloud-final.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
path = [ pkgs.hostname pkgs.util-linux ];
script = ''
mkdir -p /run/iscsi
echo "InitiatorName=iqn.2025.org.nixos:$(hostname)" > /run/iscsi/initiatorname.iscsi
mount --bind /run/iscsi/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
'';
};
};
# User Authorized Keys
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIe1n9l9pVF5+kjWJCOt3AvBVf1HOSZkEDZxCWVPSIkr evan@reichard"
];
hashedPassword = null;
};
# Add Symlinks Expected by Democratic
system.activationScripts = {
iscsi-initiator = ''
mkdir -p /usr/bin
ln -sf ${pkgs.openiscsi}/bin/iscsiadm /usr/bin/iscsiadm
ln -sf ${pkgs.openiscsi}/bin/iscsid /usr/bin/iscsid
'';
};
# System Packages
environment = {
systemPackages = with pkgs; [
htop
intel-gpu-tools
k9s
kubectl
kubernetes-helm
nfs-utils
openiscsi
tmux
vim
];
# Don't Manage - Runtime Generation
etc."iscsi/initiatorname.iscsi".enable = false;
};
};
}

View File

@@ -1,46 +0,0 @@
{ pkgs, ... }:
{
# Basic System
system.stateVersion = "24.11";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
time.timeZone = "UTC";
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
# SSH
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
# Firewall Configuration
networking.firewall = {
enable = true;
allowedTCPPorts = [
22
];
};
# User Authorized Keys
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIe1n9l9pVF5+kjWJCOt3AvBVf1HOSZkEDZxCWVPSIkr evan@reichard"
];
hashedPassword = null;
};
# System Packages
environment.systemPackages = with pkgs; [
htop
tmux
vim
];
}

View File

@@ -1,57 +0,0 @@
{ pkgs, ... }:
let
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz";
sha256 = "156hc11bb6xiypj65q6gzkhw1gw31dwv6dfh6rnv20hgig1sbfld";
};
in
{
imports = [
"${home-manager}/nixos"
];
# Enable Graphics
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];
};
# User Configuration
users.users.evanreichard = {
isNormalUser = true;
home = "/home/evanreichard";
group = "evanreichard";
extraGroups = [ "wheel" "networkmanager" "video" ];
shell = pkgs.bash;
};
users.groups.evanreichard = { };
# Home Manager
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.evanreichard = import ../home-manager/home.nix;
};
# Enable HyprLand
programs.hyprland = {
enable = true;
withUWSM = true;
};
# Networking Configuration
networking.firewall = {
enable = true;
};
# System Packages
environment.systemPackages = with pkgs; [
ghostty
htop
tmux
vim
wget
];
}

View File

@@ -1,103 +0,0 @@
{ config, lib, ... }:
{
# NixOS Config
options = {
hostName = lib.mkOption {
type = lib.types.str;
description = "The node hostname";
};
enableXenGuest = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether to enable Xen guest support";
};
network = lib.mkOption {
type = lib.types.submodule {
options = {
interface = lib.mkOption {
type = lib.types.str;
description = "Network interface name";
example = "enp0s3";
};
address = lib.mkOption {
type = lib.types.str;
description = "Static IP address";
example = "10.0.20.200";
};
defaultGateway = lib.mkOption {
type = lib.types.str;
description = "Default gateway IP";
example = "10.0.20.254";
};
nameservers = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of DNS servers";
example = [ "10.0.20.254" "8.8.8.8" ];
default = [ "8.8.8.8" "8.8.4.4" ];
};
};
};
default = null;
description = "Network configuration";
};
};
config = lib.mkMerge [
{
# Basic System
system.stateVersion = "24.11";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = config.hostName;
# Boot Loader Options
boot.loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
# Enable SSH
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
# User Authorized Keys
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIe1n9l9pVF5+kjWJCOt3AvBVf1HOSZkEDZxCWVPSIkr evan@reichard"
];
hashedPassword = null;
};
}
# Network Configuration
(lib.mkIf (config.network != null) {
networking = {
inherit (config.network) defaultGateway nameservers;
interfaces.${config.network.interface}.ipv4.addresses = [{
inherit (config.network) address;
prefixLength = 24;
}];
};
})
# Xen Guest Configuration
(lib.mkIf config.enableXenGuest {
services.xe-guest-utilities.enable = true;
boot.initrd = {
availableKernelModules = [ "xen_blkfront" "xen_netfront" ];
kernelModules = [ "xen_netfront" "xen_blkfront" ];
supportedFilesystems = [ "ext4" "xenfs" ];
};
boot.kernelModules = [ "xen_netfront" "xen_blkfront" "xenfs" ];
})
];
}

View File

@@ -1,43 +0,0 @@
{ config, lib, ... }: {
options = {
mainDiskID = lib.mkOption {
type = lib.types.str;
description = "Device path for the main disk";
example = "/dev/disk/by-id/ata-VBOX_HARDDISK_VBcd9425b8-d666f9b8";
};
};
config = {
disko.devices = {
disk = {
main = {
type = "disk";
device = config.mainDiskID;
content = {
type = "gpt";
partitions = {
boot = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
}

19
lib/module/default.nix Normal file
View File

@@ -0,0 +1,19 @@
{ lib, ... }:
let
inherit (lib) mkOption types;
in
rec {
mkOpt =
type: default: description:
mkOption { inherit type default description; };
mkBoolOpt = mkOpt types.bool;
enabled = {
enable = true;
};
disabled = {
enable = false;
};
}

View File

@@ -0,0 +1,8 @@
{
config = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
};
}

View File

@@ -0,0 +1,103 @@
{ config, lib, pkgs, inputs, namespace, host, ... }:
let
inherit (lib) types mkIf;
inherit (lib.${namespace}) mkBoolOpt mkOpt;
cfg = config.${namespace}.nix;
in
{
options.${namespace}.nix = {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
usingDeterminate = mkBoolOpt false "Whether we're using determinate nix";
package = mkOpt types.package pkgs.nixVersions.latest "Which nix package to use.";
};
config = mkIf cfg.enable {
nix =
let
mappedRegistry = lib.pipe inputs [
(lib.filterAttrs (_: lib.isType "flake"))
(lib.mapAttrs (_: flake: { inherit flake; }))
(x: x // {
nixpkgs.flake = if pkgs.stdenv.hostPlatform.isLinux then inputs.nixpkgs else inputs.nixpkgs-unstable;
})
(x: if pkgs.stdenv.hostPlatform.isDarwin then lib.removeAttrs x [ "nixpkgs-unstable" ] else x)
];
users = [
"root"
"@wheel"
"nix-builder"
"evanreichard"
];
in
{
inherit (cfg) package;
buildMachines = lib.optional (config.${namespace}.security.sops.enable && host != "nixos-builder") {
hostName = "10.0.50.130";
systems = [ "x86_64-linux" ];
sshUser = "evanreichard";
protocol = "ssh";
sshKey = config.sops.secrets.builder_ssh_key.path;
supportedFeatures = [
"benchmark"
"big-parallel"
"nixos-test"
"kvm"
];
};
checkConfig = true;
distributedBuilds = true;
optimise.automatic = !cfg.usingDeterminate;
registry = lib.mkForce mappedRegistry;
gc = {
automatic = !cfg.usingDeterminate;
options = "--delete-older-than 7d";
};
settings = {
connect-timeout = 5;
allowed-users = users;
max-jobs = "auto";
auto-optimise-store = pkgs.stdenv.hostPlatform.isLinux;
builders-use-substitutes = true;
experimental-features = [
"nix-command"
"flakes "
];
flake-registry = "/etc/nix/registry.json";
http-connections = 50;
keep-derivations = true;
keep-going = true;
keep-outputs = true;
log-lines = 50;
sandbox = true;
trusted-users = users;
warn-dirty = false;
use-xdg-base-directories = true;
substituters = [
"https://anyrun.cachix.org"
"https://cache.nixos.org"
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://nixpkgs-unfree.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://numtide.cachix.org"
];
trusted-public-keys = [
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
];
};
};
};
}

View File

@@ -0,0 +1,31 @@
{ config, lib, namespace, ... }:
let
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.security.sops;
in
{
options.${namespace}.security.sops = {
enable = lib.mkEnableOption "sops";
defaultSopsFile = mkOpt lib.types.path null "Default sops file.";
sshKeyPaths = mkOpt (with lib.types; listOf path) [
"/etc/ssh/ssh_host_ed25519_key"
] "SSH Key paths to use.";
};
config = lib.mkIf cfg.enable {
sops = {
inherit (cfg) defaultSopsFile;
age = {
inherit (cfg) sshKeyPaths;
keyFile = "${config.users.users.${config.${namespace}.user.name}.home}/.config/sops/age/keys.txt";
};
};
sops.secrets.builder_ssh_key = {
sopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
};
};
}

View File

@@ -0,0 +1,20 @@
{ config, namespace, lib, ... }:
let
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.security.sops;
in
{
options.${namespace}.services.openssh = with lib.types; {
enable = lib.mkEnableOption "OpenSSH support";
authorizedKeys = mkOpt (listOf str) [ ] "The public keys to apply.";
extraConfig = mkOpt str "" "Extra configuration to apply.";
port = mkOpt port 2222 "The port to listen on (in addition to 22).";
};
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
};
};
}

View File

@@ -0,0 +1,23 @@
{ config, lib, namespace, pkgs, ... }:
let
inherit (lib) types mkIf;
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.user;
in
{
options.${namespace}.user = with types; {
name = mkOpt str "evanreichard" "The name to use for the user account.";
email = mkOpt str "evan@reichard.io" "The email of the user.";
fullName = mkOpt str "Evan Reichard" "The full name of the user.";
uid = mkOpt (types.nullOr types.int) 501 "The uid for the user account.";
};
config = {
users.users.${cfg.name} = {
uid = mkIf (cfg.uid != null) cfg.uid;
shell = pkgs.bashInteractive;
home = "/Users/${cfg.name}";
};
};
}

View File

@@ -0,0 +1,121 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib)
types
mkIf
mkMerge
optionalAttrs
;
inherit (lib.${namespace}) mkBoolOpt mkOpt;
cfg = config.${namespace}.programs.graphical.browsers.firefox;
in
{
imports = lib.snowfall.fs.get-non-default-nix-files ./.;
options.${namespace}.programs.graphical.browsers.firefox = with types; {
enable = lib.mkEnableOption "Firefox";
extraConfig = mkOpt str "" "Extra configuration for the user profile JS file.";
gpuAcceleration = mkBoolOpt false "Enable GPU acceleration.";
hardwareDecoding = mkBoolOpt false "Enable hardware video decoding.";
policies = mkOpt attrs
{
CaptivePortal = false;
DisableFirefoxStudies = true;
DisableFormHistory = true;
DisablePocket = true;
DisableTelemetry = true;
DisplayBookmarksToolbar = false;
DontCheckDefaultBrowser = true;
FirefoxHome = {
Pocket = false;
Snippets = false;
};
PasswordManagerEnabled = false;
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
GenerativeAI = {
Chatbot = false;
LinkPreviews = false;
TabGroups = false;
Locked = false;
};
ExtensionSettings = {
# Block All
# "*".installation_mode = "blocked";
# Bypass Paywalls
"magnolia@12.34" = {
install_url = "https://gitflic.ru/project/magnolia1234/bpc_uploads/blob/raw?file=bypass_paywalls_clean-latest.xpi";
installation_mode = "force_installed";
};
};
Preferences = { };
} "Policies to apply to firefox";
settings = mkOpt attrs { } "Settings to apply to the profile.";
extensions.packages = mkOpt (with lib.types; listOf package)
(with pkgs.firefox-addons; [
bitwarden
darkreader
gruvbox-dark-theme
kagi-search
sponsorblock
ublock-origin
# bypass-paywalls-clean
]) "Extensions to install";
};
config = mkIf cfg.enable {
programs.firefox = {
enable = true;
inherit (cfg) policies;
profiles = {
${config.${namespace}.user.name} = {
inherit (cfg) extraConfig extensions;
inherit (config.${namespace}.user) name;
id = 0;
settings = mkMerge [
cfg.settings
{
"browser.aboutConfig.showWarning" = false;
"browser.aboutwelcome.enabled" = false;
"browser.sessionstore.warnOnQuit" = true;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.shell.checkDefaultBrowser" = false;
"general.smoothScroll.msdPhysics.enabled" = true;
"intl.accept_languages" = "en-US,en";
"ui.key.accelKey" = "224";
# "devtools.chrome.enabled" = true;
# "xpinstall.signatures.required" = false;
}
(optionalAttrs cfg.gpuAcceleration {
"dom.webgpu.enabled" = true;
"gfx.webrender.all" = true;
"layers.gpu-process.enabled" = true;
"layers.mlgpu.enabled" = true;
})
(optionalAttrs cfg.hardwareDecoding {
"media.ffmpeg.vaapi.enabled" = true;
"media.gpu-process-decoder" = true;
"media.hardware-video-decoding.enabled" = true;
})
];
# userChrome = ./chrome/userChrome.css;
};
};
};
};
}

View File

@@ -0,0 +1,14 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.programs.graphical.ghidra;
in
{
options.${namespace}.programs.graphical.ghidra = {
enable = mkEnableOption "Enable Ghidra";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ ghidra ];
};
}

View File

@@ -0,0 +1,23 @@
# https://github.com/catppuccin/ghostty/blob/main/themes/catppuccin-macchiato.conf
palette = 0=#494d64
palette = 1=#ed8796
palette = 2=#a6da95
palette = 3=#eed49f
palette = 4=#8aadf4
palette = 5=#f5bde6
palette = 6=#8bd5ca
palette = 7=#b8c0e0
palette = 8=#5b6078
palette = 9=#ed8796
palette = 10=#a6da95
palette = 11=#eed49f
palette = 12=#8aadf4
palette = 13=#f5bde6
palette = 14=#8bd5ca
palette = 15=#a5adcb
background = 24273a
foreground = cad3f5
cursor-color = f4dbd6
cursor-text = 24273a
selection-background = 3a3e53
selection-foreground = cad3f5

View File

@@ -0,0 +1,23 @@
# https://github.com/catppuccin/ghostty/blob/main/themes/catppuccin-mocha.conf
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#bac2de
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#f9e2af
palette = 12=#89b4fa
palette = 13=#f5c2e7
palette = 14=#94e2d5
palette = 15=#a6adc8
background = 1e1e2e
foreground = cdd6f4
cursor-color = f5e0dc
cursor-text = 1e1e2e
selection-background = 353749
selection-foreground = cdd6f4

View File

@@ -1,8 +1,3 @@
command = bash --login
macos-titlebar-style = tabs
auto-update = off
font-family = "MesloLGM Nerd Font Mono"
# Melange Dark - Adapted From: https://github.com/savq/melange-nvim/blob/master/term/kitty/melange_dark.conf # Melange Dark - Adapted From: https://github.com/savq/melange-nvim/blob/master/term/kitty/melange_dark.conf
palette = 0=#34302C palette = 0=#34302C
palette = 1=#BD8183 palette = 1=#BD8183

View File

@@ -0,0 +1,58 @@
command = @BASH_PATH@ --login
macos-titlebar-style = tabs
auto-update = off
font-family = "MesloLGM Nerd Font Mono"
confirm-close-surface = true
# Keybindings - Tabs & Splits
keybind = cmd+t=new_tab
keybind = cmd+w=close_surface
keybind = cmd+d=new_split:right
keybind = cmd+shift+d=new_split:down
keybind = cmd+shift+enter=toggle_split_zoom
# Keybindings - Navigation - Splits
keybind = cmd+left=goto_split:left
keybind = cmd+right=goto_split:right
keybind = cmd+up=goto_split:up
keybind = cmd+down=goto_split:down
keybind = cmd+]=goto_split:next
keybind = cmd+[=goto_split:previous
# Keybindings - Navigation - Tabs
keybind = cmd+1=goto_tab:1
keybind = cmd+2=goto_tab:2
keybind = cmd+3=goto_tab:3
keybind = cmd+4=goto_tab:4
keybind = cmd+5=goto_tab:5
keybind = cmd+6=goto_tab:6
keybind = cmd+7=goto_tab:7
keybind = cmd+8=goto_tab:8
keybind = cmd+9=goto_tab:9
keybind = performable:cmd+c=copy_to_clipboard
keybind = performable:cmd+v=paste_from_clipboard
# https://github.com/catppuccin/ghostty/blob/main/themes/catppuccin-mocha.conf
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#bac2de
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#f9e2af
palette = 12=#89b4fa
palette = 13=#f5c2e7
palette = 14=#94e2d5
palette = 15=#a6adc8
background = 1e1e2e
foreground = cdd6f4
cursor-color = f5e0dc
cursor-text = 1e1e2e
selection-background = 353749
selection-foreground = cdd6f4

View File

@@ -0,0 +1,30 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (pkgs.stdenv) isLinux;
inherit (lib) mkIf mkEnableOption optionals;
cfg = config.${namespace}.programs.graphical.ghostty;
in
{
options.${namespace}.programs.graphical.ghostty = {
enable = mkEnableOption "Ghostty";
};
config = mkIf cfg.enable {
# Enable Bash
${namespace}.programs.terminal.bash.enable = true;
# Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788
home.packages = with pkgs; optionals isLinux [
ghostty
];
home.file.".config/ghostty/config".text =
let
bashPath = "${pkgs.bashInteractive}/bin/bash";
in
builtins.replaceStrings
[ "@BASH_PATH@" ]
[ bashPath ]
(builtins.readFile ./config/ghostty.conf);
};
}

View File

@@ -0,0 +1,17 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.programs.graphical.gimp;
in
{
options.${namespace}.programs.graphical.gimp = {
enable = mkEnableOption "GIMP";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
gimp-with-plugins
];
};
}

View File

@@ -0,0 +1,17 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.programs.graphical.remmina;
in
{
options.${namespace}.programs.graphical.remmina = {
enable = mkEnableOption "Remmina";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
remmina
];
};
}

View File

@@ -0,0 +1,17 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.programs.graphical.strawberry;
in
{
options.${namespace}.programs.graphical.strawberry = {
enable = mkEnableOption "Enable Strawberry";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
strawberry
libgpod
];
};
}

View File

@@ -0,0 +1,17 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.programs.graphical.wireshark;
in
{
options.${namespace}.programs.graphical.wireshark = {
enable = mkEnableOption "Wireshark";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
wireshark
];
};
}

View File

@@ -0,0 +1,155 @@
exec-once = uwsm app -- waybar
exec-once = uwsm app -- $terminal
exec-once = uwsm app -- firefox
general {
gaps_in = 5
gaps_out = 12
border_size = 2
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 10
active_opacity = 1.0
inactive_opacity = 1.0
shadow {
enabled = true
range = 4
render_power = 3
color = rgba(1a1a1aee)
}
blur {
enabled = true
size = 3
passes = 1
vibrancy = 0.1696
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
#https://wiki.hyprland.org/Configuring/Animations/
animations {
enabled = yes, please :)
bezier = easeOutQuint,0.23,1,0.32,1
bezier = easeInOutCubic,0.65,0.05,0.36,1
bezier = linear,0,0,1,1
bezier = almostLinear,0.5,0.5,0.75,1.0
bezier = quick,0.15,0,0.1,1
animation = global, 1, 10, default
animation = border, 1, 5.39, easeOutQuint
animation = windows, 1, 4.79, easeOutQuint
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
animation = windowsOut, 1, 1.49, linear, popin 87%
animation = fadeIn, 1, 1.73, almostLinear
animation = fadeOut, 1, 1.46, almostLinear
animation = fade, 1, 3.03, quick
animation = layers, 1, 3.81, easeOutQuint
animation = layersIn, 1, 4, easeOutQuint, fade
animation = layersOut, 1, 1.5, linear, fade
animation = fadeLayersIn, 1, 1.79, almostLinear
animation = fadeLayersOut, 1, 1.39, almostLinear
animation = workspaces, 1, 1.94, almostLinear, fade
animation = workspacesIn, 1, 1.21, almostLinear, fade
animation = workspacesOut, 1, 1.94, almostLinear, fade
}
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0.0 # -1.0 - 1.0, 0 means no modification.
touchpad {
scroll_factor = 0.5
disable_while_typing = true
natural_scroll = true
clickfinger_behavior = true
tap-to-click = false
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gesture = 4, horizontal, workspace, invert
# Thinkpad Trackpoint
device {
name = tpps/2-elan-trackpoint
sensitivity = -0.3
}
##############################
### WINDOWS AND WORKSPACES ###
##############################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

View File

@@ -0,0 +1,146 @@
@define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd;
@define-color pink #f5c2e7;
@define-color mauve #cba6f7;
@define-color red #f38ba8;
@define-color maroon #eba0ac;
@define-color peach #fab387;
@define-color yellow #f9e2af;
@define-color green #a6e3a1;
@define-color teal #94e2d5;
@define-color sky #89dceb;
@define-color sapphire #74c7ec;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color text #cdd6f4;
@define-color subtext1 #bac2de;
@define-color subtext0 #a6adc8;
@define-color overlay2 #9399b2;
@define-color overlay1 #7f849c;
@define-color overlay0 #6c7086;
@define-color surface2 #585b70;
@define-color surface1 #45475a;
@define-color surface0 #313244;
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
/* Common Styles */
* {
font-family: FantasqueSansMono Nerd Font;
font-size: 14px;
min-height: 0;
}
/* Primary Waybar */
#waybar {
background: transparent;
color: @text;
}
/* Icon Only Sizes */
#network,
#backlight,
#battery {
font-size: 18px;
}
/* Node Styles */
#workspaces,
#window,
#tray,
#cpu,
#memory,
#pulseaudio,
#network,
#backlight,
#battery,
#clock {
margin-top: 1rem;
padding: 0.2px 1rem;
background-color: @surface0;
}
#workspaces button {
color: @lavender;
border-radius: 1rem;
}
#workspaces button.active {
color: @sky;
background-color: @surface2;
}
#workspaces button:hover {
color: @sapphire;
}
#window {
background: transparent;
margin-left: 0.5rem;
margin-right: 8rem; /* Notch */
}
#memory {
color: @blue;
}
#pulseaudio {
color: @maroon;
}
#network {
color: @mauve;
}
#cpu {
color: @peach;
}
#backlight {
color: @yellow;
}
#battery {
color: @green;
}
#battery.charging {
color: @green;
}
#battery.warning:not(.charging) {
color: @red;
}
/* Left Border Radius */
#clock,
#network,
#cpu,
#tray,
#workspaces {
margin-left: 0.5rem;
border-top-left-radius: 1rem;
border-bottom-left-radius: 1rem;
}
/* Right Border Radius */
#pulseaudio,
#clock,
#tray,
#battery,
#workspaces {
margin-right: 0.5rem;
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
}
#workspaces {
padding: 0px;
margin-left: 1rem;
}
#clock {
color: @blue;
margin-right: 1rem;
}

View File

@@ -0,0 +1,127 @@
window {
font-family: "Hack Nerd Font";
background: transparent;
}
#outer-box {
padding: 10px;
border-radius: 8px;
background: #2e3440;
}
#scroll {
/* The Nordic gtk theme adds an outline to show scroll areas... */
outline-color: transparent;
}
#input {
color: #e5e9f0;
caret-color: #e5e9f0;
background: #3b4252;
border-top-color: #3b4252;
border-left-color: #3b4252;
border-right-color: #3b4252;
border-bottom-color: #3b4252;
box-shadow: 0 0 0 1px transparent inset;
outline-color: transparent !important;
}
#input:focus {
background: #3b4252;
border-color: #3b4252 !important;
box-shadow: 0 0 0 1px transparent inset;
border-top-color: #3b4252 !important;
border-left-color: #3b4252 !important;
border-right-color: #3b4252 !important;
border-bottom-color: #3b4252 !important;
box-shadow: none !important;
outline-color: transparent !important;
}
#input image.left {
color: #d8dee9;
}
#input:focus image.left {
color: #e5e9f0;
}
#input image.right {
color: #d8dee9;
}
#input:focus image.right {
color: #e5e9f0;
}
label {
/* We set backgrounds on the block level. */
background: transparent;
}
#scroll {
padding-top: 6px;
}
#entry {
color: #4c566a;
padding: 8px 8px;
border-radius: 4px;
background: transparent;
}
#entry:selected {
color: #eceff4;
background: #8fbcbb;
font-weight: bold;
}
expander arrow {
margin-right: 8px;
}
#entry #selected #text {
color: #eceff4;
}
expander list {
margin-top: 8px;
/* background: #8fbcbb; */
background: transparent;
padding-left: 16px;
}
expander list #entry {
transition: none;
background: transparent;
}
expander list #entry:hover,
expander list #entry:active {
/* color: #8fbcbb;
background: #e5e9f0; */
}
expander list #entry #selected {
background: #8fbcbb;
}
expander list #entry #selected label {
color: #eceff4;
font-weight: bold;
}
expander list #entry:hover,
expander list #entry:active {
background: #8fbcbb;
}
expander list #entry:hover label,
expander list #entry:active label {
color: #eceff4;
font-weight: bold;
}
expander list label {
color: #d8dee9;
}

View File

@@ -0,0 +1,3 @@
stylesheet=./style.css
term=foot
insensitive=true

View File

@@ -0,0 +1,274 @@
{ lib, pkgs, config, namespace, ... }:
let
inherit (lib) types mkIf;
inherit (lib.${namespace}) mkOpt enabled;
cfg = config.${namespace}.programs.graphical.wms.hyprland;
in
{
options.${namespace}.programs.graphical.wms.hyprland = {
enable = lib.mkEnableOption "Hyprland";
mainMod = mkOpt types.str "SUPER" "Hyprland main modifier key";
monitors = mkOpt (with types; listOf str) [
", preferred, auto, 1"
] "Hyprland monitor configuration";
};
config = mkIf cfg.enable {
services.swaync = enabled;
wayland.windowManager.hyprland = {
enable = true;
extraConfig = builtins.readFile ./config/hyprland.conf;
settings = {
"$mainMod" = cfg.mainMod;
"$terminal" = "ghostty";
"$menu" = "wofi --show drun";
monitor = cfg.monitors;
bind = [
# Super Bindings (macOS Transition)
"ALT_SHIFT, 1, exec, hyprshot -m output"
"ALT_SHIFT, 2, exec, hyprshot -m window"
"ALT_SHIFT, 3, exec, hyprshot -m region"
# Primary Bindings
"$mainMod, SPACE, exec, $menu"
"$mainMod, RETURN, exec, $terminal"
"$mainMod, Q, killactive"
"$mainMod, M, exit"
"$mainMod, V, togglefloating"
"$mainMod, P, pin"
"$mainMod, J, togglesplit"
"$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, S, movetoworkspace, special:magic"
# Window Focus
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Workspace Switch
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Window Workspace Move
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
"$mainMod SHIFT, right, workspace, +1"
"$mainMod SHIFT, left, workspace, -1"
];
bindm = [
# Window Resizing
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindel = [
# Multimedia & Brightness Keys
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
# macOS Keyboard Brightness
"ALT, XF86MonBrightnessUp, exec, brightnessctl -d kbd_backlight s 10%+"
"ALT, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight s 10%-"
];
bindl = [
# Player Controls
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
];
};
};
programs.waybar = {
enable = true;
style = builtins.readFile ./config/waybar-style.css;
settings = [{
layer = "top";
position = "top";
mod = "dock";
exclusive = true;
passtrough = false;
gtk-layer-shell = true;
height = 0;
modules-left = [
"hyprland/workspaces"
"hyprland/window"
];
# modules-center = [ "hyprland/window" ];
modules-right = [
"tray"
"cpu"
"memory"
"pulseaudio"
"network"
"backlight"
"battery"
"clock"
];
"hyprland/window" = { format = "{}"; };
"wlr/workspaces" = {
on-scroll-up = "hyprctl dispatch workspace e+1";
on-scroll-down = "hyprctl dispatch workspace e-1";
all-outputs = true;
on-click = "activate";
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{icon}";
format-charging = "󰂄";
format-plugged = "󰂄";
format-alt = "{icon}";
format-icons = [
"󰂃"
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
};
cpu = {
interval = 10;
format = " {}%";
max-length = 10;
on-click = "";
};
memory = {
interval = 30;
format = " {}%";
format-alt = " {used:0.1f}G";
max-length = 10;
};
backlight = {
format = "{icon}";
format-icons = [
"󰋙"
"󰫃"
"󰫄"
"󰫅"
"󰫆"
"󰫇"
"󰫈"
];
on-scroll-up = "brightnessctl s 1%-";
on-scroll-down = "brightnessctl s +1%";
};
tray = {
icon-size = 13;
tooltip = false;
spacing = 10;
};
network = {
interval = 1;
format-wifi = "󰖩";
format-ethernet = "󰈀";
format-linked = "󰈁";
format-disconnected = "";
on-click-right = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
# tooltip-format = ''
# <big>Network Details</big>
# <tt><small>Interface: {ifname}</small></tt>
# <tt><small>IP: {ipaddr}/{cidr}</small></tt>
# <tt><small>Gateway: {gwaddr}</small></tt>
# <tt><small>󰜷 {bandwidthUpBytes}\n󰜮 {bandwidthDownBytes}</small></tt>'';
tooltip-format = ''
<big>Network Details</big>
<small>
Interface: {ifname}
SSID: {essid}
IP Address: {ipaddr}/{cidr}
Gateway: {gwaddr}
󰜷 {bandwidthUpBytes} / 󰜮 {bandwidthDownBytes}
</small>'';
};
clock = {
format = " {:%Y-%m-%d %H:%M:%S}";
interval = 1;
tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
};
pulseaudio = {
format = "{icon} {volume}%";
tooltip = false;
format-muted = " Muted";
on-click = "pamixer -t";
on-scroll-up = "pamixer -i 5";
on-scroll-down = "pamixer -d 5";
scroll-step = 5;
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ];
};
};
"pulseaudio#microphone" = {
format = "{format_source}";
tooltip = false;
format-source = " {volume}%";
format-source-muted = " Muted";
on-click = "pamixer --default-source -t";
on-scroll-up = "pamixer --default-source -i 5";
on-scroll-down = "pamixer --default-source -d 5";
scroll-step = 5;
};
}];
};
home.packages = with pkgs; [
brightnessctl
hyprshot
wofi
wofi-emoji
];
xdg.configFile = {
"wofi/config".source = ./config/wofi.conf;
"wofi/style.css".source = ./config/wofi-style.css;
"uwsp/env".text = ''
export XCURSOR_SIZE=64
'';
};
};
}

View File

@@ -0,0 +1,19 @@
{ lib, pkgs, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.aws;
in
{
options.${namespace}.programs.terminal.aws = {
enable = lib.mkEnableOption "AWS";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
aws-sso-util
awscli2
cw
ssm-session-manager-plugin
];
};
}

View File

@@ -0,0 +1,2 @@
.headers on
.mode column

View File

@@ -0,0 +1,82 @@
{ pkgs
, lib
, config
, namespace
, ...
}:
let
inherit (lib) mkIf optionalAttrs;
inherit (pkgs.stdenv) isLinux isDarwin;
cfg = config.${namespace}.programs.terminal.bash;
in
{
options.${namespace}.programs.terminal.bash = {
enable = lib.mkEnableOption "bash";
};
config = mkIf cfg.enable {
programs.bash = {
enable = true;
shellAliases = {
grep = "grep --color";
ssh = "TERM=xterm-256color ssh";
}
// optionalAttrs isLinux {
sync-watch = "watch -d grep -e Dirty: -e Writeback: /proc/meminfo";
}
// optionalAttrs isDarwin {
mosh = "mosh --ssh=\"/usr/bin/ssh\"";
};
profileExtra = ''
export COLORTERM=truecolor
SHELL="$BASH"
PATH=~/.bin:$PATH
bind "set show-mode-in-prompt on"
set -o vi || true
VISUAL=vim
EDITOR="$VISUAL"
if [ -z "$CLAUDE_CODE_ENTRYPOINT" ]; then
fastfetch
fi
[[ -f ~/.bash_custom ]] && . ~/.bash_custom
'';
};
programs.powerline-go = {
enable = true;
settings = {
git-mode = "compact";
theme = "gruvbox";
};
modules = [
"host"
"cwd"
"git"
"docker"
"venv"
];
};
programs.readline = {
enable = true;
extraConfig = ''
# Approximate VIM Dracula Colors
set vi-ins-mode-string \1\e[01;38;5;23;48;5;231m\2 I \1\e[38;5;231;48;5;238m\2\1\e[0m\2
set vi-cmd-mode-string \1\e[01;38;5;22;48;5;148m\2 C \1\e[38;5;148;48;5;238m\2\1\e[0m\2
'';
};
home.packages = with pkgs; [
bashInteractive
fastfetch
mosh
nerd-fonts.meslo-lg
];
home.file.".config/fastfetch/config.jsonc".text = builtins.readFile ./config/fastfetch.jsonc;
home.file.".sqliterc".text = builtins.readFile ./config/.sqliterc;
};
}

View File

@@ -0,0 +1,26 @@
{ lib
, pkgs
, config
, namespace
, ...
}:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.btop;
in
{
options.${namespace}.programs.terminal.btop = {
enable = lib.mkEnableOption "btop";
};
config = mkIf cfg.enable {
programs.btop = {
enable = true;
package = pkgs.btop-cuda;
};
home.file.".config/btop/btop.conf".text = builtins.readFile ./config/btop.conf;
home.file.".config/btop/themes/catppuccin_mocha.theme".text =
builtins.readFile ./config/catppuccin_mocha.theme;
};
}

View File

@@ -0,0 +1,81 @@
{ lib
, pkgs
, config
, namespace
, ...
}:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.claude-code;
in
{
options.${namespace}.programs.terminal.claude-code = {
enable = lib.mkEnableOption "enable claude-code";
};
config = mkIf cfg.enable {
programs.claude-code = {
enable = true;
mcpServers = {
gopls = {
type = "stdio";
command = "gopls";
args = [ "mcp" ];
};
};
};
programs.bash = lib.mkIf config.programs.bash.enable {
shellAliases = {
claude = "default_claude_custom";
};
initExtra =
let
baseUrl = "https://llm-api.va.reichard.io";
authToken = "placeholder";
in
''
default_claude_custom() {
local model_id=""
while [[ $# -gt 0 ]]; do
case $1 in
-m|--model)
model_id="$2"
shift 2
;;
*)
shift
;;
esac
done
if [ -z "$model_id" ]; then
echo "Error: Model ID is required. Usage: claude --model <model-id>"
return 1
fi
ANTHROPIC_BASE_URL="${baseUrl}" \
ANTHROPIC_AUTH_TOKEN="${authToken}" \
ANTHROPIC_MODEL="$model_id" \
ANTHROPIC_SMALL_FAST_MODEL="$model_id" \
${lib.getExe pkgs.claude-code}
}
# Completion Function
_complete_claude_custom() {
local cur=''${COMP_WORDS[COMP_CWORD]}
local prev=''${COMP_WORDS[COMP_CWORD-1]}
if [[ "$prev" == "-m" || "$prev" == "--model" ]]; then
local models=( $(${pkgs.curl}/bin/curl -s -H "Authorization: Bearer ${authToken}" "${baseUrl}/v1/models" | ${pkgs.jq}/bin/jq -r '.data[].id' 2>/dev/null) )
COMPREPLY=( $(compgen -W "''${models[*]}" -- "$cur") )
fi
}
# Register Completion
complete -F _complete_claude_custom claude
'';
};
};
}

View File

@@ -0,0 +1,17 @@
{ lib, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.direnv;
in
{
options.${namespace}.programs.terminal.direnv = {
enable = lib.mkEnableOption "direnv";
};
config = mkIf cfg.enable {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
}

View File

@@ -0,0 +1,3 @@
_scratch
.direnv
.envrc

View File

@@ -0,0 +1,98 @@
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.git;
in
{
options.${namespace}.programs.terminal.git = {
enable = lib.mkEnableOption "Git";
};
config = mkIf cfg.enable {
programs.git = {
enable = true;
settings = {
aliases = {
lg = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15";
};
user = {
name = "Evan Reichard";
email = "evan@reichard.io";
};
core = {
autocrlf = "input";
safecrlf = "true";
excludesFile = "~/.config/git/.gitignore";
};
column = {
ui = "auto";
};
fetch = {
prune = true;
pruneTags = true;
all = true;
};
help = {
autocorrect = true;
};
diff = {
algorithm = "histogram";
colorMoved = "plain";
mnemonicPrefix = true;
renames = true;
};
rebase = {
autoSquash = true;
autoStash = true;
updateRefs = true;
};
rerere = {
enabled = true;
autoupdate = true;
};
commit = {
verbose = true;
};
branch = {
sort = "-committerdate";
};
merge = {
conflictstyle = "zdiff3";
};
push = {
autoSetupRemote = true;
};
};
includes = [
{
path = "~/.config/git/work";
condition = "gitdir:~/Development/git/work/";
}
{
path = "~/.config/git/personal";
condition = "gitdir:~/Development/git/personal/";
}
];
};
programs.gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
home.packages = with pkgs; [
gh
pre-commit
];
# Copy Configuration
xdg.configFile = {
git = {
source = ./config;
recursive = true;
};
};
};
}

View File

@@ -0,0 +1,19 @@
{ lib, pkgs, config, namespace, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.k9s;
in
{
options.${namespace}.programs.terminal.k9s = {
enable = lib.mkEnableOption "k9s";
};
config = mkIf cfg.enable {
programs.k9s.enable = true;
home.packages = with pkgs; [
kubectl
kubernetes-helm
];
};
}

View File

@@ -0,0 +1,40 @@
-- Set Theme
-- vim.g.nord_borders = true
-- vim.g.nord_contrast = true
-- vim.cmd('colorscheme nord')
-- vim.cmd('colorscheme melange')
vim.cmd("colorscheme catppuccin-mocha")
-- Set User Shell
vim.o.shell = require("nix-vars").bash
-- Set Leader
vim.keymap.set("n", "<Space>", "<Nop>", { silent = true })
vim.g.mapleader = " "
-- Set Timeout
vim.opt.timeoutlen = 250
-- Disable NetRW
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Set Term Colors
vim.opt.termguicolors = true
-- Synchronize with system clipboard
vim.opt.clipboard:append("unnamedplus")
-- Always show the signcolumn
vim.opt.signcolumn = "yes"
-- Set nowrap, line numbers, hightlight search
vim.opt.wrap = false
vim.opt.nu = true
vim.opt.hlsearch = true
vim.opt.shiftwidth = 2
-- Set fold settings
vim.opt.foldmethod = "indent"
vim.opt.foldnestmax = 10
vim.opt.foldlevel = 2

View File

@@ -0,0 +1,71 @@
local cmp = require('cmp')
require("luasnip.loaders.from_vscode").lazy_load()
-- Check Tab Completion
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col,
col)
:match("%s") == nil
end
cmp.setup({
snippet = {
expand = function(args) require 'luasnip'.lsp_expand(args.body) end
},
mapping = cmp.mapping.preset.insert({
-- Tab Completion
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
-- Reverse Tab Completion
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
-- Misc Mappings
['<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 })
}),
-- Default Sources
sources = cmp.config.sources({
{ name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' },
{ name = 'buffer' }
})
})
-- Completion - `/` and `?`
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = { { name = 'buffer' } }
})
-- Completion = `:`
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ { name = 'path' }, { name = 'cmdline' } })
})
-- Autopairs
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())

View File

@@ -0,0 +1,70 @@
local dap = require("dap")
local dapui = require("dapui")
local dapgo = require("dap-go")
dapui.setup({
controls = {
element = "repl",
enabled = true,
icons = {
disconnect = "",
pause = "",
play = "",
run_last = "",
step_back = "",
step_into = "",
step_out = "",
step_over = "",
terminate = ""
}
},
element_mappings = {},
expand_lines = false,
floating = { border = "single", mappings = { close = { "q", "<Esc>" } } },
force_buffers = true,
icons = { collapsed = "", current_frame = "", expanded = "" },
layouts = {
{
elements = { { id = "repl", size = 0.5 }, { id = "scopes", size = 0.5 } },
position = "bottom",
size = 10
}, {
elements = {
{ id = "breakpoints", size = 0.5 }, { id = "stacks", size = 0.5 }
},
position = "left",
size = 40
}
},
mappings = {
edit = "e",
expand = { "<CR>", "<2-LeftMouse>" },
open = "o",
remove = "d",
repl = "r",
toggle = "t"
},
render = { indent = 1, max_value_lines = 100 }
})
dapgo.setup()
-- Auto Open UI
dap.listeners.before.attach.dapui_config = function() dapui.open() end
dap.listeners.before.launch.dapui_config = function() dapui.open() end
-- Continue Hotkey ("c")
vim.api.nvim_create_autocmd("FileType", {
pattern = "dap-repl",
callback = function()
vim.api.nvim_buf_set_keymap(0, 'n', 'c',
"<cmd>lua require'dap'.continue()<CR>",
{ noremap = true, silent = true })
end
})
-- Create KeyMaps
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<leader>db', dap.toggle_breakpoint, vim.tbl_extend("force", { desc = "Toggle Breakpoint" }, opts))
vim.keymap.set('n', '<leader>dc', dap.continue, vim.tbl_extend("force", { desc = "Continue" }, opts))
vim.keymap.set('n', '<leader>dt', dapgo.debug_test, vim.tbl_extend("force", { desc = "Run Test" }, opts))
vim.keymap.set('n', '<leader>du', dapui.toggle, vim.tbl_extend("force", { desc = "Toggle UI" }, opts))

View File

@@ -0,0 +1,35 @@
-- Diagnostics Mappings
local diagnostics_active = true
local toggle_diagnostics = function()
diagnostics_active = not diagnostics_active
if diagnostics_active then
vim.diagnostic.enable()
else
vim.diagnostic.disable()
end
end
local diagnostics_loclist_active = false
local toggle_diagnostics_loclist = function()
diagnostics_loclist_active = not diagnostics_loclist_active
if diagnostics_loclist_active then
vim.diagnostic.setloclist()
else
vim.cmd("lclose")
end
end
-- Create KeyMaps
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "<leader>qN", function()
vim.diagnostic.goto_prev({ float = false })
end, vim.tbl_extend("force", { desc = "Previous Diagnostic" }, opts))
vim.keymap.set("n", "<leader>qe", vim.diagnostic.open_float,
vim.tbl_extend("force", { desc = "Open Diagnostics" }, opts))
vim.keymap.set("n", "<leader>qt", toggle_diagnostics,
vim.tbl_extend("force", { desc = "Toggle Inline Diagnostics" }, opts))
vim.keymap.set("n", "<leader>qn", function()
vim.diagnostic.goto_next({ float = false })
end, vim.tbl_extend("force", { desc = "Next Diagnostic" }, opts))
vim.keymap.set("n", "<leader>qq", toggle_diagnostics_loclist,
vim.tbl_extend("force", { desc = "Toggle Diagnostic List" }, opts))

View File

@@ -0,0 +1,69 @@
require("gitsigns").setup({
current_line_blame = true,
current_line_blame_opts = { delay = 0 },
on_attach = function(bufnr)
local gitsigns = require("gitsigns")
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
map("n", "<leader>gb", gitsigns.toggle_current_line_blame, { desc = "Git Blame Line" })
map("n", "<leader>gB", function()
gitsigns.blame_line({ full = true })
end, { desc = "Git Blame Full" })
end,
})
local function get_git_info()
local abs_path = vim.fn.expand("%:p")
local git_root = vim.fn.systemlist(
"git -C " .. vim.fn.escape(vim.fn.fnamemodify(abs_path, ":h"), " ") .. " rev-parse --show-toplevel"
)[1]
if vim.v.shell_error ~= 0 then
return
end
local git_repo = vim.fn.system("git remote get-url origin"):match("([^/:]+/[^/.]+)%.?[^/]*$"):gsub("\n", "")
local git_branch = vim.fn.system("git rev-parse --abbrev-ref HEAD"):gsub("\n", "")
return {
file = vim.fn.fnamemodify(abs_path, ":s?" .. git_root .. "/??"),
branch = git_branch,
repo = git_repo,
}
end
local function copy_git_link()
local git_info = get_git_info()
if git_info == nil then
vim.notify("Failed to get git info", vim.log.levels.ERROR)
return
end
local start_line = vim.fn.line("v")
local end_line = vim.fn.line(".")
local message = string.format(
"https://github.com/%s/blob/%s/%s#L%d-L%d",
git_info.repo,
git_info.branch,
git_info.file,
start_line,
end_line
)
vim.fn.setreg("+", message)
vim.notify("Copied:\n\t" .. message, vim.log.levels.INFO)
end
-- Create KeyMaps
vim.keymap.set("v", "<Leader>gy", function() copy_git_link() end, { desc = "Copy GitHub Link" })
vim.keymap.set('n', '<leader>go', '<cmd>DiffviewOpen<CR>', { desc = "Open Diff - Current" })
vim.keymap.set('n', '<leader>gO', '<cmd>DiffviewOpen origin/main...HEAD<CR>', { desc = "Open Diff - Main" })
vim.keymap.set('n', '<leader>gh', '<cmd>DiffviewFileHistory<CR>', { desc = "Diff History" })
vim.keymap.set('n', '<leader>gH', '<cmd>DiffviewFileHistory --range=origin..HEAD<CR>', { desc = "Diff History - Main" })
vim.keymap.set('n', '<leader>gc', '<cmd>DiffviewClose<CR>', { desc = "Close Diff" })

View File

@@ -1,23 +1,19 @@
require("base") require("base")
require("aerial-config")
require("autopairs-config") require("autopairs-config")
require("cmp-config") require("cmp-config")
require("comment-config") require("comment-config")
require("dap-config") require("dap-config")
require("diffview-config") require("diagnostics-config")
require("git-ref") require("git-config")
require("git-signs")
require("llm")
require("leap-config") require("leap-config")
require("llm-config")
require("lsp-config") require("lsp-config")
require("lsp-lines-config")
require("lualine-config") require("lualine-config")
require("neotree-config")
require("noice-config") require("noice-config")
require("numb-config") require("numb-config")
require("silicon-config") require("octo-config")
require("telescope-config") require("snacks-config")
require("toggleterm-config") require("toggleterm-config")
require("ts-config") require("ts-config")
require("which-key-config")
require("weird-chars") require("weird-chars")
require("which-key-config")

Some files were not shown because too many files have changed in this diff Show More