add configuration for new nvdia gpu on server config

This commit is contained in:
2025-01-31 22:34:54 +01:00
parent 647ab5ff54
commit ead58c4b1c
2 changed files with 19 additions and 8 deletions

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ # # By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2024/10/17 18:15:24 by tomoron #+# #+# # # Created: 2024/10/17 18:15:24 by tomoron #+# #+# #
# Updated: 2024/11/18 15:13:57 by tomoron ### ########.fr # # Updated: 2025/01/31 22:34:00 by tomoron ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #

View File

@ -13,8 +13,12 @@
networking.hostName = "server"; networking.hostName = "server";
services.openssh.enable = true; services.openssh.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
zfs zfs
nvidia-docker
libnvidia-container
]; ];
boot.supportedFilesystems = [ "zfs" ]; boot.supportedFilesystems = [ "zfs" ];
@ -30,8 +34,15 @@
nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"]; nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"];
hostId = "68290da7"; hostId = "68290da7";
}; };
virtualisation.docker.liveRestore = false; virtualisation.docker = {
virtualisation.docker.enableOnBoot = true; liveRestore = false;
enableOnBoot = true;
# daemon.settings = {
# runtimes.nvidia.path = "${pkgs.nvidia-docker}/bin/nvidia-container-runtime";
# exec-opts = ["native.cgroupdriver=cgroupfs"];
# };
};
services.fail2ban.enable = true; services.fail2ban.enable = true;
services.fail2ban.bantime = "2h"; services.fail2ban.bantime = "2h";
@ -39,12 +50,12 @@
hardware.nvidia-container-toolkit.enable = true; hardware.nvidia-container-toolkit.enable = true;
hardware.nvidia = { hardware.nvidia = {
open = false; open = true;
# prime.nvidiaBusId = "PCI:1:0:0"; prime.nvidiaBusId = "PCI:1:0:0";
# prime.amdgpuBusId = "PCI:13:0:0"; prime.amdgpuBusId = "PCI:13:0:0";
# prime.sync.enable = true; prime.sync.enable = true;
# modesetting.enable = true; modesetting.enable = true;
}; };
} }