oizys/hosts/mannaz/system.nix

77 lines
2.1 KiB
Nix
Raw Normal View History

2024-01-23 11:51:13 -06:00
{
config,
pkgs,
2024-04-28 09:12:56 -05:00
enabled,
2024-01-23 11:51:13 -06:00
...
2024-05-06 14:32:00 -05:00
}:
{
2024-01-23 11:51:13 -06:00
# Use the systemd-boot EFI boot loader.
boot.loader = {
2024-03-21 11:04:01 -05:00
systemd-boot = enabled;
2024-01-23 11:51:13 -06:00
efi.canTouchEfiVariables = true;
};
# boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
# this device doesn't have enough ram :/
swapDevices = [
{
device = "/var/lib/swapfile";
size = 24 * 1024;
}
];
2024-05-06 14:32:00 -05:00
hardware.opengl = enabled // {
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [ libGL ];
setLdLibraryPath = true;
};
2024-01-23 11:51:13 -06:00
# Load nvidia driver for Xorg and Wayland
2024-05-06 14:32:00 -05:00
services.xserver.videoDrivers = [ "nvidia" ];
2024-01-23 11:51:13 -06:00
hardware.nvidia = {
# Modesetting is required.
2024-03-21 11:04:01 -05:00
modesetting = enabled;
2024-01-23 11:51:13 -06:00
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
2024-05-06 14:32:00 -05:00
powerManagement = enabled // {
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
finegrained = false;
};
2024-01-23 11:51:13 -06:00
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
2024-03-21 11:04:01 -05:00
services.openssh = enabled;
2024-01-23 11:51:13 -06:00
# networking.wireless.enable = true;
# networking.networkmanager.enable = true;
networking.firewall.allowedTCPPorts = [
7865
7860
];
security.sudo.wheelNeedsPassword = false;
2024-03-21 11:04:01 -05:00
# don't delete this you foo bar
2024-01-23 11:51:13 -06:00
system.stateVersion = "23.11"; # Did you read the comment?
}