Compare commits
28 Commits
0dd32db094
...
snowfall
| Author | SHA1 | Date | |
|---|---|---|---|
| 559ef8c17d | |||
| 036f162264 | |||
| 00070837c2 | |||
| e84f6e7cb4 | |||
| 914f8e8d30 | |||
| fb1b69153b | |||
| cf82afea4b | |||
| 4d04f2600f | |||
| 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
|
.DS_Store
|
||||||
|
_scratch
|
||||||
|
result
|
||||||
|
._*
|
||||||
|
|||||||
15
.sops.yaml
Normal file
15
.sops.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
keys:
|
||||||
|
# Admin - Age Native
|
||||||
|
- &admin_reichard age1sac93wpnjcv62s7583jv6a4yspndh6k0r25g3qx3k7gq748uvafst6nz4w
|
||||||
|
# lin-va-mbp-personal@evanreichard - SSH Derived
|
||||||
|
- &user_lin-va-mbp-personal age17ayje4uv2mhwehhp9jr3u9l0ds07396kt7ef40sufx89vm7cgfjq6d5d4y
|
||||||
|
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
|
||||||
47
README.md
Normal file → Executable file
47
README.md
Normal file → Executable file
@@ -1,42 +1,65 @@
|
|||||||
# Deploy NixOS
|
# Description
|
||||||
|
|
||||||
## Copy Config
|
This repository contains the configuration for multiple machines, as well as my home / IDE config (home-manager).
|
||||||
|
|
||||||
|
### NixOS
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
scp -r * nixos@10.10.10.10:/tmp/
|
sudo nixos-rebuild switch --flake .#lin-va-mbp-personal
|
||||||
```
|
```
|
||||||
|
|
||||||
## Partition Drives
|
### NixOS Generators
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# WARNING: Be sure to check drive mappings
|
nix build .#vmwareConfigurations.rke2-node
|
||||||
sudo fdisk -l
|
```
|
||||||
|
|
||||||
|
### Home Manager
|
||||||
|
|
||||||
|
```bash
|
||||||
|
home-manager switch --flake .#evanreichard@MBP-Personal
|
||||||
|
```
|
||||||
|
|
||||||
|
### NixOS Hosts
|
||||||
|
|
||||||
|
#### Copy Config
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rsync -av --exclude='.git' . root@HOST:/etc/nixos
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Partition Drives
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Validate Disk
|
||||||
|
ls -l /dev/disk/by-id
|
||||||
|
|
||||||
# Partition Disk
|
# Partition Disk
|
||||||
|
# WARNING: This will destroy all data on the disk(s)
|
||||||
sudo nix \
|
sudo nix \
|
||||||
--experimental-features "nix-command flakes" \
|
--experimental-features "nix-command flakes" \
|
||||||
run github:nix-community/disko -- \
|
run github:nix-community/disko -- \
|
||||||
--mode disko \
|
--mode disko \
|
||||||
--flake /tmp#lin-va-llama1
|
--flake /etc/nixos#HOST_CONFIG
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install NixOS
|
#### Install NixOS
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install
|
# Install
|
||||||
sudo nixos-install --flake /tmp#lin-va-llama1
|
sudo nixos-install --flake /etc/nixos#HOST_CONFIG
|
||||||
|
|
||||||
# Reboot
|
# Reboot
|
||||||
sudo reboot
|
sudo reboot
|
||||||
```
|
```
|
||||||
|
|
||||||
## Copy Config to Host
|
#### Copy Config Back to Host
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
scp -r * nixos@10.10.10.10:/etc/nixos
|
rsync -av --exclude='.git' . root@HOST:/etc/nixos
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rebuild NixOS
|
#### Rebuild NixOS
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nixos-rebuild switch
|
sudo nixos-rebuild switch
|
||||||
|
|||||||
149
bootstrap.sh
Executable file
149
bootstrap.sh
Executable file
@@ -0,0 +1,149 @@
|
|||||||
|
#!/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 \
|
||||||
|
".#qcowConfigurations" \
|
||||||
|
--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=(".#qcowConfigurations.$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>"
|
||||||
|
local name=""
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case "$1" in
|
||||||
|
--name)
|
||||||
|
name="$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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
image)
|
||||||
|
shift
|
||||||
|
cmd_image "$@"
|
||||||
|
;;
|
||||||
|
install)
|
||||||
|
shift
|
||||||
|
cmd_install "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {image|install} --name <name>"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
344
flake.lock
generated
Executable file
344
flake.lock
generated
Executable file
@@ -0,0 +1,344 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"apple-silicon": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1738646032,
|
||||||
|
"narHash": "sha256-57BdBE9anNpIpf48EiTVLGxg4mOQ04XjHCEP0gLTsFA=",
|
||||||
|
"owner": "tpwrules",
|
||||||
|
"repo": "nixos-apple-silicon",
|
||||||
|
"rev": "e77031211944723a38bebc043e48847c36e43668",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tpwrules",
|
||||||
|
"ref": "releasep2-2024-12-25",
|
||||||
|
"repo": "nixos-apple-silicon",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"disko": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743598667,
|
||||||
|
"narHash": "sha256-ViE7NoFWytYO2uJONTAX35eGsvTYXNHjWALeHAg8OQY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"rev": "329d3d7e8bc63dd30c39e14e6076db590a6eabe6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"firefox-addons": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"dir": "pkgs/firefox-addons",
|
||||||
|
"lastModified": 1743861198,
|
||||||
|
"narHash": "sha256-PzbPHoSI5U1juWd01Spf3ST7ylR9mQ84v5p7NksBplY=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nur-expressions",
|
||||||
|
"rev": "7408ed5bbc9009741094f4dd4cc1abec79e79e7e",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "pkgs/firefox-addons",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nur-expressions",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1688025799,
|
||||||
|
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
||||||
|
"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": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1629284811,
|
||||||
|
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils-plus": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743808813,
|
||||||
|
"narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.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": 1742568034,
|
||||||
|
"narHash": "sha256-QaMEhcnscfF2MqB7flZr+sLJMMYZPnvqO4NYf9B4G38=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"rev": "42ee229088490e3777ed7d1162cb9e9d8c3dbb11",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743259260,
|
||||||
|
"narHash": "sha256-ArWLUgRm1tKHiqlhnymyVqi5kLNCK5ghvm06mfCl4QY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "eb0e0f21f15c559d2ac7633dc81d079d1caf5f5f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1744098102,
|
||||||
|
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743813633,
|
||||||
|
"narHash": "sha256-BgkBz4NpV6Kg8XF7cmHDHRVGZYnKbvG0Y4p+jElwxaM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7819a0d29d1dd2bc331bec4b327f0776359b1fa6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"apple-silicon": "apple-silicon",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1686795910,
|
||||||
|
"narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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": 1743910657,
|
||||||
|
"narHash": "sha256-zr2jmWeWyhCD8WmO2aWov2g0WPPuZfcJDKzMJZYGq3Y=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"rev": "523f58a4faff6c67f5f685bed33a7721e984c304",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
65
flake.nix
Normal file → Executable file
65
flake.nix
Normal file → Executable file
@@ -3,29 +3,62 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
|
snowfall-lib = {
|
||||||
|
url = "github:snowfallorg/lib";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-24.11";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
apple-silicon = {
|
||||||
|
url = "github:tpwrules/nixos-apple-silicon/releasep2-2024-12-25";
|
||||||
|
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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, disko }: {
|
outputs = inputs:
|
||||||
nixosConfigurations.lin-va-llama1 = nixpkgs.lib.nixosSystem {
|
inputs.snowfall-lib.mkFlake {
|
||||||
system = "x86_64-linux";
|
inherit inputs;
|
||||||
modules = [
|
src = ./.;
|
||||||
disko.nixosModules.disko
|
|
||||||
./hosts/llama-server.nix
|
snowfall = {
|
||||||
{
|
namespace = "reichard";
|
||||||
networking.hostName = "lin-va-llama1";
|
meta = {
|
||||||
}
|
title = "Reichard";
|
||||||
|
name = "reichard";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
channels-config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
permittedInsecurePackages = [
|
||||||
|
"intel-ocl-5.0-63503"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations.lin-va-k3s1 = nixpkgs.lib.nixosSystem {
|
homes.modules = with inputs; [
|
||||||
system = "x86_64-linux";
|
sops-nix.homeManagerModules.sops
|
||||||
modules = [
|
];
|
||||||
|
|
||||||
|
systems.modules = {
|
||||||
|
nixos = with inputs; [
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
./hosts/k3s.nix
|
sops-nix.nixosModules.sops
|
||||||
{
|
|
||||||
networking.hostName = "lin-va-k3s1";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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,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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
57
homes/aarch64-darwin/evanreichard@mac-va-mbp-personal/default.nix
Executable file
57
homes/aarch64-darwin/evanreichard@mac-va-mbp-personal/default.nix
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
{ lib, config, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.${namespace}) enabled;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
|
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
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# 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 = "24.11";
|
||||||
|
|
||||||
|
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
|
||||||
|
python311
|
||||||
|
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 = "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 = {
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
85
homes/x86_64-linux/evanreichard@lin-va-thinkpad/default.nix
Executable file
85
homes/x86_64-linux/evanreichard@lin-va-thinkpad/default.nix
Executable file
@@ -0,0 +1,85 @@
|
|||||||
|
{ 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
};
|
||||||
|
}
|
||||||
115
modules/home/programs/graphical/browsers/firefox/default.nix
Normal file
115
modules/home/programs/graphical/browsers/firefox/default.nix
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
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 = 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
home-manager/fastfetch/config/config.jsonc → modules/home/programs/graphical/ghostty/config/fastfetch.jsonc
Normal file → Executable file
0
home-manager/fastfetch/config/config.jsonc → modules/home/programs/graphical/ghostty/config/fastfetch.jsonc
Normal file → Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
# https://github.com/catppuccin/ghostty/blob/main/themes/catppuccin-macchiato.conf
|
||||||
|
palette = 0=#494d64
|
||||||
|
palette = 1=#ed8796
|
||||||
|
palette = 2=#a6da95
|
||||||
|
palette = 3=#eed49f
|
||||||
|
palette = 4=#8aadf4
|
||||||
|
palette = 5=#f5bde6
|
||||||
|
palette = 6=#8bd5ca
|
||||||
|
palette = 7=#b8c0e0
|
||||||
|
palette = 8=#5b6078
|
||||||
|
palette = 9=#ed8796
|
||||||
|
palette = 10=#a6da95
|
||||||
|
palette = 11=#eed49f
|
||||||
|
palette = 12=#8aadf4
|
||||||
|
palette = 13=#f5bde6
|
||||||
|
palette = 14=#8bd5ca
|
||||||
|
palette = 15=#a5adcb
|
||||||
|
background = 24273a
|
||||||
|
foreground = cad3f5
|
||||||
|
cursor-color = f4dbd6
|
||||||
|
cursor-text = 24273a
|
||||||
|
selection-background = 3a3e53
|
||||||
|
selection-foreground = cad3f5
|
||||||
@@ -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
|
# Melange Dark - Adapted From: https://github.com/savq/melange-nvim/blob/master/term/kitty/melange_dark.conf
|
||||||
palette = 0=#34302C
|
palette = 0=#34302C
|
||||||
palette = 1=#BD8183
|
palette = 1=#BD8183
|
||||||
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
|
||||||
78
modules/home/programs/graphical/ghostty/default.nix
Executable file
78
modules/home/programs/graphical/ghostty/default.nix
Executable file
@@ -0,0 +1,78 @@
|
|||||||
|
{ 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 {
|
||||||
|
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
|
||||||
|
bind "set show-mode-in-prompt on"
|
||||||
|
|
||||||
|
set -o vi || true
|
||||||
|
VISUAL=vim
|
||||||
|
EDITOR="$VISUAL"
|
||||||
|
|
||||||
|
fastfetch
|
||||||
|
eval "$(thefuck --alias)"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
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; [
|
||||||
|
thefuck
|
||||||
|
fastfetch
|
||||||
|
bashInteractive
|
||||||
|
(nerdfonts.override { fonts = [ "Meslo" ]; })
|
||||||
|
] ++ optionals isLinux [
|
||||||
|
# Pending Darwin @ https://github.com/NixOS/nixpkgs/pull/369788
|
||||||
|
ghostty
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".config/fastfetch/config.jsonc".text = builtins.readFile ./config/fastfetch.jsonc;
|
||||||
|
home.file.".config/ghostty/config".text =
|
||||||
|
let
|
||||||
|
bashPath = "${pkgs.bashInteractive}/bin/bash";
|
||||||
|
in
|
||||||
|
builtins.replaceStrings
|
||||||
|
[ "@BASH_PATH@" ]
|
||||||
|
[ bashPath ]
|
||||||
|
(builtins.readFile ./config/ghostty.conf);
|
||||||
|
};
|
||||||
|
}
|
||||||
159
modules/home/programs/graphical/wms/hyprland/config/hyprland.conf
Executable file
159
modules/home/programs/graphical/wms/hyprland/config/hyprland.conf
Executable file
@@ -0,0 +1,159 @@
|
|||||||
|
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
|
||||||
|
gestures {
|
||||||
|
workspace_swipe = true
|
||||||
|
workspace_swipe_fingers = 4
|
||||||
|
workspace_swipe_invert = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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, pseudo" # dwindle
|
||||||
|
"$mainMod, J, togglesplit" # dwindle
|
||||||
|
"$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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/home/programs/terminal/aws/default.nix
Executable file
18
modules/home/programs/terminal/aws/default.nix
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
{ 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; [
|
||||||
|
cw
|
||||||
|
awscli2
|
||||||
|
ssm-session-manager-plugin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
0
home-manager/git/config/.gitignore → modules/home/programs/terminal/git/config/.gitignore
vendored
Normal file → Executable file
0
home-manager/git/config/.gitignore → modules/home/programs/terminal/git/config/.gitignore
vendored
Normal file → Executable file
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"
|
sshCommand = "ssh -i ~/Keys/work"
|
||||||
|
|
||||||
[user]
|
[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;
|
||||||
|
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 = {
|
||||||
|
user = {
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
git_protocol = "ssh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gitAndTools.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
69
modules/home/programs/terminal/nvim/config/lua/base.lua
Executable file
69
modules/home/programs/terminal/nvim/config/lua/base.lua
Executable file
@@ -0,0 +1,69 @@
|
|||||||
|
-- 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 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)
|
||||||
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
0
home-manager/nvim/config/lua/git-ref.lua → modules/home/programs/terminal/nvim/config/lua/git-ref.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/git-ref.lua → modules/home/programs/terminal/nvim/config/lua/git-ref.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/git-signs.lua → modules/home/programs/terminal/nvim/config/lua/git-signs.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/git-signs.lua → modules/home/programs/terminal/nvim/config/lua/git-signs.lua
Normal file → Executable file
1
home-manager/nvim/config/lua/init.lua → modules/home/programs/terminal/nvim/config/lua/init.lua
Normal file → Executable file
1
home-manager/nvim/config/lua/init.lua → modules/home/programs/terminal/nvim/config/lua/init.lua
Normal file → Executable file
@@ -20,3 +20,4 @@ require("telescope-config")
|
|||||||
require("toggleterm-config")
|
require("toggleterm-config")
|
||||||
require("ts-config")
|
require("ts-config")
|
||||||
require("which-key-config")
|
require("which-key-config")
|
||||||
|
require("weird-chars")
|
||||||
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
2
home-manager/nvim/config/lua/llm.lua → modules/home/programs/terminal/nvim/config/lua/llm.lua
Normal file → Executable file
2
home-manager/nvim/config/lua/llm.lua → modules/home/programs/terminal/nvim/config/lua/llm.lua
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
-- Configure LLama LLM
|
-- Configure LLama LLM
|
||||||
vim.g.llama_config = {
|
vim.g.llama_config = {
|
||||||
endpoint = "http://10.0.20.158:8080/infill",
|
endpoint = "http://10.0.50.120:8080/infill",
|
||||||
api_key = "",
|
api_key = "",
|
||||||
n_prefix = 256,
|
n_prefix = 256,
|
||||||
n_suffix = 64,
|
n_suffix = 64,
|
||||||
12
home-manager/nvim/config/lua/lsp-config.lua → modules/home/programs/terminal/nvim/config/lua/lsp-config.lua
Normal file → Executable file
12
home-manager/nvim/config/lua/lsp-config.lua → modules/home/programs/terminal/nvim/config/lua/lsp-config.lua
Normal file → Executable file
@@ -137,6 +137,13 @@ nvim_lsp.templ.setup({
|
|||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Nix LSP Configuration
|
||||||
|
nvim_lsp.nil_ls.setup({
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
|
||||||
-- Go LSP Configuration
|
-- Go LSP Configuration
|
||||||
nvim_lsp.gopls.setup({
|
nvim_lsp.gopls.setup({
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
@@ -167,8 +174,9 @@ nvim_lsp.golangci_lint_ls.setup({
|
|||||||
command = {
|
command = {
|
||||||
"golangci-lint",
|
"golangci-lint",
|
||||||
"run",
|
"run",
|
||||||
"--out-format",
|
"--output.json.path",
|
||||||
"json",
|
"stdout",
|
||||||
|
"--show-stats=false",
|
||||||
"--issues-exit-code=1",
|
"--issues-exit-code=1",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
0
home-manager/nvim/config/lua/lsp-lines-config.lua → modules/home/programs/terminal/nvim/config/lua/lsp-lines-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/lsp-lines-config.lua → modules/home/programs/terminal/nvim/config/lua/lsp-lines-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/lualine-config.lua → modules/home/programs/terminal/nvim/config/lua/lualine-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/lualine-config.lua → modules/home/programs/terminal/nvim/config/lua/lualine-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/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
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
0
home-manager/nvim/config/lua/telescope-config.lua → modules/home/programs/terminal/nvim/config/lua/telescope-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/telescope-config.lua → modules/home/programs/terminal/nvim/config/lua/telescope-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
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/ts-config.lua → modules/home/programs/terminal/nvim/config/lua/ts-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/ts-config.lua → modules/home/programs/terminal/nvim/config/lua/ts-config.lua
Normal file → Executable file
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, {})
|
||||||
0
home-manager/nvim/config/lua/which-key-config.lua → modules/home/programs/terminal/nvim/config/lua/which-key-config.lua
Normal file → Executable file
0
home-manager/nvim/config/lua/which-key-config.lua → modules/home/programs/terminal/nvim/config/lua/which-key-config.lua
Normal file → Executable file
204
modules/home/programs/terminal/nvim/default.nix
Executable file
204
modules/home/programs/terminal/nvim/default.nix
Executable file
@@ -0,0 +1,204 @@
|
|||||||
|
{ 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-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
|
||||||
|
catppuccin-nvim # Theme
|
||||||
|
nvim-notify # Noice Dependency
|
||||||
|
nvim-web-devicons # Dev Icons
|
||||||
|
|
||||||
|
# ------------------
|
||||||
|
# --- Treesitter ---
|
||||||
|
# ------------------
|
||||||
|
nvim-treesitter-context
|
||||||
|
nvim-treesitter.withAllGrammars
|
||||||
|
|
||||||
|
# -------------------
|
||||||
|
# ------- DAP -------
|
||||||
|
# -------------------
|
||||||
|
nvim-dap
|
||||||
|
nvim-dap-go
|
||||||
|
nvim-dap-ui
|
||||||
|
|
||||||
|
# --------------------
|
||||||
|
# -- NONE-LS EXTRAS --
|
||||||
|
# --------------------
|
||||||
|
(
|
||||||
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "none-ls-extras.nvim";
|
||||||
|
version = "2024-06-11";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "nvimtools";
|
||||||
|
repo = "none-ls-extras.nvim";
|
||||||
|
rev = "336e84b9e43c0effb735b08798ffac382920053b";
|
||||||
|
sha256 = "sha256-UtU4oWSRTKdEoMz3w8Pk95sROuo3LEwxSDAm169wxwk=";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/nvimtools/none-ls-extras.nvim/";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# -------------------
|
||||||
|
# ----- Silicon -----
|
||||||
|
# -------------------
|
||||||
|
(
|
||||||
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "silicon.lua";
|
||||||
|
version = "2022-12-03";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "mhanberg";
|
||||||
|
repo = "silicon.lua";
|
||||||
|
rev = "5ca462bee0a39b058786bc7fbeb5d16ea49f3a23";
|
||||||
|
sha256 = "0vlp645d5mmii513v72jca931miyrhkvhwb9bfzhix1199zx7vi2";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/mhanberg/silicon.lua/";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# -------------------
|
||||||
|
# ------- LLM -------
|
||||||
|
# -------------------
|
||||||
|
(
|
||||||
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "llm.nvim";
|
||||||
|
version = "2024-05-25";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "David-Kunz";
|
||||||
|
repo = "gen.nvim";
|
||||||
|
rev = "bd19cf584b5b82123de977b44105e855e61e5f39";
|
||||||
|
sha256 = "sha256-0AEB6im8Jz5foYzmL6KEGSAYo48g1bkFpjlCSWT6JeE=";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/David-Kunz/gen.nvim/";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
# -------------------
|
||||||
|
# ---- LLAMA.VIM ----
|
||||||
|
# -------------------
|
||||||
|
(
|
||||||
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
|
pname = "llama.vim";
|
||||||
|
version = "2025-01-23";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "ggml-org";
|
||||||
|
repo = "llama.vim";
|
||||||
|
rev = "143fe910b8d47a054ed464c38d8b7c17d5354468";
|
||||||
|
sha256 = "sha256-PW0HKzhSxcZiWzpDOuy98rl/X0o2nE7tMjZjwwh0qLE=";
|
||||||
|
};
|
||||||
|
meta.homepage = "https://github.com/ggml-org/llama.vim/";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
# Telescope Dependencies
|
||||||
|
fd
|
||||||
|
ripgrep
|
||||||
|
tree-sitter
|
||||||
|
|
||||||
|
# LSP Dependencies
|
||||||
|
go
|
||||||
|
golangci-lint
|
||||||
|
golangci-lint-langserver
|
||||||
|
gopls
|
||||||
|
lua-language-server
|
||||||
|
nil
|
||||||
|
nodePackages.eslint
|
||||||
|
nodePackages.svelte-language-server
|
||||||
|
nodePackages.typescript
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
nodePackages.vscode-langservers-extracted
|
||||||
|
pyright
|
||||||
|
eslint_d
|
||||||
|
|
||||||
|
# Formatters
|
||||||
|
luaformatter
|
||||||
|
nixpkgs-fmt
|
||||||
|
nodePackages.prettier
|
||||||
|
sqlfluff
|
||||||
|
stylua
|
||||||
|
|
||||||
|
# Silicon
|
||||||
|
silicon
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
# Copy Configuration
|
||||||
|
nvim = {
|
||||||
|
source = ./config;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Generate Nix Vars
|
||||||
|
"nvim/lua/nix-vars.lua".text = ''
|
||||||
|
local nix_vars = {
|
||||||
|
gopls = "${pkgs.gopls}/bin/gopls",
|
||||||
|
luals = "${pkgs.lua-language-server}/bin/lua-language-server",
|
||||||
|
sveltels = "${pkgs.nodePackages.svelte-language-server}/bin/svelteserver",
|
||||||
|
tsls = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server",
|
||||||
|
golintls = "${pkgs.golangci-lint-langserver}/bin/golangci-lint-langserver",
|
||||||
|
vscls = "${pkgs.nodePackages.vscode-langservers-extracted}",
|
||||||
|
}
|
||||||
|
return nix_vars
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
41
modules/home/services/sops/default.nix
Normal file
41
modules/home/services/sops/default.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{ config, lib, namespace, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf types;
|
||||||
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.sops;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.sops = with types; {
|
||||||
|
enable = lib.mkEnableOption "sops";
|
||||||
|
defaultSopsFile = mkOpt path null "Default sops file.";
|
||||||
|
sshKeyPaths = mkOpt (listOf path) [ ] "SSH Key paths to use.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
age
|
||||||
|
sops
|
||||||
|
ssh-to-age
|
||||||
|
];
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
inherit (cfg) defaultSopsFile;
|
||||||
|
defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
|
age = {
|
||||||
|
generateKey = true;
|
||||||
|
keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||||
|
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ] ++ cfg.sshKeyPaths;
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# secrets = {
|
||||||
|
# nix = {
|
||||||
|
# sopsFile = lib.snowfall.fs.get-file "secrets/default.yaml";
|
||||||
|
# path = "${config.home.homeDirectory}/.config/nix/nix.conf";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/home/services/ssh-agent/default.nix
Normal file
15
modules/home/services/ssh-agent/default.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.${namespace}.services.ssh-agent;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.ssh-agent = {
|
||||||
|
enable = lib.mkEnableOption "ssh-agent service";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.ssh-agent = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
73
modules/home/services/swww/default.nix
Normal file
73
modules/home/services/swww/default.nix
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.${namespace}.services.swww;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.swww = {
|
||||||
|
enable = lib.mkEnableOption "swww wallpaper service";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swww
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.user = {
|
||||||
|
services = {
|
||||||
|
swww-daemon = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SWWW Wallpaper Daemon";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.swww}/bin/swww-daemon";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
change-wallpaper = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SWWW Wallpaper Changer";
|
||||||
|
After = [ "swww-daemon.service" ];
|
||||||
|
Requires = [ "swww-daemon.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "swww-daemon.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.writeShellScript "change-wallpaper-script" ''
|
||||||
|
WALLPAPER=$(${pkgs.findutils}/bin/find $HOME/Wallpapers -type f | ${pkgs.coreutils}/bin/shuf -n 1)
|
||||||
|
${pkgs.swww}/bin/swww img "$WALLPAPER" --transition-type random
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
timers.swww-schedule = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SWWW Wallpaper Schedule";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = "1min";
|
||||||
|
OnUnitActiveSec = "1h";
|
||||||
|
Unit = "change-wallpaper.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
52
modules/home/user/default.nix
Normal file
52
modules/home/user/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
types
|
||||||
|
mkIf
|
||||||
|
mkDefault
|
||||||
|
mkMerge
|
||||||
|
mkEnableOption
|
||||||
|
;
|
||||||
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.user;
|
||||||
|
|
||||||
|
home-directory =
|
||||||
|
if cfg.name == null then
|
||||||
|
null
|
||||||
|
else if pkgs.stdenv.hostPlatform.isDarwin then
|
||||||
|
"/Users/${cfg.name}"
|
||||||
|
else
|
||||||
|
"/home/${cfg.name}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.user = {
|
||||||
|
enable = mkEnableOption "Whether to configure the user account.";
|
||||||
|
email = mkOpt types.str "evan@reichard.io" "The email of the user.";
|
||||||
|
fullName = mkOpt types.str "Evan Reichard" "The full name of the user.";
|
||||||
|
home = mkOpt (types.nullOr types.str) home-directory "The user's home directory.";
|
||||||
|
name = mkOpt (types.nullOr types.str) config.snowfallorg.user.name "The user account.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
{
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = cfg.name != null;
|
||||||
|
message = "${namespace}.user.name must be set";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
assertion = cfg.home != null;
|
||||||
|
message = "${namespace}.user.home must be set";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
homeDirectory = mkDefault cfg.home;
|
||||||
|
username = mkDefault cfg.name;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
||||||
34
modules/nixos/display-managers/sddm/default.nix
Normal file
34
modules/nixos/display-managers/sddm/default.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf types;
|
||||||
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.display-managers.sddm;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.display-managers.sddm = {
|
||||||
|
enable = lib.mkEnableOption "sddm";
|
||||||
|
scale = mkOpt types.str "1.75" "Scale";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
displayManager = {
|
||||||
|
sddm = {
|
||||||
|
inherit (cfg) enable;
|
||||||
|
package = pkgs.kdePackages.sddm;
|
||||||
|
theme = "catppuccin-mocha";
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
catppuccin-sddm
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
QT_SCREEN_SCALE_FACTORS = cfg.scale;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/nixos/hardware/asahi/default.nix
Normal file
27
modules/nixos/hardware/asahi/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, inputs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) types optionalAttrs;
|
||||||
|
inherit (lib.${namespace}) mkOpt mkBoolOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.hardware.asahi;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.apple-silicon.nixosModules.default
|
||||||
|
];
|
||||||
|
|
||||||
|
options.${namespace}.hardware.asahi = {
|
||||||
|
enable = lib.mkEnableOption "support for asahi linux";
|
||||||
|
enableGPU = mkBoolOpt false "enable gpu driver";
|
||||||
|
firmwareDirectory = mkOpt types.path null "firmware directory";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
hardware.asahi = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
} // optionalAttrs cfg.enable {
|
||||||
|
peripheralFirmwareDirectory = cfg.firmwareDirectory;
|
||||||
|
useExperimentalGPUDriver = cfg.enableGPU;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
44
modules/nixos/hardware/opengl/default.nix
Normal file
44
modules/nixos/hardware/opengl/default.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkForce;
|
||||||
|
inherit (lib.${namespace}) mkBoolOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.hardware.opengl;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.hardware.opengl = {
|
||||||
|
enable = lib.mkEnableOption "support for opengl";
|
||||||
|
enable32Bit = mkBoolOpt false "enable 32-bit";
|
||||||
|
enableIntel = mkBoolOpt false "support for intel";
|
||||||
|
enableNvidia = mkBoolOpt false "support for nvidia";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libva-utils
|
||||||
|
vdpauinfo
|
||||||
|
] ++ lib.optionals cfg.enableNvidia [
|
||||||
|
nvtopPackages.full
|
||||||
|
] ++ lib.optionals cfg.enableIntel [
|
||||||
|
intel-gpu-tools
|
||||||
|
];
|
||||||
|
|
||||||
|
# Add Intel Arc / Nvidia Drivers
|
||||||
|
hardware.enableRedistributableFirmware = mkIf cfg.enableIntel (mkForce true);
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = cfg.enable32Bit;
|
||||||
|
|
||||||
|
extraPackages = with pkgs;
|
||||||
|
lib.optionals cfg.enableIntel [
|
||||||
|
libvdpau-va-gl
|
||||||
|
intel-vaapi-driver
|
||||||
|
intel-media-driver
|
||||||
|
intel-compute-runtime
|
||||||
|
intel-ocl
|
||||||
|
] ++ lib.optionals cfg.enableNvidia [
|
||||||
|
cudatoolkit
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
8
modules/nixos/home/default.nix
Normal file
8
modules/nixos/home/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
config = {
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
102
modules/nixos/nix/default.nix
Normal file
102
modules/nixos/nix/default.nix
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
{ 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.";
|
||||||
|
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 = true;
|
||||||
|
registry = mappedRegistry;
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
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="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
modules/nixos/programs/graphical/wms/hyprland/default.nix
Normal file
28
modules/nixos/programs/graphical/wms/hyprland/default.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.programs.graphical.wms.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.programs.graphical.wms.hyprland = {
|
||||||
|
enable = lib.mkEnableOption "Hyprland";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
reichard = {
|
||||||
|
display-managers = {
|
||||||
|
sddm = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
modules/nixos/security/sops/default.nix
Normal file
31
modules/nixos/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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
33
modules/nixos/services/avahi/default.nix
Normal file
33
modules/nixos/services/avahi/default.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.avahi;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.avahi = {
|
||||||
|
enable = lib.mkEnableOption "Avahi";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
publish = {
|
||||||
|
enable = true;
|
||||||
|
addresses = true;
|
||||||
|
domain = true;
|
||||||
|
hinfo = true;
|
||||||
|
userServices = true;
|
||||||
|
workstation = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Cloud Init
|
||||||
|
systemd.services.avahi-daemon = mkIf config.${namespace}.services.cloud-init.enable {
|
||||||
|
after = [ "cloud-final.service" ];
|
||||||
|
requires = [ "cloud-final.service" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/nixos/services/cloud-init/default.nix
Normal file
27
modules/nixos/services/cloud-init/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.cloud-init;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.cloud-init = {
|
||||||
|
enable = lib.mkEnableOption "Enable Cloud-Init";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.cloud-init = {
|
||||||
|
enable = true;
|
||||||
|
network.enable = true;
|
||||||
|
settings = {
|
||||||
|
datasource_list = [ "NoCloud" ];
|
||||||
|
preserve_hostname = false;
|
||||||
|
system_info = {
|
||||||
|
distro = "nixos";
|
||||||
|
network.renderers = [ "networkd" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.hostName = lib.mkForce "";
|
||||||
|
};
|
||||||
|
}
|
||||||
57
modules/nixos/services/openiscsi/default.nix
Normal file
57
modules/nixos/services/openiscsi/default.nix
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{ config, pkgs, lib, namespace, host, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) types mkIf;
|
||||||
|
inherit (lib.${namespace}) mkOpt mkBoolOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.openiscsi;
|
||||||
|
cloudInitEnabled = config.${namespace}.services.cloud-init.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.openiscsi = {
|
||||||
|
enable = lib.mkEnableOption "Open iSCSI support";
|
||||||
|
name = mkOpt types.str "iqn.2025.reichard.io:${host}" "iSCSI name";
|
||||||
|
symlink = mkBoolOpt false "Create a symlink to the iSCSI binaries";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
boot.kernelModules = [ "iscsi_tcp" "libiscsi" "scsi_transport_iscsi" ];
|
||||||
|
|
||||||
|
services.openiscsi = {
|
||||||
|
enable = true;
|
||||||
|
name = cfg.name;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
openiscsi
|
||||||
|
];
|
||||||
|
|
||||||
|
# Predominately used for RKE2 & Democratic CSI
|
||||||
|
system.activationScripts.iscsi-symlink = mkIf cfg.symlink ''
|
||||||
|
mkdir -p /usr/bin
|
||||||
|
ln -sf ${pkgs.openiscsi}/bin/iscsiadm /usr/bin/iscsiadm
|
||||||
|
ln -sf ${pkgs.openiscsi}/bin/iscsid /usr/bin/iscsid
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Cloud Init Compatibility
|
||||||
|
environment.etc."iscsi/initiatorname.iscsi".enable = mkIf cloudInitEnabled false;
|
||||||
|
systemd.services.iscsi-initiator-setup = mkIf cloudInitEnabled {
|
||||||
|
description = "Setup iSCSI Initiator Name";
|
||||||
|
requires = [ "cloud-final.service" ];
|
||||||
|
before = [ "iscsid.service" ];
|
||||||
|
after = [ "cloud-final.service" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
path = [ pkgs.hostname pkgs.util-linux ];
|
||||||
|
script = ''
|
||||||
|
mkdir -p /run/iscsi
|
||||||
|
echo "InitiatorName=iqn.2025.org.nixos:$(hostname)" > /run/iscsi/initiatorname.iscsi
|
||||||
|
mount --bind /run/iscsi/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
80
modules/nixos/services/openssh/default.nix
Normal file
80
modules/nixos/services/openssh/default.nix
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
types
|
||||||
|
mkDefault
|
||||||
|
mkIf
|
||||||
|
;
|
||||||
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.openssh;
|
||||||
|
|
||||||
|
authorizedKeys = [
|
||||||
|
# evanreichard@lin-va-mbp-personal
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILJJoyXQOv9cAjGUHrUcvsW7vY9W0PmuPMQSI9AMZvNY"
|
||||||
|
# evanreichard@lin-va-thinkpad
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAq5JQr/6WJMIHhR434nK95FrDmf2ApW2Ahd2+cBKwDz"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.openssh = with types; {
|
||||||
|
enable = lib.mkEnableOption "OpenSSH support";
|
||||||
|
authorizedKeys = mkOpt (listOf str) authorizedKeys "The public keys to apply.";
|
||||||
|
extraConfig = mkOpt str "" "Extra configuration to apply.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
hostKeys = mkDefault [
|
||||||
|
{
|
||||||
|
bits = 4096;
|
||||||
|
path = "/etc/ssh/ssh_host_ed25519_key";
|
||||||
|
type = "ed25519";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
|
ports = [ 22 ];
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
AuthenticationMethods = "publickey";
|
||||||
|
ChallengeResponseAuthentication = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "prohibit-password";
|
||||||
|
PubkeyAuthentication = "yes";
|
||||||
|
StreamLocalBindUnlink = "yes";
|
||||||
|
UseDns = false;
|
||||||
|
UsePAM = true;
|
||||||
|
X11Forwarding = false;
|
||||||
|
|
||||||
|
KexAlgorithms = [
|
||||||
|
"curve25519-sha256"
|
||||||
|
"curve25519-sha256@libssh.org"
|
||||||
|
"diffie-hellman-group16-sha512"
|
||||||
|
"diffie-hellman-group18-sha512"
|
||||||
|
"diffie-hellman-group-exchange-sha256"
|
||||||
|
"sntrup761x25519-sha512@openssh.com"
|
||||||
|
];
|
||||||
|
|
||||||
|
Macs = [
|
||||||
|
"hmac-sha2-512-etm@openssh.com"
|
||||||
|
"hmac-sha2-256-etm@openssh.com"
|
||||||
|
"umac-128-etm@openssh.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
startWhenNeeded = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
startAgent = lib.mkDefault true;
|
||||||
|
inherit (cfg) extraConfig;
|
||||||
|
};
|
||||||
|
|
||||||
|
reichard = {
|
||||||
|
user.extraOptions.openssh.authorizedKeys.keys = cfg.authorizedKeys;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
modules/nixos/services/rke2/default.nix
Normal file
53
modules/nixos/services/rke2/default.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{ config, pkgs, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) types mkIf;
|
||||||
|
inherit (lib.${namespace}) mkOpt mkBoolOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.rke2;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.rke2 = with types; {
|
||||||
|
enable = lib.mkEnableOption "Enable RKE2";
|
||||||
|
disable = mkOpt (listOf str) [ ] "Disable services";
|
||||||
|
openFirewall = mkBoolOpt true "Open firewall";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.rke2 = {
|
||||||
|
enable = true;
|
||||||
|
disable = cfg.disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [
|
||||||
|
# RKE2 Ports - https://docs.rke2.io/install/requirements#networking
|
||||||
|
6443 # Kubernetes API
|
||||||
|
9345 # RKE2 supervisor API
|
||||||
|
2379 # etcd Client Port
|
||||||
|
2380 # etcd Peer Port
|
||||||
|
2381 # etcd Metrics Port
|
||||||
|
10250 # kubelet metrics
|
||||||
|
9099 # Canal CNI health checks
|
||||||
|
|
||||||
|
# MetalLB
|
||||||
|
7946 # memberlist
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ nfs-utils ];
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = mkIf cfg.openFirewall [
|
||||||
|
# RKE2 Ports - https://docs.rke2.io/install/requirements#networking
|
||||||
|
8472 # Canal CNI with VXLAN
|
||||||
|
# 51820 # Canal CNI with WireGuard IPv4 (if using encryption)
|
||||||
|
# 51821 # Canal CNI with WireGuard IPv6 (if using encryption)
|
||||||
|
|
||||||
|
# MetalLB
|
||||||
|
7946 # memberlist
|
||||||
|
];
|
||||||
|
|
||||||
|
# Cloud Init
|
||||||
|
systemd.services.rke2-server = mkIf config.${namespace}.services.cloud-init.enable {
|
||||||
|
after = [ "cloud-final.service" ];
|
||||||
|
requires = [ "cloud-final.service" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
modules/nixos/services/ydotool/default.nix
Normal file
19
modules/nixos/services/ydotool/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.ydotool;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.services.ydotool = {
|
||||||
|
enable = lib.mkEnableOption "ydotool";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
reichard.user.extraGroups = [ "input" ];
|
||||||
|
programs.ydotool = {
|
||||||
|
enable = true;
|
||||||
|
group = "input";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
52
modules/nixos/system/boot/default.nix
Normal file
52
modules/nixos/system/boot/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkDefault;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.system.boot;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.system.boot = {
|
||||||
|
enable = lib.mkEnableOption "Enable Boot";
|
||||||
|
xenGuest = lib.mkEnableOption "Enable Xen Guest";
|
||||||
|
showNotch = lib.mkEnableOption "Show macOS Notch";
|
||||||
|
silentBoot = lib.mkEnableOption "Silent Boot";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.xe-guest-utilities.enable = mkIf cfg.xenGuest true;
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
kernelParams = lib.optionals cfg.silentBoot [
|
||||||
|
"quiet"
|
||||||
|
"loglevel=3"
|
||||||
|
"udev.log_level=3"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"systemd.show_status=auto"
|
||||||
|
"rd.systemd.show_status=auto"
|
||||||
|
"vt.global_cursor_default=0"
|
||||||
|
] ++ lib.optionals cfg.showNotch [
|
||||||
|
"apple_dcp.show_notch=1"
|
||||||
|
];
|
||||||
|
|
||||||
|
loader = {
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 20;
|
||||||
|
editor = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
timeout = mkDefault 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
initrd = mkIf cfg.xenGuest {
|
||||||
|
kernelModules = [ "xen_netfront" "xen_blkfront" ];
|
||||||
|
supportedFilesystems = [ "xenfs" ];
|
||||||
|
};
|
||||||
|
kernelModules = mkIf cfg.xenGuest [ "xen_netfront" "xen_blkfront" "xenfs" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
55
modules/nixos/system/disk/default.nix
Normal file
55
modules/nixos/system/disk/default.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
inherit (lib) mkIf types;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.system.disk;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.system.disk = {
|
||||||
|
enable = lib.mkEnableOption "Disko Configuration";
|
||||||
|
diskPath = mkOpt types.str null "Device path for the main disk";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = cfg.diskPath;
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
swap = {
|
||||||
|
size = "32G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
discardPolicy = "both";
|
||||||
|
resumeDevice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
71
modules/nixos/system/networking/default.nix
Normal file
71
modules/nixos/system/networking/default.nix
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) types mkIf mkForce mkOption mkEnableOption;
|
||||||
|
inherit (lib.${namespace}) mkBoolOpt enabled;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.system.networking;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.system.networking = {
|
||||||
|
enable = mkEnableOption "Enable Networking";
|
||||||
|
enableIWD = mkEnableOption "Enable IWD";
|
||||||
|
useDHCP = mkBoolOpt true "Use DHCP";
|
||||||
|
useNetworkd = mkBoolOpt false "Use networkd";
|
||||||
|
useStatic = mkOption {
|
||||||
|
type = types.nullOr (types.submodule {
|
||||||
|
options = {
|
||||||
|
interface = mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Network interface name";
|
||||||
|
example = "enp0s3";
|
||||||
|
};
|
||||||
|
address = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Static IP address";
|
||||||
|
example = "10.0.20.200";
|
||||||
|
};
|
||||||
|
defaultGateway = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "Default gateway IP";
|
||||||
|
example = "10.0.20.254";
|
||||||
|
};
|
||||||
|
nameservers = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
description = "List of DNS servers";
|
||||||
|
example = [ "10.0.20.254" "8.8.8.8" ];
|
||||||
|
default = [ "8.8.8.8" "8.8.4.4" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
default = null;
|
||||||
|
description = "Static Network Configuration";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mtr
|
||||||
|
tcpdump
|
||||||
|
traceroute
|
||||||
|
];
|
||||||
|
|
||||||
|
reichard.user.extraGroups = [ "network" ];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall = enabled;
|
||||||
|
useDHCP = mkForce (cfg.useDHCP && cfg.useStatic == null);
|
||||||
|
useNetworkd = cfg.useNetworkd;
|
||||||
|
} // (lib.optionalAttrs (cfg.enableIWD) {
|
||||||
|
wireless.iwd = {
|
||||||
|
enable = true;
|
||||||
|
settings.General.EnableNetworkConfiguration = true;
|
||||||
|
};
|
||||||
|
}) // (lib.optionalAttrs (cfg.useStatic != null) {
|
||||||
|
inherit (cfg.useStatic) defaultGateway nameservers;
|
||||||
|
interfaces.${cfg.useStatic.interface}.ipv4.addresses = [{
|
||||||
|
inherit (cfg.useStatic) address;
|
||||||
|
prefixLength = 24;
|
||||||
|
}];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/nixos/system/networking/networkmanager/default.nix
Normal file
27
modules/nixos/system/networking/networkmanager/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.system.networking;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
reichard.user.extraGroups = [ "networkmanager" ];
|
||||||
|
|
||||||
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.backend = mkIf cfg.enableIWD "iwd";
|
||||||
|
|
||||||
|
connectionConfig = {
|
||||||
|
"connection.mdns" = "2";
|
||||||
|
};
|
||||||
|
|
||||||
|
# unmanaged = [
|
||||||
|
# "interface-name:br-*"
|
||||||
|
# "interface-name:rndis*"
|
||||||
|
# ]
|
||||||
|
# ++ lib.optionals config.${namespace}.virtualisation.podman.enable [ "interface-name:docker*" ]
|
||||||
|
# ++ lib.optionals config.${namespace}.virtualisation.kvm.enable [ "interface-name:virbr*" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
30
modules/nixos/user/default.nix
Normal file
30
modules/nixos/user/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) types;
|
||||||
|
inherit (lib.${namespace}) mkOpt;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.user;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.user = with types; {
|
||||||
|
email = mkOpt str "evan@reichard.io" "The email of the user.";
|
||||||
|
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
|
||||||
|
extraOptions = mkOpt attrs { } "Extra options passed to <option>users.users.<name></option>.";
|
||||||
|
fullName = mkOpt str "Evan Reichard" "The full name of the user.";
|
||||||
|
initialPassword = mkOpt str "changeMe2025!" "The initial password to use when the user is first created.";
|
||||||
|
name = mkOpt str "evanreichard" "The name to use for the user account.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
users.users.${cfg.name} = {
|
||||||
|
inherit (cfg) name initialPassword;
|
||||||
|
|
||||||
|
group = "users";
|
||||||
|
home = "/home/${cfg.name}";
|
||||||
|
extraGroups = [ "wheel" ] ++ cfg.extraGroups;
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.bashInteractive;
|
||||||
|
uid = 1000;
|
||||||
|
} // cfg.extraOptions;
|
||||||
|
};
|
||||||
|
}
|
||||||
43
modules/nixos/virtualisation/podman/default.nix
Normal file
43
modules/nixos/virtualisation/podman/default.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{ config, lib, pkgs, namespace, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.virtualisation.podman;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${namespace}.virtualisation.podman = {
|
||||||
|
enable = lib.mkEnableOption "podman";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
podman-compose
|
||||||
|
podman-desktop
|
||||||
|
];
|
||||||
|
|
||||||
|
reichard = {
|
||||||
|
user = {
|
||||||
|
extraGroups = [
|
||||||
|
"docker"
|
||||||
|
"podman"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
podman = {
|
||||||
|
inherit (cfg) enable;
|
||||||
|
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
flags = [ "--all" ];
|
||||||
|
dates = "weekly";
|
||||||
|
};
|
||||||
|
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
dockerSocket.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