2024-05-07 13:37:09 -07:00
|
|
|
{
|
2025-04-30 19:29:00 -07:00
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
2024-05-07 13:37:09 -07:00
|
|
|
}: {
|
2025-04-30 19:29:00 -07:00
|
|
|
environment.systemPackages = with pkgs; [
|
2025-11-02 14:11:40 -08:00
|
|
|
# nvtopPackages.nvidia
|
2025-04-30 19:29:00 -07:00
|
|
|
# egl-wayland
|
|
|
|
|
# gpt4all-chat
|
2025-11-16 21:06:42 -08:00
|
|
|
nvidia-vaapi-driver
|
2025-04-30 19:29:00 -07:00
|
|
|
# foldingathome
|
|
|
|
|
# gwe
|
|
|
|
|
# openrgb
|
2025-05-12 00:46:29 -07:00
|
|
|
openrgb-plugin-effects
|
|
|
|
|
openrgb-plugin-hardwaresync
|
2025-04-30 19:29:00 -07:00
|
|
|
];
|
2024-01-22 10:40:07 -08:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
environment.sessionVariables = {
|
|
|
|
|
# wayland chromium workaround
|
|
|
|
|
NIXOS_OZONE_WL = "1";
|
2024-03-18 14:50:43 -07:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
# firefox nvidia-vaapi-driver
|
2025-11-16 21:06:42 -08:00
|
|
|
MOZ_DISABLE_RDD_SANDBOX = "1";
|
|
|
|
|
LIBVA_DRIVER_NAME = "nvidia";
|
2025-04-30 19:29:00 -07:00
|
|
|
};
|
2024-02-24 02:50:02 -08:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
hardware.nvidia = {
|
|
|
|
|
powerManagement.enable = true;
|
|
|
|
|
open = true;
|
2025-12-10 17:11:28 -08:00
|
|
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
2025-04-30 19:29:00 -07:00
|
|
|
};
|
2025-11-10 06:24:22 -08:00
|
|
|
services.tailscale.useRoutingFeatures = "both";
|
|
|
|
|
boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
|
|
|
|
|
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = "1";
|
|
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
systemd.services.nvpl = {
|
|
|
|
|
description = "Increase GPU power limit to 400w";
|
|
|
|
|
script = "/run/current-system/sw/bin/nvidia-smi -pl=400";
|
|
|
|
|
wantedBy = ["multi-user.target"];
|
|
|
|
|
};
|
2025-10-08 18:29:19 -07:00
|
|
|
services.lact.enable = true;
|
2023-07-23 19:27:43 -07:00
|
|
|
|
2025-11-10 06:24:22 -08:00
|
|
|
services.syncplay = {
|
|
|
|
|
enable = true;
|
|
|
|
|
motd = "we only watch kino here";
|
|
|
|
|
};
|
|
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
services.udev.extraRules = ''
|
2025-11-10 06:24:22 -08:00
|
|
|
# pcpanel
|
2025-04-30 19:29:00 -07:00
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a3c5", MODE="0666"
|
|
|
|
|
'';
|
2025-10-16 16:44:43 -07:00
|
|
|
services.hardware.openrgb = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = pkgs.openrgb-with-all-plugins;
|
|
|
|
|
};
|
2024-03-18 14:50:43 -07:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
# boot.kernelPackages = pkgs.linuxPackages_zen;
|
|
|
|
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
|
|
|
|
boot.kernelModules = ["i2c-dev" "kvm-amd" "nct6775"];
|
|
|
|
|
boot.kernelParams = ["nvidia-drm.modeset=1"];
|
2025-11-05 03:00:09 -08:00
|
|
|
# boot.initrd.kernelModules = ["nvidia"];
|
|
|
|
|
# boot.extraModulePackages = [config.boot.kernelPackages.nvidia_x11];
|
2024-04-05 14:18:27 -07:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
fileSystems."/home" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = ["subvol=home_snaps/0/snapshot" "noatime" "compress-force=zstd:3" "discard=async"];
|
|
|
|
|
};
|
|
|
|
|
fileSystems."/home/.snapshots" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = ["subvol=home_snaps/" "noatime" "compress-force=zstd:3" "discard=async"];
|
|
|
|
|
};
|
|
|
|
|
fileSystems."/home/tao/games" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = ["subvol=games" "nosuid" "nodev" "noatime" "compress-force=zstd:3" "users" "rw" "exec" "discard=async"];
|
|
|
|
|
};
|
|
|
|
|
fileSystems."/boot" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/2B28-151D";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
fileSystems."/" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = ["subvol=nixos" "noatime" "compress-force=zstd:3" "discard=async"];
|
|
|
|
|
};
|
|
|
|
|
fileSystems."/var" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = ["subvol=nixos/var" "noatime" "compress-force=zstd:3" "discard=async"];
|
|
|
|
|
};
|
|
|
|
|
fileSystems."/tmp" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/eb9fcce2-e9f3-438a-b5ce-8f72f32f0e09";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = ["subvol=nixos/tmp" "discard=async"];
|
|
|
|
|
};
|
|
|
|
|
swapDevices = [{device = "/dev/disk/by-uuid/ca0ed3d7-8758-4ac7-b016-8b4cd9608ded";}];
|
2023-07-11 01:32:48 -07:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
# windows can suck my ass
|
|
|
|
|
time.hardwareClockInLocalTime = true;
|
2024-03-03 22:23:33 -08:00
|
|
|
|
2025-04-30 19:29:00 -07:00
|
|
|
networking.hostName = "NOcomputer";
|
2023-07-11 00:38:39 -07:00
|
|
|
}
|