dotfiles/config/nixos/hardware/mennos-server.nix
Menno van Leeuwen 76e9cb0371
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
adds swap to all devices
adds noatime to all devices root partition mount options
adds cosmic desktop to workstations
adds xanmod kernel to workstations
adds xanmod with zfs to servers
adds perplexityai extension to brave
removes openra flatpak
adds threads limit to upgrade command to prevent system freezes
removes fcitx5 completely
2024-12-11 14:51:35 +01:00

65 lines
1.4 KiB
Nix

{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
/etc/nixos/hardware-configuration.nix
./mennos-server/zfs.nix
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/dd3fa13c-a1bd-4dc9-bcb4-aee17c7f12d1";
fsType = "ext4";
options = [ "noatime" ];
};
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 graphics
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;
};
# Swap file (Laptop has 64GB of RAM so 16GB swap should be enough)
swapDevices = [
{
device = "/swapfile";
size = 16384;
}
];
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;
};
}