Compare commits

...

17 Commits

Author SHA1 Message Date
9b08d81ab0 Merge branch 'master' of 192.168.1.126:TheCrazyInsanity/nixos-configv3 2026-05-21 21:18:09 -04:00
a3df8a8162 glorpshit 2026-05-21 21:16:51 -04:00
TheCrazyInsanity
48dc241b0b fix podman no build other computer monkey brain big 2026-05-10 21:41:48 -04:00
TheCrazyInsanity
7b70909a16 Merge branch 'master' of https://gitea.thecrazyinsanity.win/thecrazyinsanity/nixos-configv3 2026-05-08 15:51:16 -04:00
TheCrazyInsanity
ff07a0a8c6 gyatt 2026-05-08 15:51:13 -04:00
05aac965f1 Merge branch 'master' of 192.168.1.126:TheCrazyInsanity/nixos-configv3 2026-05-08 15:48:26 -04:00
a4f23b64d3 idkvro 2026-05-08 15:48:23 -04:00
TheCrazyInsanity
268a06af61 loses it mildly 2026-05-08 12:42:44 -04:00
TheCrazyInsanity
fbbef69fa1 fuck 2026-05-08 12:41:49 -04:00
TheCrazyInsanity
998200233c Merge branch 'master' of https://gitea.thecrazyinsanity.win/thecrazyinsanity/nixos-configv3 2026-05-01 07:44:42 -04:00
TheCrazyInsanity
34aab3550d screenshit 2026-05-01 07:44:04 -04:00
c9478fa513 add nvenc-compress package 2026-04-27 17:37:09 -04:00
4acde426e9 kirk 2026-04-27 17:23:21 -04:00
40a288f413 Merge branch 'master' of 192.168.1.126:TheCrazyInsanity/nixos-configv3 2026-04-19 18:27:17 -04:00
2e09c668e5 bullshiiit 2026-04-19 18:27:15 -04:00
TheCrazyInsanity
43020e5b51 random bg (ty gemini) 2026-04-15 12:40:34 -04:00
TheCrazyInsanity
0b3b7c1822 i dont rember 2026-04-14 12:36:59 -04:00
13 changed files with 309 additions and 78 deletions

77
flake.lock generated
View File

@@ -12,11 +12,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771437256, "lastModified": 1776249299,
"narHash": "sha256-bLqwib+rtyBRRVBWhMuBXPCL/OThfokA+j6+uH7jDGU=", "narHash": "sha256-Dt9t1TGRmJFc0xVYhttNBD6QsAgHOHCArqGa0AyjrJY=",
"owner": "numtide", "owner": "numtide",
"repo": "blueprint", "repo": "blueprint",
"rev": "06ee7190dc2620ea98af9eb225aa9627b68b0e33", "rev": "56131e8628f173d24a27f6d27c0215eff57e40dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -31,7 +31,6 @@
"llm-agents", "llm-agents",
"flake-parts" "flake-parts"
], ],
"import-tree": "import-tree",
"nixpkgs": [ "nixpkgs": [
"llm-agents", "llm-agents",
"nixpkgs" "nixpkgs"
@@ -46,15 +45,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770895533, "lastModified": 1777369708,
"narHash": "sha256-v3QaK9ugy9bN9RXDnjw0i2OifKmz2NnKM82agtqm/UY=", "narHash": "sha256-1xW7cRZNsFNPQD+cE0fwnLVStnDth0HSoASEIFeT7uI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "bun2nix", "repo": "bun2nix",
"rev": "c843f477b15f51151f8c6bcc886954699440a6e1", "rev": "e659e1cc4b8e1b21d0aa85f1c481f9db61ecfa98",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "staging-2.1.0",
"repo": "bun2nix", "repo": "bun2nix",
"type": "github" "type": "github"
} }
@@ -67,11 +67,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775087534, "lastModified": 1777988971,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=", "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b", "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -90,11 +90,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773656868, "lastModified": 1777767341,
"narHash": "sha256-IvWd8A3MM2qASf2U5diOoYEc2dCxqR4BOhB5RuOQnZM=", "narHash": "sha256-lV2i2hBWxUKU2dgHza9SGfizOsV+uUcTQD/De+6/X3M=",
"owner": "glide-browser", "owner": "glide-browser",
"repo": "glide.nix", "repo": "glide.nix",
"rev": "1a3dd001865f6ac5a3562d2cb484388672ad6eaf", "rev": "790c9d37e3dcf9bb04ae4486a0320b999a8eec32",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -110,11 +110,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775143651, "lastModified": 1778248595,
"narHash": "sha256-S0RqAyDPMTcv9vASMaE8eY1QexFysAOdnxUxFHIPOyE=", "narHash": "sha256-dhFgEjoeJMYN/7OY6xfxS799YB4IjbbYXTjyGIJyLpc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d166a078541982a76f14d3e06e9665fa5c9ed85e", "rev": "fdb2ccba9d5e1238d32e0c4a3ec1a277efa80c1d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -164,21 +164,6 @@
"type": "github" "type": "github"
} }
}, },
"import-tree": {
"locked": {
"lastModified": 1763762820,
"narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=",
"owner": "vic",
"repo": "import-tree",
"rev": "3c23749d8013ec6daa1d7255057590e9ca726646",
"type": "github"
},
"original": {
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"llm-agents": { "llm-agents": {
"inputs": { "inputs": {
"blueprint": "blueprint", "blueprint": "blueprint",
@@ -189,11 +174,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1775136683, "lastModified": 1778247177,
"narHash": "sha256-UWC+DqtcUiFxGS4Kc4AX5VNfKSKbUuZaFAVnPxcbZdM=", "narHash": "sha256-ZSe9r9xbx72NnBCCiC1UZxmIFzFA9IPno10Esp1kjiE=",
"owner": "Qumulo", "owner": "Qumulo",
"repo": "llm-agents", "repo": "llm-agents",
"rev": "fd7a138b9649ec7868da78eb7a0db1fd7bd8bb37", "rev": "02444d83933d3ca28c9fd5d0be28812bdcf1232e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -220,11 +205,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1775064974, "lastModified": 1778124196,
"narHash": "sha256-fp7+8MzxHrIixIIVvyORI2XpqpQnxf8NodmEHy8rczg=", "narHash": "sha256-pYEytCNic/czazbV9r3tbQ6BZzqRBg/41x2dIC5ymOo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6ebfbc38bdc6b22822a6f991f2d922306f33cfbc", "rev": "68a8af93ff4297686cb68880845e61e5e2e41d92",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -236,11 +221,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1775036866, "lastModified": 1777954456,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -260,11 +245,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1774915545, "lastModified": 1775856943,
"narHash": "sha256-COT4l/+ZddGBvrDVfPf7MEOJxV8EDKame6/aRnNIKcY=", "narHash": "sha256-b7Mp7P+q2Md5AGt4rjHfMcBykzMumFTen10ST++AuTU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "f3177b3c69fb3f03201098d7fe8ab6422cce7fc1", "rev": "a524a6160e6df89f7673ba293cf7d78b559eb1a5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -306,11 +291,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773297127, "lastModified": 1775636079,
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=", "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016", "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -16,6 +16,9 @@
nix-fast-build nix-fast-build
colmena colmena
; ;
openldap = prev.openldap.overrideAttrs {
doCheck = !prev.stdenv.hostPlatform.isi686;
};
}) })
]; ];
nix.package = pkgs.lixPackageSets.stable.lix; nix.package = pkgs.lixPackageSets.stable.lix;
@@ -32,13 +35,13 @@
blasSupport = true; blasSupport = true;
}).overrideAttrs }).overrideAttrs
(oldAttrs: rec { (oldAttrs: rec {
version = "8683"; version = "8940";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "ggml-org"; owner = "ggml-org";
repo = "llama.cpp"; repo = "llama.cpp";
tag = "b${version}"; tag = "b${version}";
# rev = "6ebf2e0d00d31acfc1a1fa9662e9a7d38bd07bf7"; # https://github.com/ggml-org/llama.cpp/pull/19970 # rev = "6ebf2e0d00d31acfc1a1fa9662e9a7d38bd07bf7"; # https://github.com/ggml-org/llama.cpp/pull/19970
hash = "sha256-cehplQ4utj8h3zpUqjsXmNiW2g+YylcNbvaRYVRP2/U="; hash = "sha256-JlJeNO7eID6JvxZMkck136mC/Rvd5v8320tAuQabzhU=";
leaveDotGit = true; leaveDotGit = true;
postFetch = '' postFetch = ''
git -C "$out" rev-parse --short HEAD > $out/COMMIT git -C "$out" rev-parse --short HEAD > $out/COMMIT
@@ -46,7 +49,7 @@
''; '';
}; };
# Must update npm deps hash to match the new version's webui dependencies # Must update npm deps hash to match the new version's webui dependencies
npmDepsHash = "sha256-DxgUDVr+kwtW55C4b89Pl+j3u2ILmACcQOvOBjKWAKQ="; npmDepsHash = "sha256-RAFtsbBGBjteCt5yXhrmHL39rIDJMCFBETgzId2eRRk=";
# Enable native CPU optimizations for massively better CPU performance # Enable native CPU optimizations for massively better CPU performance
# This enables AVX, AVX2, AVX-512, FMA, etc. for your specific CPU # This enables AVX, AVX2, AVX-512, FMA, etc. for your specific CPU
# NOTE: This is intentionally opposite of nixpkgs (which uses -DGGML_NATIVE=off # NOTE: This is intentionally opposite of nixpkgs (which uses -DGGML_NATIVE=off
@@ -101,7 +104,6 @@
} -C $out/bin } -C $out/bin
chmod +x $out/bin/llama-swap chmod +x $out/bin/llama-swap
''; '';
}; };
# 🇺🇸 # 🇺🇸
@@ -232,6 +234,13 @@
jq jq
nasctui nasctui
trilium-desktop trilium-desktop
haruna
(pkgs.runCommand "nvenc-compress" { nativeBuildInputs = [ pkgs.bash ]; }
''
mkdir -p $out/bin
cp ${./nvenc_compress.sh} $out/bin/nvenc-compress
chmod +x $out/bin/nvenc-compress
'')
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [

87
global/nvenc_compress.sh Executable file
View File

@@ -0,0 +1,87 @@
#!/usr/bin/env bash
set -euo pipefail
# Usage: nvenc_compress.sh <video_path> [target_size_mb]
VIDEO="$1"
TARGET_MB="${2:-9}"
TARGET_BYTES=$((TARGET_MB * 1024 * 1024))
if [[ ! -f "$VIDEO" ]]; then
echo "Error: file not found: $VIDEO"
exit 1
fi
BASENAME="${VIDEO##*/}"
BASENAME="${BASENAME%.*}"
OUTDIR="$(dirname "$VIDEO")"
OUTFILE="$OUTDIR/${BASENAME}_compressed.mp4"
# nvenc cq range: 0 (best/largest) to 51 (worst/smallest)
# We binary search this range to hit the target file size
LO=0
HI=51
BEST_DIFF=999999999
BEST_CQ=23
MAX_ITERATIONS=20
echo "Target size: ${TARGET_MB}MB (${TARGET_BYTES} bytes)"
echo "Encoding with nvenc (h264_nvenc)..."
echo ""
for ((i=0; i<MAX_ITERATIONS; i++)); do
CQ=$(( (LO + HI) / 2 ))
TMPFILE="${OUTFILE}_iter_${i}_cq${CQ}.mp4"
echo "--- Iteration $((i+1))/$MAX_ITERATIONS ---"
echo "Trying cq=$CQ (lo=$LO, hi=$HI)"
ffmpeg -y -i "$VIDEO" -c:v h264_nvenc -cq "$CQ" -c:a copy -preset p7 -f mp4 "$TMPFILE" 2>/dev/null
if [[ ! -f "$TMPFILE" ]]; then
echo "Error: ffmpeg failed at cq=$CQ"
rm -f "$TMPFILE"
break
fi
FILE_SIZE=$(stat -c%s "$TMPFILE" 2>/dev/null || stat -f%z "$TMPFILE" 2>/dev/null)
DIFF=$(( FILE_SIZE - TARGET_BYTES ))
ABS_DIFF=${DIFF#-}
echo " Size: $(( FILE_SIZE / 1024 / 1024 ))MB (diff: $(( DIFF / 1024 / 1024 ))MB)"
if (( ABS_DIFF < BEST_DIFF )); then
BEST_DIFF=$ABS_DIFF
BEST_CQ=$CQ
cp "$TMPFILE" "$OUTFILE"
fi
rm -f "$TMPFILE"
# If within 1% of target, we're close enough
if (( ABS_DIFF < TARGET_BYTES / 100 )); then
echo ""
echo "Within tolerance! Stopping."
break
fi
# Binary search direction:
# Higher cq = smaller file, lower cq = larger file
if (( FILE_SIZE > TARGET_BYTES )); then
# File too big, need higher cq (smaller)
LO=$(( CQ + 1 ))
else
# File too small, need lower cq (larger)
HI=$(( CQ - 1 ))
fi
if (( LO > HI )); then
echo ""
echo "Range exhausted. Stopping."
break
fi
done
echo ""
echo "Done! Best cq=$BEST_CQ, final size: $(( BEST_DIFF / 1024 / 1024 ))MB from target"
echo "Output: $OUTFILE"

View File

@@ -32,6 +32,8 @@
# Configure network connections interactively with nmcli or nmtui. # Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
virtualization.podman.enableNvidia = true;
# Only computer I own that can actually run ollama, and I don't want to make an ai folder. # Only computer I own that can actually run ollama, and I don't want to make an ai folder.
# services.ollama = { # services.ollama = {
# enable = true; # enable = true;
@@ -48,6 +50,8 @@
pkgs.opencode pkgs.opencode
pkgs.llama-cpp pkgs.llama-cpp
pkgs.llama-swap pkgs.llama-swap
# pkgs.agent-browser
pkgs.nvidia-container-toolkit
inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.pi inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.pi
inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.rtk inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.rtk
@@ -90,6 +94,12 @@
# As long as this is here the models are declarative. llama-server will grab them if not downloaded already. # As long as this is here the models are declarative. llama-server will grab them if not downloaded already.
environment.etc."llama-swap/config.yaml".text = '' environment.etc."llama-swap/config.yaml".text = ''
models: models:
"Qwen3.6-35B-A3B-GGUF":
cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_S --ctx-size 128000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -np 1 --fit-target 256 --ubatch-size 1024 -fa on --slots --slot-save-path /home/laythe/llamapcache --jinja -kvu --no-mmproj --swa-checkpoints 32 --chat-template-kwargs '{\"preserve_thinking\": true}'"
ttl: 2400
"Qwen3.6-35B-A3B-FLASH":
cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q3_K_M --ctx-size 128000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -np 1 --fit-target 256 --ubatch-size 1024 -fa on --slots --slot-save-path /home/laythe/llamapcache --jinja -kvu --no-mmproj --swa-checkpoints 32 --chat-template-kwargs '{\"preserve_thinking\": true}'"
ttl: 2400
"Qwen3.5-35B-A3B-GGUF": "Qwen3.5-35B-A3B-GGUF":
cmd: llama-server --port ''${PORT} -hf mudler/Qwen3.5-35B-A3B-APEX-GGUF:Mini --ctx-size 128000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -np 1 --fit-target 256 --ubatch-size 1024 -fa on --slots --slot-save-path /home/laythe/llamapcache --jinja -kvu --no-mmproj --swa-checkpoints 32 --no-kv-offload cmd: llama-server --port ''${PORT} -hf mudler/Qwen3.5-35B-A3B-APEX-GGUF:Mini --ctx-size 128000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -np 1 --fit-target 256 --ubatch-size 1024 -fa on --slots --slot-save-path /home/laythe/llamapcache --jinja -kvu --no-mmproj --swa-checkpoints 32 --no-kv-offload
ttl: 2400 ttl: 2400
@@ -105,20 +115,14 @@
"Qwen3-4B-Claude-Opus-Distill": "Qwen3-4B-Claude-Opus-Distill":
cmd: llama-server --port ''${PORT} -hf TeichAI/Qwen3-4B-Thinking-2507-Claude-4.5-Opus-High-Reasoning-Distill-GGUF:Q4_K_M --ctx-size 32768 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256 cmd: llama-server --port ''${PORT} -hf TeichAI/Qwen3-4B-Thinking-2507-Claude-4.5-Opus-High-Reasoning-Distill-GGUF:Q4_K_M --ctx-size 32768 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256
ttl: 300 ttl: 300
"Qwen3.5-9B-Thinking": "Qwen3.5-9B":
cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M --ctx-size 128000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256 --chat-template-kwargs '{\"enable_thinking\": true}' --no-mmproj --no-kv-offload" cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M --ctx-size 64000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256"
ttl: 300 ttl: 300
"Qwen3.5-9B-Claude-Opus-Distill": "Qwen3.5-9B-Claude-Opus-Distill":
cmd: "llama-server --port ''${PORT} -hf Jackrong/Qwen3.5-9B-Claude-4.6-Opus-Reasoning-Distilled-GGUF:Q4_K_S --ctx-size 32000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 512 --chat-template-kwargs '{\"enable_thinking\": true}' --no-mmproj" cmd: "llama-server --port ''${PORT} -hf Jackrong/Qwen3.5-9B-Claude-4.6-Opus-Reasoning-Distilled-GGUF:Q4_K_S --ctx-size 32000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 512 --chat-template-kwargs '{\"enable_thinking\": true}' --no-mmproj"
ttl: 300 ttl: 300
"Qwen3.5-4B-Thinking": "Qwen3.5-4B":
cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M --ctx-size 64000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256 --chat-template-kwargs '{\"enable_thinking\": true}'" cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M --ctx-size 64000 --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256"
ttl: 300
"Qwen3.5-9B-Non-Thinking":
cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.5-9B-GGUF:Q4_K_M --ctx-size 32000 --temp 0.7 --top-p 0.8 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256 --no-mmproj"
ttl: 300
"Qwen3.5-4B-Non-Thinking":
cmd: "llama-server --port ''${PORT} -hf unsloth/Qwen3.5-4B-GGUF:Q4_K_M --ctx-size 64000 --temp 0.7 --top-p 0.8 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256"
ttl: 300 ttl: 300
"Gemma4-E4B": "Gemma4-E4B":
cmd: "llama-server --port ''${PORT} -hf Abhiray/gemma-4-E4B-it-heretic-GGUF:Q4_K_M --ctx-size 64000 --temp 0.7 --top-p 0.8 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256" cmd: "llama-server --port ''${PORT} -hf Abhiray/gemma-4-E4B-it-heretic-GGUF:Q4_K_M --ctx-size 64000 --temp 0.7 --top-p 0.8 --top-k 20 --min-p 0.00 -fa on --jinja -kvu -np 1 --fit-target 256"

View File

@@ -93,10 +93,10 @@
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable;
}; };
nix.settings = { # nix.settings = {
substituters = [ "https://cache.nixos-cuda.org" ]; # substituters = [ "https://cache.nixos-cuda.org" ];
trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ]; # trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ];
}; # };
system.stateVersion = "24.11"; # No touchy system.stateVersion = "24.11"; # No touchy
} }

View File

@@ -1,4 +1,11 @@
{config, pkgs, lib, inputs, outputs, ...}: {
config,
pkgs,
lib,
inputs,
outputs,
...
}:
{ {
# These both are probably always going to be the same, but I'll keep them local just in case:tm: # These both are probably always going to be the same, but I'll keep them local just in case:tm:
home.username = "laythe"; home.username = "laythe";
@@ -11,4 +18,6 @@
home.stateVersion = "24.11"; home.stateVersion = "24.11";
programs.home-manager.enable = true; programs.home-manager.enable = true;
fonts.fontconfig.subpixelRendering = "none";
} }

View File

@@ -6,6 +6,7 @@
config, config,
lib, lib,
pkgs, pkgs,
inputs,
... ...
}: }:
{ {
@@ -87,9 +88,9 @@
# List packages installed in system profile. # List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options). # You can use https://search.nixos.org/ to find more packages (and options).
#environment.systemPackages = with pkgs; [ environment.systemPackages = [
# cura-appimage # I want cura but not kicad so i dont pull in fabrication inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.pi
# ]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.

View File

@@ -63,7 +63,7 @@
# Define time delay for hibernation # Define time delay for hibernation
systemd.sleep.settings.Sleep = { systemd.sleep.settings.Sleep = {
HibernateDelaySec = 900; HibernateDelaySec = 300;
}; };
# facial recognition # facial recognition

View File

@@ -17,7 +17,6 @@
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies.ExtensionSettings = { policies.ExtensionSettings = {
"*".installation_mode = "blocked"; # blocks all addons except the ones specified below
# uBlock Origin: # uBlock Origin:
"uBlock0@raymondhill.net" = { "uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";

View File

@@ -52,7 +52,6 @@ in
pkgs.wmenu pkgs.wmenu
pkgs.wl-clipboard pkgs.wl-clipboard
pkgs.mako pkgs.mako
pkgs.kdePackages.spectacle
pkgs.kdePackages.kate pkgs.kdePackages.kate
pkgs.kdePackages.filelight pkgs.kdePackages.filelight
inputs.glide.packages.${pkgs.stdenv.hostPlatform.system}.default inputs.glide.packages.${pkgs.stdenv.hostPlatform.system}.default
@@ -60,7 +59,9 @@ in
pkgs.pulseaudioFull pkgs.pulseaudioFull
pkgs.waybar pkgs.waybar
pkgs.dracula-theme # gtk theme pkgs.dracula-theme # gtk theme
pkgs.brightnessctl
configure-gtk configure-gtk
pkgs.mpvpaper
]; ];
}; };

View File

@@ -9,8 +9,8 @@
terminal = "foot"; terminal = "foot";
keybindings = { keybindings = {
# Brightness Controls # Brightness Controls
"XF86MonBrightnessDown" = "exec light -U 10"; "XF86MonBrightnessDown" = "exec brightnessctl s 5%-";
"XF86MonBrightnessUp" = "exec light -A 10"; "XF86MonBrightnessUp" = "exec brightnessctl s 5%+";
# Volume Controls # Volume Controls
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%"; "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
@@ -85,6 +85,7 @@
"Mod4+j" = "[class=\"Jami\"] scratchpad show, resize set 90 ppt 90 ppt, move position center"; "Mod4+j" = "[class=\"Jami\"] scratchpad show, resize set 90 ppt 90 ppt, move position center";
"Print" = "exec flameshot gui";
}; };
bars = [ bars = [
{ {
@@ -114,7 +115,7 @@
}; };
}; };
startup = [ startup = [
{ command = "swaybg -i ~/.background-image -m fill"; } # { command = "swaybg -i ~/.background-image -m fill"; }
{ command = "discord --enable-features=UseOzonePlatform --ozone-platform=wayland"; } { command = "discord --enable-features=UseOzonePlatform --ozone-platform=wayland"; }
{ command = "trilium"; } { command = "trilium"; }
{ command = "jami"; } { command = "jami"; }
@@ -142,6 +143,102 @@
}; };
}; };
systemd.user.services.random-background = {
Unit = {
Description = "Universal Wallpaper Rotator (Images, GIFs, Videos)";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
Restart = "on-failure";
RestartSec = 5;
ExecStart = "${pkgs.writeShellScript "wallpaper-rotator" ''
WALLPAPER_DIR="$HOME/wallpapers"
INTERVAL=60 # Time in seconds between wallpaper changes (600 = 10 mins)
# 1. Safely find Wayland and Sway sockets
if [ -z "$WAYLAND_DISPLAY" ]; then
shopt -s nullglob
W_SOCKETS=("$XDG_RUNTIME_DIR"/wayland-[0-9]*)
if [ ''${#W_SOCKETS[@]} -gt 0 ]; then
export WAYLAND_DISPLAY=$(basename "''${W_SOCKETS[0]}")
fi
fi
if [ -z "$SWAYSOCK" ]; then
shopt -s nullglob
S_SOCKETS=("$XDG_RUNTIME_DIR"/sway-ipc.*.sock)
if [ ''${#S_SOCKETS[@]} -gt 0 ]; then
export SWAYSOCK="''${S_SOCKETS[0]}"
fi
fi
# State tracking for mpvpaper
MPV_PID=""
# Clean up mpvpaper gracefully if systemd stops the service
cleanup() {
if [ -n "$MPV_PID" ]; then
kill $MPV_PID 2>/dev/null || true
fi
exit 0
}
trap cleanup SIGINT SIGTERM
# 2. Infinite rotation loop
while true; do
if [ ! -d "$WALLPAPER_DIR" ]; then
echo "Wallpaper directory not found. Waiting..."
${pkgs.coreutils}/bin/sleep 60
continue
fi
# Find images, gifs, and videos
MEDIA=$(${pkgs.findutils}/bin/find "$WALLPAPER_DIR" -type f \( \
-iname \*.jpg -o -iname \*.jpeg -o -iname \*.png -o \
-iname \*.mp4 -o -iname \*.webm -o -iname \*.mkv -o -iname \*.gif \
\) 2>/dev/null | ${pkgs.coreutils}/bin/shuf -n 1 || true)
if [ -n "$MEDIA" ]; then
echo "Selected: $MEDIA"
EXT="''${MEDIA##*.}"
EXT=$(echo "$EXT" | tr '[:upper:]' '[:lower:]') # Convert to lowercase
# If it's a static image, use Sway directly (saves battery/RAM)
if [[ "$EXT" == "jpg" || "$EXT" == "jpeg" || "$EXT" == "png" ]]; then
if [ -n "$MPV_PID" ]; then
kill $MPV_PID 2>/dev/null || true
MPV_PID=""
fi
${pkgs.sway}/bin/swaymsg output "*" bg "$MEDIA" fill
# If it's a video/gif, use mpvpaper
else
if [ -n "$MPV_PID" ]; then
kill $MPV_PID 2>/dev/null || true
fi
# Start mpvpaper in the background and record its process ID
${pkgs.mpvpaper}/bin/mpvpaper -o "loop no-audio" "*" "$MEDIA" &
MPV_PID=$!
fi
else
echo "No media found in $WALLPAPER_DIR."
fi
# Wait for the next rotation
${pkgs.coreutils}/bin/sleep $INTERVAL
done
''}";
};
};
programs.waybar = { programs.waybar = {
enable = true; enable = true;
style = ./waybar.css; style = ./waybar.css;
@@ -189,7 +286,8 @@
}; };
clock = { clock = {
format = "{:%Y-%m-%d %H:%M}"; "format" = "{:%I:%M %p}";
"format-alt" = "{:%d-%m-%Y}";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
}; };
battery = { battery = {
@@ -216,4 +314,41 @@
"before-sleep" = "${pkgs.swaylock}/bin/swaylock -fF"; "before-sleep" = "${pkgs.swaylock}/bin/swaylock -fF";
}; };
services.swayidle.enable = true; services.swayidle.enable = true;
# Configure Qt to use kvantum theming
qt = {
enable = true;
platformTheme.name = "org.kde.breezedark.desktop";
style = {
name = "org.kde.breezedark.desktop";
};
};
services.flameshot = {
# Also installs/enables flameshot
enable = true;
settings = {
General = {
useGrimAdapter = true;
# Stops warnings for using Grim
disabledGrimWarning = true;
uiColor = "#00ff73";
contrastUiColor = "#002f01";
drawColor = "#ff0000";
};
};
};
# Install packages for better Qt support and kvantum themes
home.packages = with pkgs; [
kdePackages.breeze
];
# Environment variables for kvantum theming
home.sessionVariables = {
QT_QPA_PLATFORMTHEME = "org.kde.breezedark.desktop";
QT_STYLE_OVERRIDE = "org.kde.breezedark.desktop";
GTK_THEME = "Materia-dark-compact";
};
} }

View File

@@ -14,5 +14,6 @@
virtualisation.podman = { virtualisation.podman = {
enable = true; enable = true;
dockerCompat = true; dockerCompat = true;
# enableNvidia = true;
}; };
} }