Compare commits

...
3 Commits
4 changed files with 36 additions and 5 deletions

No files matched your search

+25 -2
View File
@@ -12,7 +12,7 @@
boot.initrd.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" "ahci" ];
# 2) Also load them again in the running system
boot.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_typoe1" "ahci" ];
boot.kernelModules = [ "vfio" "vfio_pci" "vfio_iommu_type1" "ahci" ];
# 3) Kernel params to turn on IOMMU and bind your card to vfio-pci
boot.kernelParams = lib.mkForce [
@@ -62,12 +62,35 @@
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = true;
open = false; # <--- this must be false for proprietary
nvidiaSettings = true;
nvidiaPersistenced = true;
};
systemd.services.nvidia-idle-reset = {
description = "Reset NVIDIA clocks so idle GPU can enter low-power P8";
wantedBy = [ "multi-user.target" ];
after = [ "nvidia-persistenced.service" "systemd-udev-settle.service" ];
wants = [ "nvidia-persistenced.service" "systemd-udev-settle.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
path = [ config.boot.kernelPackages.nvidiaPackages.stable ];
script = ''
nvidia-smi -pm 1 || true
nvidia-smi --auto-boost-default=0 || true
nvidia-smi -rgc || true
nvidia-smi -rmc || true
'';
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config.nvidia.acceptLicense = true;
}
+2 -1
View File
@@ -15,7 +15,7 @@
}
}
'';
}
};
firewall = {
trustedInterfaces = [ "incusbr2" ];
filterForward = false;
@@ -38,6 +38,7 @@
externalInterface = "incusbr2";
internalInterfaces = [ "incusbr1" ];
internalIPs = [ "10.46.33.0/24" ];
forwardPorts = [ { sourcePort = 41642; proto = "udp"; destination = "10.46.33.216:41642"; } ]; # crusader tailscale
};
};
+4 -1
View File
@@ -5,7 +5,7 @@
{ config, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz";
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-26.05.tar.gz";
in
{
@@ -24,6 +24,7 @@ in
./incus.nix
./drives.nix
./prometheus.nix
#./ollama.nix
#./cron.nix
#./auto-upgrade.nix
];
@@ -35,5 +36,7 @@ in
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
documentation.enable = false;
}
+5 -1
View File
@@ -18,7 +18,11 @@
helix # Very bazed terminal editor
broot # Very bazed terminal file explorer
tcpdump
python3
python312
python312Packages.pip
python312Packages.virtualenv
ffmpeg
];
}