dotfiles/config/nixos/hardware/mennos-server.nix
Menno van Leeuwen 2c0e3c746b
All checks were successful
Nix Format Check / check-format (push) Successful in 38s
upgrade to 24.11
2024-11-29 18:02:30 +01:00

51 lines
1.1 KiB
Nix

{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
/etc/nixos/hardware-configuration.nix
./mennos-server/zfs.nix
];
networking.hostName = "mennos-server";
networking.hostId = "64519940";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
# Enable OpenGL
hardware.graphics.enable = true;
# nvtop, a system monitor for GPUs
environment.systemPackages = with pkgs; [ nvtopPackages.nvidia ];
# Enable NVIDIA Docker support
# test with: $ docker run --rm -it --device=nvidia.com/gpu=all ubuntu:latest nvidia-smi
hardware.nvidia-container-toolkit.enable = true;
virtualisation.docker = {
enable = true;
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
# Use the latest driver from the unstable channel
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}