Compare commits
85 Commits
0dd32db094
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6dc1ee512e | |||
| d64cc0e47b | |||
| 50b03508e1 | |||
| 0ed577e815 | |||
| 3089d6fdd1 | |||
| 8a5e2a9823 | |||
| cf5fadf040 | |||
| 23a871a1c9 | |||
| e804894036 | |||
| c60cb58d14 | |||
| 167c1d811c | |||
| bf9e3a044b | |||
| 56921235b3 | |||
| b111cf4197 | |||
| 567e8c10d2 | |||
| 3480837c26 | |||
| ad6de45681 | |||
| e7ee14a3c1 | |||
| 667df4e8e6 | |||
| 5c429b8a6b | |||
| 4f054051e5 | |||
| 318c6f6984 | |||
| 0c2bf58cfa | |||
| 70df72a6f5 | |||
| 8c417d8e56 | |||
| 7ce476adb3 | |||
| e173ddffc9 | |||
| eb0c28d2f0 | |||
| 2a40dc791d | |||
| 1098c68073 | |||
| 74e6684783 | |||
| 5b05dffb20 | |||
| 1d9517a37f | |||
| ff62814436 | |||
| be5c3e9cb8 | |||
| bf4148dab0 | |||
| fbb274a50a | |||
| 9159465836 | |||
| cff9bcaecc | |||
| 2492bb8825 | |||
| 788697561a | |||
| f6dbe8ad1d | |||
| 26f32d3225 | |||
| 9433abcaf4 | |||
| f5c4e6c9db | |||
| b970f6f550 | |||
| 93b7c6ee25 | |||
| cc045f225b | |||
| e63dd8d5d1 | |||
| 6b42b3cc22 | |||
| 73b9bf063e | |||
| dea1fc8790 | |||
| 57dbafb5a4 | |||
| 5bb653f561 | |||
| f09e2a9ec1 | |||
| 6cd0437fb5 | |||
| d6c908dc70 | |||
| b1981a2dcc | |||
| a58d02d1bd | |||
| c2af87fce5 | |||
| 93d50641c1 | |||
| a6a9a97650 | |||
| 5455230930 | |||
| b632c0c3af | |||
| cf0fa75058 | |||
| 72ba8ddf59 | |||
| 7507bf55bf | |||
| 8b33de0c02 | |||
| 7529990566 | |||
| 528fcce2d3 | |||
| 29070dd277 | |||
| 6f049807e6 | |||
| 35d27b7607 | |||
| fe8f75514c | |||
| abcff62459 | |||
| 40dfc6e31e | |||
| 2cfa70f96a | |||
| 9436016b0a | |||
| 6ebd1bf202 | |||
| 286ae5375c | |||
| 7218ee7b7d | |||
| 0c6060def2 | |||
| 4130b78323 | |||
| 1002e1cbe2 | |||
| 1f91305b6e |
3
.gitignore
vendored
Normal file → Executable file
3
.gitignore
vendored
Normal file → Executable file
@@ -1 +1,4 @@
|
||||
.DS_Store
|
||||
_scratch
|
||||
result
|
||||
._*
|
||||
|
||||
22
.sops.yaml
Normal file
22
.sops.yaml
Normal 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
|
||||
79
README.md
Normal file → Executable file
79
README.md
Normal file → Executable file
@@ -1,43 +1,80 @@
|
||||
# Deploy NixOS
|
||||
# Description
|
||||
|
||||
## Copy Config
|
||||
This repository contains the configuration for multiple machines, as well as my home / IDE config (home-manager).
|
||||
|
||||
```bash
|
||||
scp -r * nixos@10.10.10.10:/tmp/
|
||||
# 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
|
||||
```
|
||||
|
||||
## Partition Drives
|
||||
## Manual
|
||||
|
||||
```bash
|
||||
# WARNING: Be sure to check drive mappings
|
||||
sudo fdisk -l
|
||||
# Install NixOS
|
||||
sudo nixos-rebuild switch --flake .#lin-va-mbp-personal
|
||||
|
||||
# Partition Disk
|
||||
sudo nix \
|
||||
--experimental-features "nix-command flakes" \
|
||||
run github:nix-community/disko -- \
|
||||
--mode disko \
|
||||
--flake /tmp#lin-va-llama1
|
||||
# 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
|
||||
```
|
||||
|
||||
## Install NixOS
|
||||
## Nix Darwin
|
||||
|
||||
```bash
|
||||
# Install
|
||||
sudo nixos-install --flake /tmp#lin-va-llama1
|
||||
# Install Nix Without Determinate
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||
|
||||
# Reboot
|
||||
sudo reboot
|
||||
# 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
|
||||
```
|
||||
|
||||
## Copy Config to Host
|
||||
## Clean Garbage
|
||||
|
||||
NOTE: This will remove previous generations
|
||||
|
||||
```bash
|
||||
scp -r * nixos@10.10.10.10:/etc/nixos
|
||||
sudo nix-collect-garbage --delete-old
|
||||
nix-collect-garbage --delete-old
|
||||
```
|
||||
|
||||
## Rebuild NixOS
|
||||
## Home Manager
|
||||
|
||||
```bash
|
||||
sudo nixos-rebuild switch
|
||||
# Update System Channels
|
||||
sudo nix-channel --add https://nixos.org/channels/nixpkgs-25.05-darwin nixpkgs
|
||||
sudo nix-channel --update
|
||||
|
||||
# Update Home Manager
|
||||
nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.05.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
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
187
bootstrap.sh
Executable file
187
bootstrap.sh
Executable file
@@ -0,0 +1,187 @@
|
||||
#!/bin/sh
|
||||
|
||||
export NIX_CONFIG="experimental-features = nix-command flakes"
|
||||
|
||||
function cmd_image() {
|
||||
local usage="Usage: $0 image --name <image-name> [--remote]"
|
||||
local name=""
|
||||
local remote=false
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--name)
|
||||
name="$2"
|
||||
shift 2
|
||||
;;
|
||||
--remote)
|
||||
remote=true
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "$usage"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$name" ]; then
|
||||
echo "$usage"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate Config Exists
|
||||
if ! nix eval --json --impure \
|
||||
".#vmwareConfigurations" \
|
||||
--apply "s: builtins.hasAttr \"$name\" s" 2>/dev/null | grep -q "true"; then
|
||||
echo "Error: NixOS Generator Config '$name' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build_args=(".#vmwareConfigurations.$name")
|
||||
if [ "$remote" = true ]; then
|
||||
build_args+=("-j0")
|
||||
fi
|
||||
|
||||
if ! nix build "${build_args[@]}"; then
|
||||
echo "Error: Image build failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Successfully built image: $name"
|
||||
}
|
||||
|
||||
function cmd_install() {
|
||||
local usage="Usage: $0 install --name <system-name> [--remote <user@remote-host>]"
|
||||
local name=""
|
||||
local remote=""
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--name)
|
||||
name="$2"
|
||||
shift 2
|
||||
;;
|
||||
--remote)
|
||||
remote="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "$usage"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$name" ]; then
|
||||
echo "$usage"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate Config Exists
|
||||
if ! nix eval --json --impure \
|
||||
".#nixosConfigurations" \
|
||||
--apply "s: builtins.hasAttr \"$name\" s" 2>/dev/null | grep -q "true"; then
|
||||
echo "Error: NixOS configuration '$name' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate mainDiskID Exists
|
||||
if ! disk_id=$(nix eval --raw --impure \
|
||||
".#nixosConfigurations.$name.config.disko.devices.disk.main.device" 2>/dev/null); then
|
||||
echo "Error: mainDiskID not defined for configuration '$name'"
|
||||
exit 1
|
||||
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
|
||||
if [ ! -e "$disk_id" ]; then
|
||||
echo "Error: Disk $disk_id not found on system"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prompt Format
|
||||
read -p "This will format disk $disk_id. Continue? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Operation Cancelled"
|
||||
exit 1
|
||||
fi
|
||||
echo "Formatting disk: $disk_id"
|
||||
|
||||
# Format Disk
|
||||
if ! sudo nix \
|
||||
--experimental-features "nix-command flakes" \
|
||||
run github:nix-community/disko -- \
|
||||
--mode disko \
|
||||
--flake "/etc/nixos#$name"; then
|
||||
echo "Error: Disk formatting failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install NixOS
|
||||
echo "Installing $name to disk: $disk_id"
|
||||
if ! sudo nixos-install --flake "/etc/nixos#$name"; then
|
||||
echo "Error: NixOS installation failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "Successfully installed $name to disk: $disk_id"
|
||||
|
||||
# Prompt Reboot
|
||||
read -p "Reboot? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Operation Complete - Not Rebooting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Reboot
|
||||
echo "Operation Complete - Rebooting"
|
||||
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
|
||||
image)
|
||||
shift
|
||||
cmd_image "$@"
|
||||
;;
|
||||
install)
|
||||
shift
|
||||
cmd_install "$@"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {image|install} --name <name>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
355
flake.lock
generated
Executable file
355
flake.lock
generated
Executable file
@@ -0,0 +1,355 @@
|
||||
{
|
||||
"nodes": {
|
||||
"apple-silicon": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755115705,
|
||||
"narHash": "sha256-CjWlI6c1pWu+X5Qz8B6K1httNpA4eDNxf/Ozfm6Mvlw=",
|
||||
"owner": "tpwrules",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"rev": "78b5825968dc784dae2fe71b1c76f364efe107ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tpwrules",
|
||||
"ref": "release-25.05",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762912391,
|
||||
"narHash": "sha256-4hpBE7bGd24SfD28rzMdUGXsLsNEYxCCrTipFdoqoNM=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "d76299b2cd01837c4c271a7b5186e3d5d8ebd126",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-darwin",
|
||||
"ref": "nix-darwin-25.05",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764350888,
|
||||
"narHash": "sha256-6Rp18zavTlnlZzcoLoBTJMBahL2FycVkw2rAEs3cQvo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "2055a08fd0e2fd41318279a5355eb8a161accf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-addons": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1764475519,
|
||||
"narHash": "sha256-12TAT2CD+L+wdIHszQnPyu8zGSBxcazoVZmP6UQjk6s=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "1172c39fb0e847a7f036e480d94f629edcf2cf46",
|
||||
"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": 1764536451,
|
||||
"narHash": "sha256-BgtcUkBfItu9/yU14IgUaj4rYOanTOUZjUfBP20/ZB4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "3fdd076e08049a9c7a83149b270440d9787d2df5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1736643958,
|
||||
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-generators": {
|
||||
"inputs": {
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764234087,
|
||||
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1752596105,
|
||||
"narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dab3a6e781554f965bde3def0aa2fda4eb8f1708",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1764242076,
|
||||
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1764494334,
|
||||
"narHash": "sha256-x2xCEXUlU4Ap56+t5HaoReOQ/bV/bIQ5rzTn/m+V3HQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d542db745310b6929708d9abea513f3ff19b1341",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"apple-silicon": "apple-silicon",
|
||||
"darwin": "darwin",
|
||||
"disko": "disko",
|
||||
"firefox-addons": "firefox-addons",
|
||||
"home-manager": "home-manager",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"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": 1736130495,
|
||||
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
|
||||
"owner": "snowfallorg",
|
||||
"repo": "lib",
|
||||
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "snowfallorg",
|
||||
"repo": "lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764483358,
|
||||
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "5aca6ff67264321d47856a2ed183729271107c9c",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"apple-silicon",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754492133,
|
||||
"narHash": "sha256-B+3g9+76KlGe34Yk9za8AF3RL+lnbHXkLiVHLjYVOAc=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "1298185c05a56bff66383a20be0b41a307f52228",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
81
flake.nix
Normal file → Executable file
81
flake.nix
Normal file → Executable file
@@ -2,30 +2,77 @@
|
||||
description = "NixOS Hosts";
|
||||
|
||||
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";
|
||||
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/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
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.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, disko }: {
|
||||
nixosConfigurations.lin-va-llama1 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./hosts/llama-server.nix
|
||||
{
|
||||
networking.hostName = "lin-va-llama1";
|
||||
}
|
||||
outputs = inputs:
|
||||
inputs.snowfall-lib.mkFlake {
|
||||
inherit inputs;
|
||||
src = ./.;
|
||||
|
||||
snowfall = {
|
||||
namespace = "reichard";
|
||||
meta = {
|
||||
title = "Reichard";
|
||||
name = "reichard";
|
||||
};
|
||||
};
|
||||
|
||||
channels-config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"intel-ocl-5.0-63503"
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.lin-va-k3s1 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
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
|
||||
./hosts/k3s.nix
|
||||
{
|
||||
networking.hostName = "lin-va-k3s1";
|
||||
}
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
darwin = with inputs; [
|
||||
home-manager.darwinModules.home-manager
|
||||
sops-nix.darwinModules.sops
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
```
|
||||
@@ -1,21 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.configFile = {
|
||||
"fastfetch/config.jsonc" = {
|
||||
source = ./config/config.jsonc;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.configFile = {
|
||||
"ghostty/config" = {
|
||||
source = ./config/ghostty.conf;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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";
|
||||
};
|
||||
merge = {
|
||||
conflictstyle = "zdiff3";
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
|
||||
# Copy Configuration
|
||||
git = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.lib) mkIf optionals;
|
||||
inherit (pkgs.stdenv) isLinux isDarwin;
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
./bash
|
||||
./direnv
|
||||
./ghostty
|
||||
./git
|
||||
./htop
|
||||
./fastfetch
|
||||
./nvim
|
||||
./powerline
|
||||
./readline
|
||||
];
|
||||
|
||||
# Home Manager Config
|
||||
home.username = "evanreichard";
|
||||
home.homeDirectory = "/Users/evanreichard";
|
||||
home.stateVersion = "24.11";
|
||||
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
|
||||
(llama-cpp.overrideAttrs {
|
||||
version = "b4539";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ggerganov";
|
||||
repo = "llama.cpp";
|
||||
tag = "b4539";
|
||||
hash = "sha256-zPWx8gdai8OfoBCr2X2oJYg45ipLselYZMrL+MbQ1AY=";
|
||||
leaveDotGit = true;
|
||||
};
|
||||
})
|
||||
mosh
|
||||
pre-commit
|
||||
python311
|
||||
ssm-session-manager-plugin
|
||||
texliveSmall # Pandoc PDF Dep
|
||||
thefuck
|
||||
tldr
|
||||
]
|
||||
++ optionals isDarwin [ ]
|
||||
++ optionals isLinux [ ];
|
||||
|
||||
# GitHub CLI
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
};
|
||||
};
|
||||
|
||||
# Misc Programs
|
||||
programs.htop.enable = true;
|
||||
programs.jq.enable = true;
|
||||
programs.k9s.enable = true;
|
||||
programs.pandoc.enable = true;
|
||||
|
||||
# Enable Flakes & Commands
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
extraOptions = ''experimental-features = nix-command flakes'';
|
||||
};
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
|
||||
# Darwin Spotlight Indexing Hack
|
||||
# home.activation = mkIf isDarwin {
|
||||
# copyApplications =
|
||||
# let
|
||||
# apps = pkgs.buildEnv {
|
||||
# name = "home-manager-applications";
|
||||
# paths = config.home.packages;
|
||||
# pathsToLink = "/Applications";
|
||||
# };
|
||||
# in
|
||||
# lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
# baseDir="$HOME/Applications/Home Manager Apps"
|
||||
# if [ -d "$baseDir" ]; then
|
||||
# rm -rf "$baseDir"
|
||||
# fi
|
||||
# mkdir -p "$baseDir"
|
||||
# for appFile in ${apps}/Applications/*; do
|
||||
# target="$baseDir/$(basename "$appFile")"
|
||||
# $DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
|
||||
# $DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
|
||||
# done
|
||||
# '';
|
||||
# };
|
||||
|
||||
# Darwin Spotlight Indexing Hack
|
||||
disabledModules = [ "targets/darwin/linkapps.nix" ];
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
htop_version=3.2.1
|
||||
config_reader_min_version=3
|
||||
fields=0 48 17 18 38 39 2 46 47 49 1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_deleted_exe=1
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
highlight_changes=0
|
||||
highlight_changes_delay_secs=5
|
||||
find_comm_in_cmdline=1
|
||||
strip_exe_from_cmdline=1
|
||||
show_merged_command=0
|
||||
header_margin=1
|
||||
screen_tabs=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_one=0
|
||||
show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=6
|
||||
enable_mouse=1
|
||||
delay=15
|
||||
hide_function_bar=0
|
||||
header_layout=two_50_50
|
||||
column_meters_0=LeftCPUs Memory Swap
|
||||
column_meter_modes_0=1 1 1
|
||||
column_meters_1=RightCPUs Tasks LoadAverage Uptime
|
||||
column_meter_modes_1=1 2 2 2
|
||||
tree_view=0
|
||||
sort_key=46
|
||||
tree_sort_key=0
|
||||
sort_direction=-1
|
||||
tree_sort_direction=1
|
||||
tree_view_always_by_pid=0
|
||||
all_branches_collapsed=0
|
||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||
.sort_key=PERCENT_CPU
|
||||
.tree_sort_key=PID
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=1
|
||||
.all_branches_collapsed=0
|
||||
@@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."htop/htoprc" = {
|
||||
source = ./config/htoprc;
|
||||
};
|
||||
}
|
||||
@@ -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)
|
||||
@@ -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
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
-- Configure LLama LLM
|
||||
vim.g.llama_config = {
|
||||
endpoint = "http://10.0.20.158: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" })
|
||||
@@ -1,2 +0,0 @@
|
||||
require("lsp_lines").setup()
|
||||
vim.diagnostic.config({virtual_text = false})
|
||||
@@ -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}}}
|
||||
})
|
||||
@@ -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, {})
|
||||
@@ -1,3 +0,0 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {enable = true, additional_vim_regex_highlighting = false}
|
||||
}
|
||||
@@ -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" } },
|
||||
})
|
||||
@@ -1,197 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.lib.lists) subtractLists;
|
||||
unstable = import <nixpkgs-unstable> { };
|
||||
in
|
||||
{
|
||||
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
|
||||
nodePackages.eslint
|
||||
nodePackages.svelte-language-server
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.vscode-langservers-extracted
|
||||
pyright
|
||||
unstable.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
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.powerline-go = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git-mode = "compact";
|
||||
theme = "gruvbox";
|
||||
};
|
||||
modules = [
|
||||
"host"
|
||||
"cwd"
|
||||
"git"
|
||||
"docker"
|
||||
"venv"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
59
homes/aarch64-darwin/evanreichard@mac-va-mbp-personal/default.nix
Executable file
59
homes/aarch64-darwin/evanreichard@mac-va-mbp-personal/default.nix
Executable file
@@ -0,0 +1,59 @@
|
||||
{ lib, pkgs, config, namespace, ... }:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
reichard = {
|
||||
user = {
|
||||
enable = true;
|
||||
inherit (config.snowfallorg.user) name;
|
||||
};
|
||||
|
||||
services = {
|
||||
# TODO
|
||||
# sops = {
|
||||
# enable = true;
|
||||
# defaultSopsFile = lib.snowfall.fs.get-file "secrets/mac-va-mbp-personal/evanreichard/default.yaml";
|
||||
# sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||
# };
|
||||
};
|
||||
|
||||
programs = {
|
||||
graphical = {
|
||||
ghostty = enabled;
|
||||
ghidra = enabled;
|
||||
};
|
||||
|
||||
terminal = {
|
||||
btop = enabled;
|
||||
direnv = enabled;
|
||||
git = enabled;
|
||||
k9s = enabled;
|
||||
nvim = enabled;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Global Packages
|
||||
# programs.jq = enabled;
|
||||
# programs.pandoc = enabled;
|
||||
# home.packages = with pkgs; [
|
||||
# android-tools
|
||||
# imagemagick
|
||||
# mosh
|
||||
# python311
|
||||
# texliveSmall # Pandoc PDF Dep
|
||||
# google-cloud-sdk
|
||||
# tldr
|
||||
# ];
|
||||
|
||||
home.packages = with pkgs; [ fastfetch ];
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
}
|
||||
57
homes/aarch64-darwin/evanreichard@mac-va-mbp-work/default.nix
Executable file
57
homes/aarch64-darwin/evanreichard@mac-va-mbp-work/default.nix
Executable file
@@ -0,0 +1,57 @@
|
||||
{ pkgs, lib, config, namespace, ... }:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
reichard = {
|
||||
user = {
|
||||
enable = true;
|
||||
inherit (config.snowfallorg.user) name;
|
||||
};
|
||||
|
||||
services = {
|
||||
# TODO
|
||||
# sops = {
|
||||
# enable = true;
|
||||
# defaultSopsFile = lib.snowfall.fs.get-file "secrets/mac-va-mbp-work/evanreichard/default.yaml";
|
||||
# sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||
# };
|
||||
};
|
||||
|
||||
programs = {
|
||||
graphical = {
|
||||
ghostty = enabled;
|
||||
};
|
||||
|
||||
terminal = {
|
||||
btop = enabled;
|
||||
direnv = enabled;
|
||||
git = enabled;
|
||||
k9s = enabled;
|
||||
nvim = enabled;
|
||||
aws = enabled;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Global Packages
|
||||
programs.jq = enabled;
|
||||
programs.pandoc = enabled;
|
||||
home.packages = with pkgs; [
|
||||
android-tools
|
||||
imagemagick
|
||||
mosh
|
||||
python312
|
||||
texliveSmall # Pandoc PDF Dep
|
||||
google-cloud-sdk
|
||||
tldr
|
||||
];
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
}
|
||||
103
homes/aarch64-linux/evanreichard@lin-va-mbp-personal/default.nix
Executable file
103
homes/aarch64-linux/evanreichard@lin-va-mbp-personal/default.nix
Executable file
@@ -0,0 +1,103 @@
|
||||
{ pkgs, lib, config, namespace, osConfig, ... }:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
# Global Packages
|
||||
# programs.jq = enabled;
|
||||
# programs.pandoc = enabled;
|
||||
# home.packages = with pkgs; [
|
||||
# android-tools
|
||||
# imagemagick
|
||||
# mosh
|
||||
# python311
|
||||
# texliveSmall # Pandoc PDF Dep
|
||||
# google-cloud-sdk
|
||||
# tldr
|
||||
# ];
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
}
|
||||
36
homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix
Executable file
36
homes/x86_64-linux/evanreichard@lin-va-terminal/default.nix
Executable file
@@ -0,0 +1,36 @@
|
||||
{ lib, config, namespace, ... }:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
reichard = {
|
||||
user = {
|
||||
enable = true;
|
||||
inherit (config.snowfallorg.user) name;
|
||||
};
|
||||
|
||||
services = {
|
||||
ssh-agent = enabled;
|
||||
};
|
||||
|
||||
programs = {
|
||||
terminal = {
|
||||
bash = enabled;
|
||||
tmux = enabled;
|
||||
btop = enabled;
|
||||
direnv = enabled;
|
||||
git = enabled;
|
||||
k9s = enabled;
|
||||
nvim = enabled;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
}
|
||||
86
homes/x86_64-linux/evanreichard@lin-va-thinkpad/default.nix
Executable file
86
homes/x86_64-linux/evanreichard@lin-va-thinkpad/default.nix
Executable file
@@ -0,0 +1,86 @@
|
||||
{ pkgs, lib, config, namespace, osConfig, ... }:
|
||||
let
|
||||
inherit (lib.${namespace}) enabled;
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
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;
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
}
|
||||
98
homes/x86_64-linux/evanreichard@lin-va-utility/default.nix
Executable file
98
homes/x86_64-linux/evanreichard@lin-va-utility/default.nix
Executable file
@@ -0,0 +1,98 @@
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
|
||||
# Global Packages
|
||||
# programs.jq = enabled;
|
||||
# programs.pandoc = enabled;
|
||||
# home.packages = with pkgs; [
|
||||
# android-tools
|
||||
# imagemagick
|
||||
# mosh
|
||||
# python311
|
||||
# texliveSmall # Pandoc PDF Dep
|
||||
# google-cloud-sdk
|
||||
# tldr
|
||||
# ];
|
||||
|
||||
# SQLite Configuration
|
||||
home.file.".sqliterc".text = ''
|
||||
.headers on
|
||||
.mode column
|
||||
'';
|
||||
}
|
||||
119
hosts/k3s.nix
119
hosts/k3s.nix
@@ -1,119 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable Flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# System Configuration
|
||||
boot.kernelModules = [ "nvme_tcp" ]; # OpenEBS Mayastor Requirement
|
||||
boot.kernel.sysctl = {
|
||||
"vm.nr_hugepages" = 1024;
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
|
||||
# Disk Configuration
|
||||
disko.devices = {
|
||||
disk = {
|
||||
sda = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "512M";
|
||||
type = "EF00"; # EFI
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Network Configuration
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
|
||||
# Single Node Required Ports
|
||||
allowedTCPPorts = [ 6443 ];
|
||||
|
||||
# Multi Node Required Ports
|
||||
# allowedTCPPorts = [ 6443 2379 2380 10250 ];
|
||||
# allowedUDPPorts = [ 8472 ];
|
||||
};
|
||||
};
|
||||
|
||||
# Enable K3s
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
extraFlags = toString [
|
||||
"--disable=traefik" # Should we enable?
|
||||
"--disable=servicelb"
|
||||
];
|
||||
};
|
||||
|
||||
# Enable SSH Server
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false; # Disable Password Login
|
||||
PermitRootLogin = "prohibit-password"; # Disable Password Login
|
||||
};
|
||||
};
|
||||
|
||||
# User Configuration
|
||||
users.users.root = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA8P84lWL/p13ZBFNwITm/dLWWL8s9pVmdOImM5gaJAiTLY+DheUvG6YsveB2/5STseiJ34g7Na9TW1mtTLL8zDqPvj3NbprQiYlLJKMbCk6dtfdD4nLMHl8B48e1h699XiZDp2/c+jJb0MkLOFrps+FbPqt7pFt1Pj29tFy8BCg0LGndu6KO+HqYS+aM5tp5hZESo1RReiJ8aHsu5X7wW46brN4gfyyu+8X4etSZAB9raWqlln9NKK7G6as6X+uPypvSjYGSTC8TSePV1iTPwOxPk2+1xBsK7EBLg3jNrrYaiXLnZvBOOhm11JmHzqEJ6386FfQO+0r4iDVxmvi+ojw== rsa-key-20141114"
|
||||
];
|
||||
hashedPassword = null; # Disable Password Login
|
||||
};
|
||||
|
||||
# System Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
k9s
|
||||
kubectl
|
||||
kubernetes-helm
|
||||
nfs-utils
|
||||
vim
|
||||
];
|
||||
|
||||
# Enable Container Features
|
||||
virtualisation = {
|
||||
docker.enable = false;
|
||||
containerd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
version = 2;
|
||||
plugins."io.containerd.grpc.v1.cri" = {
|
||||
containerd.runtimes.runc = {
|
||||
runtime_type = "io.containerd.runc.v2";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# System State Version
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cuda-llama = (pkgs.llama-cpp.override {
|
||||
cudaSupport = true;
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
||||
"-DGGML_CUDA_ENABLE_UNIFIED_MEMORY=ON"
|
||||
|
||||
# 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";
|
||||
modelName = "qwen2.5-coder-7b-q8_0.gguf";
|
||||
modelPath = "${modelDir}/${modelName}";
|
||||
modelUrl = "https://huggingface.co/ggml-org/Qwen2.5-Coder-7B-Q8_0-GGUF/resolve/main/${modelName}?download=true";
|
||||
in
|
||||
|
||||
{
|
||||
# Enable Flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# System Configuration
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
# Disk Configuration
|
||||
disko.devices = {
|
||||
disk = {
|
||||
sda = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "512M";
|
||||
type = "EF00"; # EFI
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Network Configuration
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Download Model
|
||||
systemd.services.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
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
# 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;
|
||||
extraFlags = [
|
||||
"-ngl"
|
||||
"99"
|
||||
"-fa"
|
||||
"-ub"
|
||||
"512"
|
||||
"-b"
|
||||
"512"
|
||||
"-dt"
|
||||
"0.1"
|
||||
"--ctx-size"
|
||||
"4096"
|
||||
"--cache-reuse"
|
||||
"256"
|
||||
];
|
||||
};
|
||||
|
||||
# Enable SSH Server
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false; # Disable Password Login
|
||||
PermitRootLogin = "prohibit-password"; # Disable Password Login
|
||||
};
|
||||
};
|
||||
|
||||
# User Configuration
|
||||
users.users.root = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA8P84lWL/p13ZBFNwITm/dLWWL8s9pVmdOImM5gaJAiTLY+DheUvG6YsveB2/5STseiJ34g7Na9TW1mtTLL8zDqPvj3NbprQiYlLJKMbCk6dtfdD4nLMHl8B48e1h699XiZDp2/c+jJb0MkLOFrps+FbPqt7pFt1Pj29tFy8BCg0LGndu6KO+HqYS+aM5tp5hZESo1RReiJ8aHsu5X7wW46brN4gfyyu+8X4etSZAB9raWqlln9NKK7G6as6X+uPypvSjYGSTC8TSePV1iTPwOxPk2+1xBsK7EBLg3jNrrYaiXLnZvBOOhm11JmHzqEJ6386FfQO+0r4iDVxmvi+ojw== rsa-key-20141114"
|
||||
];
|
||||
hashedPassword = null; # Disable Password Login
|
||||
};
|
||||
|
||||
# System Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
nvtop
|
||||
tmux
|
||||
vim
|
||||
wget
|
||||
];
|
||||
|
||||
# System State Version
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
19
lib/module/default.nix
Normal file
19
lib/module/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
8
modules/darwin/default.nix
Normal file
8
modules/darwin/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
config = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
103
modules/darwin/nix/default.nix
Normal file
103
modules/darwin/nix/default.nix
Normal 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="
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/darwin/security/sops/default.nix
Normal file
31
modules/darwin/security/sops/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/darwin/services/openssh/default.nix
Normal file
20
modules/darwin/services/openssh/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/darwin/user/default.nix
Normal file
23
modules/darwin/user/default.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
121
modules/home/programs/graphical/browsers/firefox/default.nix
Normal file
121
modules/home/programs/graphical/browsers/firefox/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/programs/graphical/ghidra/default.nix
Executable file
14
modules/home/programs/graphical/ghidra/default.nix
Executable 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 ];
|
||||
};
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,8 +1,3 @@
|
||||
command = /Users/evanreichard/.nix-profile/bin/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
|
||||
palette = 0=#34302C
|
||||
palette = 1=#BD8183
|
||||
58
modules/home/programs/graphical/ghostty/config/ghostty.conf
Executable file
58
modules/home/programs/graphical/ghostty/config/ghostty.conf
Executable 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
|
||||
30
modules/home/programs/graphical/ghostty/default.nix
Executable file
30
modules/home/programs/graphical/ghostty/default.nix
Executable 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);
|
||||
};
|
||||
}
|
||||
17
modules/home/programs/graphical/gimp/default.nix
Executable file
17
modules/home/programs/graphical/gimp/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
}
|
||||
17
modules/home/programs/graphical/remmina/default.nix
Executable file
17
modules/home/programs/graphical/remmina/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
}
|
||||
17
modules/home/programs/graphical/strawberry/default.nix
Executable file
17
modules/home/programs/graphical/strawberry/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
}
|
||||
17
modules/home/programs/graphical/wireshark/default.nix
Executable file
17
modules/home/programs/graphical/wireshark/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
}
|
||||
155
modules/home/programs/graphical/wms/hyprland/config/hyprland.conf
Executable file
155
modules/home/programs/graphical/wms/hyprland/config/hyprland.conf
Executable 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
|
||||
@@ -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;
|
||||
}
|
||||
127
modules/home/programs/graphical/wms/hyprland/config/wofi-style.css
Executable file
127
modules/home/programs/graphical/wms/hyprland/config/wofi-style.css
Executable 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;
|
||||
}
|
||||
3
modules/home/programs/graphical/wms/hyprland/config/wofi.conf
Executable file
3
modules/home/programs/graphical/wms/hyprland/config/wofi.conf
Executable file
@@ -0,0 +1,3 @@
|
||||
stylesheet=./style.css
|
||||
term=foot
|
||||
insensitive=true
|
||||
274
modules/home/programs/graphical/wms/hyprland/default.nix
Executable file
274
modules/home/programs/graphical/wms/hyprland/default.nix
Executable 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/home/programs/terminal/aws/default.nix
Executable file
19
modules/home/programs/terminal/aws/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
}
|
||||
0
home-manager/git/config/.gitignore → modules/home/programs/terminal/bash/config/.gitignore
vendored
Normal file → Executable file
0
home-manager/git/config/.gitignore → modules/home/programs/terminal/bash/config/.gitignore
vendored
Normal file → Executable file
0
home-manager/fastfetch/config/config.jsonc → modules/home/programs/terminal/bash/config/fastfetch.jsonc
Normal file → Executable file
0
home-manager/fastfetch/config/config.jsonc → modules/home/programs/terminal/bash/config/fastfetch.jsonc
Normal file → Executable file
67
modules/home/programs/terminal/bash/default.nix
Executable file
67
modules/home/programs/terminal/bash/default.nix
Executable file
@@ -0,0 +1,67 @@
|
||||
{ pkgs, lib, config, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf optionalAttrs;
|
||||
inherit (pkgs.stdenv) isLinux;
|
||||
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";
|
||||
};
|
||||
profileExtra = ''
|
||||
export COLORTERM=truecolor
|
||||
SHELL="$BASH"
|
||||
PATH=~/.bin:$PATH
|
||||
bind "set show-mode-in-prompt on"
|
||||
|
||||
set -o vi || true
|
||||
VISUAL=vim
|
||||
EDITOR="$VISUAL"
|
||||
|
||||
fastfetch
|
||||
'';
|
||||
};
|
||||
|
||||
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; [
|
||||
fastfetch
|
||||
bashInteractive
|
||||
nerd-fonts.meslo-lg
|
||||
];
|
||||
|
||||
home.file.".config/fastfetch/config.jsonc".text = builtins.readFile ./config/fastfetch.jsonc;
|
||||
};
|
||||
}
|
||||
218
modules/home/programs/terminal/btop/config/btop.conf
Executable file
218
modules/home/programs/terminal/btop/config/btop.conf
Executable file
@@ -0,0 +1,218 @@
|
||||
#? Config file for btop v. 1.4.0
|
||||
|
||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||
color_theme = "catppuccin_mocha"
|
||||
|
||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||
theme_background = True
|
||||
|
||||
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||
truecolor = True
|
||||
|
||||
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||
force_tty = False
|
||||
|
||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||
#* Use whitespace " " as separator between different presets.
|
||||
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
|
||||
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
|
||||
|
||||
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||
vim_keys = False
|
||||
|
||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||
rounded_corners = True
|
||||
|
||||
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
||||
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||
#* "block" has half the resolution of braille but uses more common characters.
|
||||
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
|
||||
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
|
||||
graph_symbol = "braille"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_cpu = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_mem = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_net = "default"
|
||||
|
||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||
graph_symbol_proc = "default"
|
||||
|
||||
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||
shown_boxes = "cpu mem net proc"
|
||||
|
||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||
update_ms = 2000
|
||||
|
||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||
proc_sorting = "cpu lazy"
|
||||
|
||||
#* Reverse sorting order, True or False.
|
||||
proc_reversed = False
|
||||
|
||||
#* Show processes as a tree.
|
||||
proc_tree = False
|
||||
|
||||
#* Use the cpu graph colors in the process list.
|
||||
proc_colors = True
|
||||
|
||||
#* Use a darkening gradient in the process list.
|
||||
proc_gradient = True
|
||||
|
||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||
proc_per_core = False
|
||||
|
||||
#* Show process memory as bytes instead of percent.
|
||||
proc_mem_bytes = True
|
||||
|
||||
#* Show cpu graph for each process.
|
||||
proc_cpu_graphs = True
|
||||
|
||||
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||
proc_info_smaps = False
|
||||
|
||||
#* Show proc box on left side of screen instead of right.
|
||||
proc_left = False
|
||||
|
||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||
proc_filter_kernel = False
|
||||
|
||||
#* In tree-view, always accumulate child process resources in the parent process.
|
||||
proc_aggregate = False
|
||||
|
||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
cpu_graph_upper = "Auto"
|
||||
|
||||
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
cpu_graph_lower = "Auto"
|
||||
|
||||
#* Toggles if the lower CPU graph should be inverted.
|
||||
cpu_invert_lower = True
|
||||
|
||||
#* Set to True to completely disable the lower CPU graph.
|
||||
cpu_single_graph = False
|
||||
|
||||
#* Show cpu box at bottom of screen instead of top.
|
||||
cpu_bottom = False
|
||||
|
||||
#* Shows the system uptime in the CPU box.
|
||||
show_uptime = True
|
||||
|
||||
#* Show cpu temperature.
|
||||
check_temp = True
|
||||
|
||||
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||
cpu_sensor = "Auto"
|
||||
|
||||
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||
show_coretemp = True
|
||||
|
||||
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
||||
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
||||
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
|
||||
#* Example: "4:0 5:1 6:3"
|
||||
cpu_core_map = ""
|
||||
|
||||
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
|
||||
temp_scale = "celsius"
|
||||
|
||||
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||
base_10_sizes = False
|
||||
|
||||
#* Show CPU frequency.
|
||||
show_cpu_freq = True
|
||||
|
||||
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
||||
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
||||
clock_format = "%X"
|
||||
|
||||
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
|
||||
background_update = True
|
||||
|
||||
#* Custom cpu model name, empty string to disable.
|
||||
custom_cpu_name = ""
|
||||
|
||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
|
||||
disks_filter = ""
|
||||
|
||||
#* Show graphs instead of meters for memory values.
|
||||
mem_graphs = True
|
||||
|
||||
#* Show mem box below net box instead of above.
|
||||
mem_below_net = False
|
||||
|
||||
#* Count ZFS ARC in cached and available memory.
|
||||
zfs_arc_cached = True
|
||||
|
||||
#* If swap memory should be shown in memory box.
|
||||
show_swap = True
|
||||
|
||||
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||
swap_disk = True
|
||||
|
||||
#* If mem box should be split to also show disks info.
|
||||
show_disks = True
|
||||
|
||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||
only_physical = True
|
||||
|
||||
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||
use_fstab = True
|
||||
|
||||
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||
zfs_hide_datasets = False
|
||||
|
||||
#* Set to true to show available disk space for privileged users.
|
||||
disk_free_priv = False
|
||||
|
||||
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||
show_io_stat = True
|
||||
|
||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||
io_mode = False
|
||||
|
||||
#* Set to True to show combined read/write io graphs in io mode.
|
||||
io_graph_combined = False
|
||||
|
||||
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||
io_graph_speeds = ""
|
||||
|
||||
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
|
||||
net_download = 100
|
||||
|
||||
net_upload = 100
|
||||
|
||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||
net_auto = True
|
||||
|
||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||
net_sync = True
|
||||
|
||||
#* Starts with the Network Interface specified here.
|
||||
net_iface = ""
|
||||
|
||||
#* Show battery stats in top right if battery is present.
|
||||
show_battery = True
|
||||
|
||||
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||
selected_battery = "Auto"
|
||||
|
||||
#* Show power stats of battery next to charge indicator.
|
||||
show_battery_watts = True
|
||||
|
||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||
log_level = "WARNING"
|
||||
83
modules/home/programs/terminal/btop/config/catppuccin_mocha.theme
Executable file
83
modules/home/programs/terminal/btop/config/catppuccin_mocha.theme
Executable file
@@ -0,0 +1,83 @@
|
||||
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||
theme[main_bg]="#1E1E2E"
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]="#CDD6F4"
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]="#CDD6F4"
|
||||
|
||||
# Highlight color for keyboard shortcuts
|
||||
theme[hi_fg]="#89B4FA"
|
||||
|
||||
# Background color of selected item in processes box
|
||||
theme[selected_bg]="#45475A"
|
||||
|
||||
# Foreground color of selected item in processes box
|
||||
theme[selected_fg]="#89B4FA"
|
||||
|
||||
# Color of inactive/disabled text
|
||||
theme[inactive_fg]="#7F849C"
|
||||
|
||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||
theme[graph_text]="#F5E0DC"
|
||||
|
||||
# Background color of the percentage meters
|
||||
theme[meter_bg]="#45475A"
|
||||
|
||||
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
|
||||
theme[proc_misc]="#F5E0DC"
|
||||
|
||||
# CPU, Memory, Network, Proc box outline colors
|
||||
theme[cpu_box]="#cba6f7" #Mauve
|
||||
theme[mem_box]="#a6e3a1" #Green
|
||||
theme[net_box]="#eba0ac" #Maroon
|
||||
theme[proc_box]="#89b4fa" #Blue
|
||||
|
||||
# Box divider line and small boxes line color
|
||||
theme[div_line]="#6C7086"
|
||||
|
||||
# Temperature graph color (Green -> Yellow -> Red)
|
||||
theme[temp_start]="#a6e3a1"
|
||||
theme[temp_mid]="#f9e2af"
|
||||
theme[temp_end]="#f38ba8"
|
||||
|
||||
# CPU graph colors (Teal -> Lavender)
|
||||
theme[cpu_start]="#94e2d5"
|
||||
theme[cpu_mid]="#74c7ec"
|
||||
theme[cpu_end]="#b4befe"
|
||||
|
||||
# Mem/Disk free meter (Mauve -> Lavender -> Blue)
|
||||
theme[free_start]="#cba6f7"
|
||||
theme[free_mid]="#b4befe"
|
||||
theme[free_end]="#89b4fa"
|
||||
|
||||
# Mem/Disk cached meter (Sapphire -> Lavender)
|
||||
theme[cached_start]="#74c7ec"
|
||||
theme[cached_mid]="#89b4fa"
|
||||
theme[cached_end]="#b4befe"
|
||||
|
||||
# Mem/Disk available meter (Peach -> Red)
|
||||
theme[available_start]="#fab387"
|
||||
theme[available_mid]="#eba0ac"
|
||||
theme[available_end]="#f38ba8"
|
||||
|
||||
# Mem/Disk used meter (Green -> Sky)
|
||||
theme[used_start]="#a6e3a1"
|
||||
theme[used_mid]="#94e2d5"
|
||||
theme[used_end]="#89dceb"
|
||||
|
||||
# Download graph colors (Peach -> Red)
|
||||
theme[download_start]="#fab387"
|
||||
theme[download_mid]="#eba0ac"
|
||||
theme[download_end]="#f38ba8"
|
||||
|
||||
# Upload graph colors (Green -> Sky)
|
||||
theme[upload_start]="#a6e3a1"
|
||||
theme[upload_mid]="#94e2d5"
|
||||
theme[upload_end]="#89dceb"
|
||||
|
||||
# Process box color gradient for threads, mem and cpu usage (Sapphire -> Mauve)
|
||||
theme[process_start]="#74C7EC"
|
||||
theme[process_mid]="#89DCEB"
|
||||
theme[process_end]="#cba6f7"
|
||||
19
modules/home/programs/terminal/btop/default.nix
Executable file
19
modules/home/programs/terminal/btop/default.nix
Executable file
@@ -0,0 +1,19 @@
|
||||
{ lib, 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;
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
17
modules/home/programs/terminal/direnv/default.nix
Executable file
17
modules/home/programs/terminal/direnv/default.nix
Executable 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
3
modules/home/programs/terminal/git/config/.gitignore
vendored
Executable file
3
modules/home/programs/terminal/git/config/.gitignore
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
_scratch
|
||||
.direnv
|
||||
.envrc
|
||||
0
home-manager/git/config/personal → modules/home/programs/terminal/git/config/personal
Normal file → Executable file
0
home-manager/git/config/personal → modules/home/programs/terminal/git/config/personal
Normal file → Executable file
2
home-manager/git/config/work → modules/home/programs/terminal/git/config/work
Normal file → Executable file
2
home-manager/git/config/work → modules/home/programs/terminal/git/config/work
Normal file → Executable file
@@ -2,4 +2,4 @@
|
||||
sshCommand = "ssh -i ~/Keys/work"
|
||||
|
||||
[user]
|
||||
email = evan@prophet.security
|
||||
email = evan@prophetsecurity.ai
|
||||
98
modules/home/programs/terminal/git/default.nix
Executable file
98
modules/home/programs/terminal/git/default.nix
Executable 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/home/programs/terminal/k9s/default.nix
Executable file
19
modules/home/programs/terminal/k9s/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
}
|
||||
3
modules/home/programs/terminal/nvim/config/lua/.luarc.json
Executable file
3
modules/home/programs/terminal/nvim/config/lua/.luarc.json
Executable file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"diagnostics.globals": ["vim"]
|
||||
}
|
||||
0
home-manager/nvim/config/lua/aerial-config.lua → modules/home/programs/terminal/nvim/config/lua/aerial-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/aerial-config.lua → modules/home/programs/terminal/nvim/config/lua/aerial-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/autopairs-config.lua → modules/home/programs/terminal/nvim/config/lua/autopairs-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/autopairs-config.lua → modules/home/programs/terminal/nvim/config/lua/autopairs-config.lua
Normal file → Executable file
72
modules/home/programs/terminal/nvim/config/lua/base.lua
Executable file
72
modules/home/programs/terminal/nvim/config/lua/base.lua
Executable file
@@ -0,0 +1,72 @@
|
||||
-- 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 = "/usr/bin/env 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
|
||||
|
||||
-- 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)
|
||||
0
home-manager/nvim/config/lua/cmp-config.lua → modules/home/programs/terminal/nvim/config/lua/cmp-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/cmp-config.lua → modules/home/programs/terminal/nvim/config/lua/cmp-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/comment-config.lua → modules/home/programs/terminal/nvim/config/lua/comment-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/comment-config.lua → modules/home/programs/terminal/nvim/config/lua/comment-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/dap-config.lua → modules/home/programs/terminal/nvim/config/lua/dap-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/dap-config.lua → modules/home/programs/terminal/nvim/config/lua/dap-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/diffview-config.lua → modules/home/programs/terminal/nvim/config/lua/diffview-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/diffview-config.lua → modules/home/programs/terminal/nvim/config/lua/diffview-config.lua
Normal file → Executable file
2
home-manager/nvim/config/lua/git-ref.lua → modules/home/programs/terminal/nvim/config/lua/git-ref.lua
Normal file → Executable file
2
home-manager/nvim/config/lua/git-ref.lua → modules/home/programs/terminal/nvim/config/lua/git-ref.lua
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
function get_git_info()
|
||||
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"
|
||||
18
modules/home/programs/terminal/nvim/config/lua/git-signs.lua
Executable file
18
modules/home/programs/terminal/nvim/config/lua/git-signs.lua
Executable file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
map("n", "<leader>gB", function()
|
||||
gitsigns.blame_line({ full = true })
|
||||
end)
|
||||
end,
|
||||
})
|
||||
4
home-manager/nvim/config/lua/init.lua → modules/home/programs/terminal/nvim/config/lua/init.lua
Normal file → Executable file
4
home-manager/nvim/config/lua/init.lua → modules/home/programs/terminal/nvim/config/lua/init.lua
Normal file → Executable file
@@ -7,16 +7,18 @@ require("dap-config")
|
||||
require("diffview-config")
|
||||
require("git-ref")
|
||||
require("git-signs")
|
||||
require("llm")
|
||||
require("leap-config")
|
||||
require("llm")
|
||||
require("lsp-config")
|
||||
require("lsp-lines-config")
|
||||
require("lualine-config")
|
||||
require("neotree-config")
|
||||
require("noice-config")
|
||||
require("numb-config")
|
||||
require("octo-config")
|
||||
require("silicon-config")
|
||||
require("telescope-config")
|
||||
require("toggleterm-config")
|
||||
require("ts-config")
|
||||
require("weird-chars")
|
||||
require("which-key-config")
|
||||
0
home-manager/nvim/config/lua/leap-config.lua → modules/home/programs/terminal/nvim/config/lua/leap-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/leap-config.lua → modules/home/programs/terminal/nvim/config/lua/leap-config.lua
Normal file → Executable file
77
modules/home/programs/terminal/nvim/config/lua/llm.lua
Executable file
77
modules/home/programs/terminal/nvim/config/lua/llm.lua
Executable file
@@ -0,0 +1,77 @@
|
||||
local llm_endpoint = "http://10.0.20.100:8080"
|
||||
local llm_model = "qwen3-coder-30b-instruct"
|
||||
|
||||
-- Default Llama - Toggle Llama & Copilot
|
||||
vim.g.copilot_filetypes = { ["*"] = false }
|
||||
local current_mode = "llama"
|
||||
local function toggle_llm_fim_provider()
|
||||
if current_mode == "llama" then
|
||||
vim.g.copilot_filetypes = { ["*"] = true }
|
||||
vim.cmd("Copilot enable")
|
||||
vim.cmd("LlamaDisable")
|
||||
current_mode = "copilot"
|
||||
vim.notify("Copilot FIM enabled", vim.log.levels.INFO)
|
||||
else
|
||||
vim.g.copilot_filetypes = { ["*"] = true }
|
||||
vim.cmd("Copilot disable")
|
||||
vim.cmd("LlamaEnable")
|
||||
current_mode = "llama"
|
||||
vim.notify("Llama FIM enabled", vim.log.levels.INFO)
|
||||
end
|
||||
end
|
||||
vim.keymap.set("n", "<leader>cf", toggle_llm_fim_provider, { desc = "Toggle FIM (Llama / Copilot)" })
|
||||
|
||||
-- Configure LLama LLM FIM
|
||||
vim.g.llama_config = {
|
||||
endpoint = llm_endpoint .. "/infill",
|
||||
model = llm_model,
|
||||
n_predict = 1024,
|
||||
}
|
||||
|
||||
-- Configure Code Companion
|
||||
require("plugins.codecompanion.fidget-spinner"):init()
|
||||
require("codecompanion").setup({
|
||||
display = { chat = { window = { layout = "float", width = 0.6 } } },
|
||||
adapters = {
|
||||
http = {
|
||||
opts = { show_defaults = false, },
|
||||
["llama-swap"] = function()
|
||||
return require("codecompanion.adapters").extend("openai_compatible", {
|
||||
name = "llama-swap",
|
||||
formatted_name = "LlamaSwap",
|
||||
schema = { model = { default = llm_model } },
|
||||
env = { url = llm_endpoint },
|
||||
})
|
||||
end,
|
||||
copilot = require("codecompanion.adapters.http.copilot"),
|
||||
},
|
||||
acp = { opts = { show_defaults = false } },
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = "llama-swap" },
|
||||
inline = { adapter = "llama-swap" },
|
||||
cmd = { adapter = "llama-swap" },
|
||||
},
|
||||
chat = { dispay = "telescope" },
|
||||
memory = {
|
||||
opts = { chat = { enabled = true } },
|
||||
default = {
|
||||
description = "Collection of common files for all projects",
|
||||
files = {
|
||||
".clinerules",
|
||||
".cursorrules",
|
||||
".goosehints",
|
||||
".rules",
|
||||
".windsurfrules",
|
||||
".github/copilot-instructions.md",
|
||||
"AGENT.md",
|
||||
"AGENTS.md",
|
||||
".cursor/rules/",
|
||||
{ path = "CLAUDE.md", parser = "claude" },
|
||||
{ path = "CLAUDE.local.md", parser = "claude" },
|
||||
{ path = "~/.claude/CLAUDE.md", parser = "claude" },
|
||||
},
|
||||
is_default = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
136
home-manager/nvim/config/lua/lsp-config.lua → modules/home/programs/terminal/nvim/config/lua/lsp-config.lua
Normal file → Executable file
136
home-manager/nvim/config/lua/lsp-config.lua → modules/home/programs/terminal/nvim/config/lua/lsp-config.lua
Normal file → Executable file
@@ -8,9 +8,15 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
end,
|
||||
})
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
templ = "templ",
|
||||
require('render-markdown').setup({
|
||||
completions = { lsp = { enabled = true } },
|
||||
file_types = { 'markdown', 'codecompanion' },
|
||||
html = {
|
||||
-- CodeCompanion Markdown Tweaks
|
||||
tag = {
|
||||
file = { icon = ' ', highlight = 'Normal' },
|
||||
buf = { icon = ' ', highlight = 'Normal' },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -18,12 +24,12 @@ vim.filetype.add({
|
||||
-------------------- Built-in LSP --------------------
|
||||
------------------------------------------------------
|
||||
local nix_vars = require("nix-vars")
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", { clear = false })
|
||||
local on_attach = function(client, bufnr)
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
if client:supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
@@ -71,74 +77,80 @@ local organize_go_imports = function()
|
||||
end
|
||||
end
|
||||
|
||||
-- Define LSP Flags & Capabilities
|
||||
local lsp_flags = { debounce_text_changes = 150 }
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local default_config = {
|
||||
flags = { debounce_text_changes = 150 },
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||
on_attach = on_attach,
|
||||
}
|
||||
local setup_lsp = function(name, config)
|
||||
local final_config = vim.tbl_deep_extend("force", default_config, config or {})
|
||||
|
||||
vim.lsp.config(name, final_config)
|
||||
vim.lsp.enable(name)
|
||||
end
|
||||
|
||||
-- Python LSP Configuration
|
||||
nvim_lsp.pyright.setup({
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
setup_lsp("pyright", {
|
||||
filetypes = { "starlark", "python" },
|
||||
})
|
||||
|
||||
-- HTML LSP Configuration
|
||||
nvim_lsp.html.setup({
|
||||
setup_lsp("html", {
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.vscls .. "/bin/vscode-html-language-server", "--stdio" },
|
||||
filetypes = { "htm", "html" },
|
||||
})
|
||||
|
||||
-- JSON LSP Configuration
|
||||
nvim_lsp.jsonls.setup({
|
||||
setup_lsp("jsonls", {
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.vscls .. "/bin/vscode-html-language-server", "--stdio" },
|
||||
filetypes = { "json", "jsonc", "jsonl" },
|
||||
})
|
||||
|
||||
-- CSS LSP Configuration
|
||||
nvim_lsp.cssls.setup({
|
||||
setup_lsp("cssls", {
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.vscls .. "/bin/vscode-html-language-server", "--stdio" },
|
||||
filetypes = { "css" },
|
||||
})
|
||||
|
||||
-- Typescript / Javascript LSP Configuration
|
||||
nvim_lsp.ts_ls.setup({
|
||||
setup_lsp("ts_ls", {
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.tsls, "--stdio" },
|
||||
filetypes = { "typescript", "typescriptreact" },
|
||||
})
|
||||
|
||||
-- Svelte LSP Configuration
|
||||
nvim_lsp.svelte.setup({
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.sveltels, "--stdio" },
|
||||
-- C LSP Configuration
|
||||
setup_lsp("clangd", {
|
||||
cmd = { nix_vars.clangd },
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
|
||||
})
|
||||
|
||||
-- Lua LSP Configuration
|
||||
nvim_lsp.lua_ls.setup({
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
setup_lsp("lua_ls", {
|
||||
cmd = { nix_vars.luals },
|
||||
filetypes = { "lua" },
|
||||
})
|
||||
|
||||
-- Templ LSP Configuration
|
||||
nvim_lsp.templ.setup({
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
-- Nix LSP Configuration
|
||||
setup_lsp("nil_ls", {
|
||||
filetypes = { "nix" },
|
||||
})
|
||||
|
||||
-- Omnisharp LSP Configuration
|
||||
setup_lsp("omnisharp", {
|
||||
enable_roslyn_analyzers = true,
|
||||
enable_import_completion = true,
|
||||
organize_imports_on_format = true,
|
||||
enable_decompilation_support = true,
|
||||
filetypes = { "cs", "vb", "csproj", "sln", "slnx", "props", "csx", "targets", "tproj", "slngen", "fproj" },
|
||||
cmd = { nix_vars.omnisharp, "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
|
||||
})
|
||||
|
||||
-- Go LSP Configuration
|
||||
nvim_lsp.gopls.setup({
|
||||
setup_lsp("gopls", {
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
@@ -147,9 +159,8 @@ nvim_lsp.gopls.setup({
|
||||
callback = organize_go_imports,
|
||||
})
|
||||
end,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.gopls },
|
||||
filetypes = { "go" },
|
||||
settings = {
|
||||
gopls = {
|
||||
buildFlags = { "-tags=e2e" },
|
||||
@@ -158,26 +169,26 @@ nvim_lsp.gopls.setup({
|
||||
})
|
||||
|
||||
-- Go LSP Linting
|
||||
nvim_lsp.golangci_lint_ls.setup({
|
||||
setup_lsp("golangci_lint_ls", {
|
||||
on_attach = on_attach_no_formatting,
|
||||
flags = lsp_flags,
|
||||
capabilities = capabilities,
|
||||
cmd = { nix_vars.golintls },
|
||||
filetypes = { "go" },
|
||||
init_options = {
|
||||
command = {
|
||||
"golangci-lint",
|
||||
"run",
|
||||
"--out-format",
|
||||
"json",
|
||||
"--output.json.path",
|
||||
"stdout",
|
||||
"--show-stats=false",
|
||||
"--issues-exit-code=1",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
------------------------------------------------------
|
||||
--------------------- Null-LS LSP --------------------
|
||||
--------------------- None-LS LSP --------------------
|
||||
------------------------------------------------------
|
||||
local null_ls = require("null-ls")
|
||||
local none_ls = require("null-ls")
|
||||
|
||||
local eslintFiles = {
|
||||
".eslintrc",
|
||||
@@ -194,29 +205,32 @@ local eslintFiles = {
|
||||
"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)
|
||||
local has_eslint_in_parents = function(fname)
|
||||
local root_file = require("lspconfig").util.insert_package_json(eslintFiles, "eslintConfig", fname)
|
||||
return require("lspconfig").util.root_pattern(unpack(root_file))(fname)
|
||||
end
|
||||
|
||||
null_ls.setup({
|
||||
none_ls.setup({
|
||||
sources = {
|
||||
-- Prettier Formatting
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }),
|
||||
none_ls.builtins.formatting.prettier,
|
||||
none_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,
|
||||
none_ls.builtins.completion.spell,
|
||||
none_ls.builtins.formatting.nixpkgs_fmt, -- TODO: nixd native LSP?
|
||||
none_ls.builtins.diagnostics.sqlfluff,
|
||||
none_ls.builtins.formatting.sqlfluff,
|
||||
require("none-ls.formatting.autopep8").with({
|
||||
filetypes = { "starlark", "python" },
|
||||
extra_args = { "--max-line-length", "100" },
|
||||
}),
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
if client:supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
5
modules/home/programs/terminal/nvim/config/lua/lsp-lines-config.lua
Executable file
5
modules/home/programs/terminal/nvim/config/lua/lsp-lines-config.lua
Executable file
@@ -0,0 +1,5 @@
|
||||
require("lsp_lines").setup()
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
virtual_lines = true,
|
||||
})
|
||||
54
modules/home/programs/terminal/nvim/config/lua/lualine-config.lua
Executable file
54
modules/home/programs/terminal/nvim/config/lua/lualine-config.lua
Executable file
@@ -0,0 +1,54 @@
|
||||
-- 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
|
||||
local 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 = "catppuccin" },
|
||||
sections = { lualine_c = { { pr_status } } },
|
||||
})
|
||||
0
home-manager/nvim/config/lua/neotree-config.lua → modules/home/programs/terminal/nvim/config/lua/neotree-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/neotree-config.lua → modules/home/programs/terminal/nvim/config/lua/neotree-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/noice-config.lua → modules/home/programs/terminal/nvim/config/lua/noice-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/noice-config.lua → modules/home/programs/terminal/nvim/config/lua/noice-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/numb-config.lua → modules/home/programs/terminal/nvim/config/lua/numb-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/numb-config.lua → modules/home/programs/terminal/nvim/config/lua/numb-config.lua
Normal file → Executable file
@@ -0,0 +1,30 @@
|
||||
require("octo").setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>rs", "<cmd>Octo review start<cr>")
|
||||
vim.keymap.set("n", "<leader>rd", "<cmd>Octo review discard<cr>")
|
||||
vim.keymap.set("n", "<leader>rr", "<cmd>Octo review resume<cr>")
|
||||
vim.keymap.set("n", "<leader>re", "<cmd>Octo review submit<cr>")
|
||||
vim.keymap.set("n", "<leader>rca", "<cmd>Octo review comments<cr>")
|
||||
vim.keymap.set("n", "<leader>rcs", "<cmd>Octo comment suggest<cr>")
|
||||
vim.keymap.set("n", "<leader>rcc", "<cmd>Octo comment add<cr>")
|
||||
vim.keymap.set("n", "<leader>rcr", "<cmd>Octo comment reply<cr>")
|
||||
|
||||
vim.keymap.set("n", "<leader>pd", "<cmd>Octo pr diff<cr>")
|
||||
vim.keymap.set("n", "<leader>pc", "<cmd>Octo pr changes<cr>")
|
||||
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = "octo",
|
||||
-- callback = function()
|
||||
-- vim.keymap.set("n", "<leader>rs", "<cmd>Octo review start<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>rd", "<cmd>Octo review discard<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>rr", "<cmd>Octo review resume<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>re", "<cmd>Octo review submit<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>rca", "<cmd>Octo review comments<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>rcs", "<cmd>Octo comment suggest<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>rcc", "<cmd>Octo comment add<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>rcr", "<cmd>Octo comment reply<cr>", { buffer = true })
|
||||
--
|
||||
-- vim.keymap.set("n", "<leader>pd", "<cmd>Octo pr diff<cr>", { buffer = true })
|
||||
-- vim.keymap.set("n", "<leader>pc", "<cmd>Octo pr changes<cr>", { buffer = true })
|
||||
-- end,
|
||||
-- })
|
||||
@@ -0,0 +1,71 @@
|
||||
local progress = require("fidget.progress")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M:init()
|
||||
local group = vim.api.nvim_create_augroup("CodeCompanionFidgetHooks", {})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "User" }, {
|
||||
pattern = "CodeCompanionRequestStarted",
|
||||
group = group,
|
||||
callback = function(request)
|
||||
local handle = M:create_progress_handle(request)
|
||||
M:store_progress_handle(request.data.id, handle)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "User" }, {
|
||||
pattern = "CodeCompanionRequestFinished",
|
||||
group = group,
|
||||
callback = function(request)
|
||||
local handle = M:pop_progress_handle(request.data.id)
|
||||
if handle then
|
||||
M:report_exit_status(handle, request)
|
||||
handle:finish()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
M.handles = {}
|
||||
|
||||
function M:store_progress_handle(id, handle)
|
||||
M.handles[id] = handle
|
||||
end
|
||||
|
||||
function M:pop_progress_handle(id)
|
||||
local handle = M.handles[id]
|
||||
M.handles[id] = nil
|
||||
return handle
|
||||
end
|
||||
|
||||
function M:create_progress_handle(request)
|
||||
return progress.handle.create({
|
||||
title = " Requesting assistance (" .. request.data.strategy .. ")",
|
||||
message = "In progress...",
|
||||
lsp_client = {
|
||||
name = M:llm_role_title(request.data.adapter),
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
function M:llm_role_title(adapter)
|
||||
local parts = {}
|
||||
table.insert(parts, adapter.formatted_name)
|
||||
if adapter.model and adapter.model ~= "" then
|
||||
table.insert(parts, "(" .. adapter.model .. ")")
|
||||
end
|
||||
return table.concat(parts, " ")
|
||||
end
|
||||
|
||||
function M:report_exit_status(handle, request)
|
||||
if request.data.status == "success" then
|
||||
handle.message = "Completed"
|
||||
elseif request.data.status == "error" then
|
||||
handle.message = " Error"
|
||||
else
|
||||
handle.message = " Cancelled"
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
0
home-manager/nvim/config/lua/silicon-config.lua → modules/home/programs/terminal/nvim/config/lua/silicon-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/silicon-config.lua → modules/home/programs/terminal/nvim/config/lua/silicon-config.lua
Normal file → Executable file
23
modules/home/programs/terminal/nvim/config/lua/telescope-config.lua
Executable file
23
modules/home/programs/terminal/nvim/config/lua/telescope-config.lua
Executable file
@@ -0,0 +1,23 @@
|
||||
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")
|
||||
require("telescope").load_extension("undo")
|
||||
|
||||
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)
|
||||
vim.keymap.set("n", "<leader>fu", "<cmd>Telescope undo<cr>")
|
||||
vim.keymap.set("n", "<leader>fp", "<cmd>Octo pr list<cr>")
|
||||
0
home-manager/nvim/config/lua/toggleterm-config.lua → modules/home/programs/terminal/nvim/config/lua/toggleterm-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/toggleterm-config.lua → modules/home/programs/terminal/nvim/config/lua/toggleterm-config.lua
Normal file → Executable file
4
modules/home/programs/terminal/nvim/config/lua/ts-config.lua
Executable file
4
modules/home/programs/terminal/nvim/config/lua/ts-config.lua
Executable file
@@ -0,0 +1,4 @@
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true, additional_vim_regex_highlighting = false },
|
||||
})
|
||||
vim.treesitter.language.register("markdown", "octo")
|
||||
66
modules/home/programs/terminal/nvim/config/lua/weird-chars.lua
Executable file
66
modules/home/programs/terminal/nvim/config/lua/weird-chars.lua
Executable file
@@ -0,0 +1,66 @@
|
||||
local ns = vim.api.nvim_create_namespace("weird-chars")
|
||||
|
||||
local weird_chars = {
|
||||
["–"] = "en dash found, consider using regular hyphen (-)",
|
||||
["—"] = "em dash found, consider using regular hyphen (-)",
|
||||
["“"] = 'left double quote found, consider using straight quote (")',
|
||||
["”"] = 'right double quote found, consider using straight quote (")',
|
||||
["‘"] = "left single quote found, consider using straight quote (')",
|
||||
["’"] = "right single quote found, consider using straight quote (')",
|
||||
["•"] = "bullet found, consider using regular asterisk (*)",
|
||||
["·"] = "middle dot found",
|
||||
[" "] = "full-width space found, consider using regular space",
|
||||
}
|
||||
|
||||
local function check_weird_chars()
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
||||
local diagnostics = {}
|
||||
|
||||
for linenr, line in ipairs(lines) do
|
||||
local i = 1
|
||||
while i <= #line do
|
||||
local b = line:byte(i)
|
||||
local char
|
||||
|
||||
-- Check for UTF-8 multi-byte sequences
|
||||
if b >= 0xE2 and b <= 0xEF then
|
||||
-- Likely a 3-byte UTF-8 sequence
|
||||
char = line:sub(i, i + 2)
|
||||
i = i + 3
|
||||
elseif b >= 0xC2 and b <= 0xDF then
|
||||
-- Likely a 2-byte UTF-8 sequence
|
||||
char = line:sub(i, i + 1)
|
||||
i = i + 2
|
||||
else
|
||||
-- Single byte character
|
||||
char = line:sub(i, i)
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
if weird_chars[char] then
|
||||
table.insert(diagnostics, {
|
||||
bufnr = bufnr,
|
||||
lnum = linenr - 1,
|
||||
col = i - #char - 1,
|
||||
message = weird_chars[char],
|
||||
severity = vim.diagnostic.severity.WARN,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vim.diagnostic.set(ns, bufnr, diagnostics)
|
||||
end
|
||||
|
||||
-- Create autocommand group
|
||||
local group = vim.api.nvim_create_augroup("WeirdChars", { clear = true })
|
||||
|
||||
-- Set up autocommands
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "TextChanged", "InsertLeave" }, {
|
||||
group = group,
|
||||
callback = check_weird_chars,
|
||||
})
|
||||
|
||||
-- Create commands for manual checking
|
||||
vim.api.nvim_create_user_command("CheckWeirdChars", check_weird_chars, {})
|
||||
52
modules/home/programs/terminal/nvim/config/lua/which-key-config.lua
Executable file
52
modules/home/programs/terminal/nvim/config/lua/which-key-config.lua
Executable file
@@ -0,0 +1,52 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.setup({})
|
||||
|
||||
wk.add({
|
||||
{ "<C-k>", desc = "Signature Help" },
|
||||
{ "K", desc = "Definition Hover" },
|
||||
{ "<leader>a", desc = "Aerial" },
|
||||
{ "<leader>c", desc = "CodeCompanion" },
|
||||
{ "<leader>cn", "<cmd>CodeCompanionChat<cr>", desc = "New Chat", mode = { "v", "n" } },
|
||||
{ "<leader>ct", "<cmd>CodeCompanionChat Toggle<cr>", desc = "Toggle Chat" },
|
||||
{ "<leader>ci", "<cmd>CodeCompanion<cr>", desc = "Inline Prompt", mode = "v" },
|
||||
{ "<leader>db", desc = "Toggle Breakpoint" },
|
||||
{ "<leader>dc", desc = "Continue" },
|
||||
{ "<leader>d", group = "Debug" },
|
||||
{ "<leader>dt", desc = "Run Test" },
|
||||
{ "<leader>du", desc = "Toggle UI" },
|
||||
{ "<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>f", group = "Find - Telescope" },
|
||||
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help Tags" },
|
||||
{ "<leader>fj", "<cmd>Telescope jumplist<cr>", desc = "Jump List" },
|
||||
{ "<leader>fp", "<cmd>Octo pr list<cr>", desc = "PR List" },
|
||||
{ "<leader>gB", desc = "Git Blame Full" },
|
||||
{ "<leader>gb", desc = "Git Blame Line" },
|
||||
{ "<leader>gc", "<cmd>DiffviewClose<cr>", desc = "Close Diff" },
|
||||
{ "<leader>g", group = "DiffView" },
|
||||
{ "<leader>gh", "<cmd>DiffviewFileHistory<cr>", desc = "Diff History" },
|
||||
{ "<leader>gH", "<cmd>DiffviewFileHistory --range=origin..HEAD<cr>", desc = "Diff History - Main" },
|
||||
{ "<leader>go", "<cmd>DiffviewOpen<cr>", desc = "Open Diff - Current" },
|
||||
{ "<leader>gO", "<cmd>DiffviewOpen origin/main...HEAD<cr>", desc = "Open Diff - Main" },
|
||||
{ "<leader>lD", desc = "Declaration" },
|
||||
{ "<leader>ld", desc = "Definition" },
|
||||
{ "<leader>lf", desc = "Format" },
|
||||
{ "<leader>l", group = "LSP" },
|
||||
{ "<leader>li", desc = "Implementation" },
|
||||
{ "<leader>ln", desc = "Rename" },
|
||||
{ "<leader>lr", desc = "References" },
|
||||
{ "<leader>lt", desc = "Type Definition" },
|
||||
{ "<leader>qe", desc = "Open Diagnostic Float" },
|
||||
{ "<leader>q", group = "Diagnostics" },
|
||||
{ "<leader>qn", desc = "Next Diagnostic" },
|
||||
{ "<leader>qN", desc = "Previous Diagnostic" },
|
||||
{ "<leader>qq", desc = "Toggle Diagnostic List" },
|
||||
{ "<leader>qt", desc = "Toggle Inline Diagnostics" },
|
||||
{ "<leader>sb", desc = "Buffer Screenshot", mode = { "n", "v" } },
|
||||
{ "<leader>s", group = "Screenshot", mode = { "n", "v" } },
|
||||
{ "<leader>ss", desc = "Selected Screenshot", mode = "v" },
|
||||
{ "<leader>sv", desc = "Visual Screenshot" },
|
||||
{ "<leader>t", desc = "NeoTree" },
|
||||
})
|
||||
194
modules/home/programs/terminal/nvim/default.nix
Executable file
194
modules/home/programs/terminal/nvim/default.nix
Executable file
@@ -0,0 +1,194 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, namespace
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.${namespace}.programs.terminal.nvim;
|
||||
in
|
||||
{
|
||||
options.${namespace}.programs.terminal.nvim = {
|
||||
enable = lib.mkEnableOption "NeoVim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
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_luasnip # Snippets Completion
|
||||
cmp-nvim-lsp # Main LSP
|
||||
cmp-path # Path Completion
|
||||
friendly-snippets # Snippets
|
||||
lsp_lines-nvim # Inline Diagnostics
|
||||
luasnip # Snippets
|
||||
nvim-cmp # Completions
|
||||
nvim-lspconfig # LSP Config
|
||||
|
||||
# -------------------
|
||||
# ----- Helpers -----
|
||||
# -------------------
|
||||
aerial-nvim # Code Outline
|
||||
codecompanion-nvim # CodeCompanion
|
||||
comment-nvim # Code Comments
|
||||
copilot-vim # GitHub Copilot
|
||||
diffview-nvim # Diff View
|
||||
fidget-nvim # Notification Helper
|
||||
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 (),[],{}
|
||||
octo-nvim # Git Octo
|
||||
render-markdown-nvim # Markdown Renderer
|
||||
telescope-fzf-native-nvim # Faster Telescope
|
||||
telescope-nvim # Fuzzy Finder
|
||||
telescope-ui-select-nvim # UI
|
||||
telescope-undo-nvim # Undo Tree
|
||||
toggleterm-nvim # Terminal Helper
|
||||
vim-nix # Nix Helpers
|
||||
which-key-nvim # Shortcut Helper
|
||||
|
||||
# ------------------
|
||||
# --- Theme / UI ---
|
||||
# ------------------
|
||||
catppuccin-nvim # Theme
|
||||
lualine-nvim # Bottom Line
|
||||
noice-nvim # UI Tweaks
|
||||
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 = "2025-10-28";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvimtools";
|
||||
repo = "none-ls-extras.nvim";
|
||||
rev = "402c6b5c29f0ab57fac924b863709f37f55dc298";
|
||||
sha256 = "sha256-4s/xQNWNA4dgb5gZR4Xqn6zDDWrSJNtmHOmmjmYnN/8=";
|
||||
};
|
||||
doCheck = false;
|
||||
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
|
||||
})
|
||||
|
||||
# -------------------
|
||||
# ----- Silicon -----
|
||||
# -------------------
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "silicon.lua";
|
||||
version = "2025-10-28";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "0oAstro";
|
||||
repo = "silicon.lua";
|
||||
rev = "54682647a7c1c773dc4c9ab2bc309114a3b9e96f";
|
||||
sha256 = "sha256-lM7ALmYHGN5SKftfD7YBPh1gGKORbS6EMXS/ZQXDMSI=";
|
||||
};
|
||||
doCheck = false;
|
||||
meta.homepage = "https://github.com/0oAstro/silicon.lua";
|
||||
})
|
||||
|
||||
# -------------------
|
||||
# ---- LLAMA.VIM ----
|
||||
# -------------------
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "llama.vim";
|
||||
version = "2025-10-28";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ggml-org";
|
||||
repo = "llama.vim";
|
||||
rev = "ade8966eff57dcbe4a359dd26fb1ea97378ea03c";
|
||||
sha256 = "sha256-uPqOZLWKVMimhc9eG7yM5OmhJy3mTRgKsiqKhstWs4Y=";
|
||||
};
|
||||
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
|
||||
python312Packages.autopep8
|
||||
|
||||
# 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}",
|
||||
clangd = "${pkgs.clang-tools}/bin/clangd",
|
||||
omnisharp = "${pkgs.omnisharp-roslyn}/bin/OmniSharp",
|
||||
}
|
||||
return nix_vars
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
62
modules/home/programs/terminal/tmux/default.nix
Executable file
62
modules/home/programs/terminal/tmux/default.nix
Executable file
@@ -0,0 +1,62 @@
|
||||
{ lib, pkgs, config, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.${namespace}.programs.terminal.tmux;
|
||||
in
|
||||
{
|
||||
options.${namespace}.programs.terminal.tmux = {
|
||||
enable = lib.mkEnableOption "tmux";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
{
|
||||
plugin = catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
set -g @catppuccin_status_background "none"
|
||||
|
||||
# Style & Separators
|
||||
set -g @catppuccin_window_status_style "basic"
|
||||
set -g @catppuccin_status_left_separator "█"
|
||||
set -g @catppuccin_status_middle_separator ""
|
||||
set -g @catppuccin_status_right_separator "█"
|
||||
|
||||
# Window Titles
|
||||
set -g @catppuccin_window_text " #W"
|
||||
set -g @catppuccin_window_current_text " #W"
|
||||
'';
|
||||
}
|
||||
cpu
|
||||
yank
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
# Misc Settings
|
||||
set -g status-position top
|
||||
set -g mouse on
|
||||
setw -g mode-keys vi
|
||||
set -ag terminal-overrides ",xterm-256color:Tc:Ms=\\E]52;c%p1%.0s;%p2%s\\7"
|
||||
|
||||
# Start Index 1
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g renumber-windows on
|
||||
|
||||
# Maintain Directory
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
# Theme
|
||||
set -g status-left ""
|
||||
set -g status-right ""
|
||||
set -ag status-right "#{E:@catppuccin_status_host}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
35
modules/home/services/fusuma/default.nix
Normal file
35
modules/home/services/fusuma/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, pkgs, lib, namespace, ... }:
|
||||
let
|
||||
cfg = config.${namespace}.services.fusuma;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.fusuma = {
|
||||
enable = lib.mkEnableOption "Fusuma";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.fusuma = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ ydotool deterministic-uname uutils-coreutils-noprefix ];
|
||||
settings = {
|
||||
swipe = {
|
||||
"3" = {
|
||||
begin = {
|
||||
command = "ydotool click 40";
|
||||
interval = 0.00;
|
||||
};
|
||||
update = {
|
||||
command = "ydotool mousemove -- $move_x, $move_y";
|
||||
interval = 0.01;
|
||||
accel = 1.00;
|
||||
# accel = 1.70;
|
||||
};
|
||||
end = {
|
||||
command = "ydotool click 80";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/home/services/poweralertd/default.nix
Normal file
17
modules/home/services/poweralertd/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = config.${namespace}.services.poweralertd;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.poweralertd = {
|
||||
enable = lib.mkEnableOption "poweralertd";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.poweralertd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user