Configured docker with nvidia passhrough

This commit is contained in:
2024-01-03 09:55:25 -04:00
parent fb3c4b3351
commit dbf176c903
6 changed files with 31 additions and 1 deletions

View File

@@ -17,6 +17,8 @@ in {
# Import system configuration
../../modules/system.nix
../../modules/containers.nix
../../modules/virtualization.nix
../../modules/harden.nix
../../modules/kde.nix
];

View File

@@ -19,6 +19,8 @@ in {
# Import system configuration
../../modules/system.nix
../../modules/containers-nvidia.nix
../../modules/virtualization.nix
../../modules/harden.nix
../../modules/kde.nix
];
@@ -68,4 +70,11 @@ in {
# Setup bluetooth
hardware.bluetooth.enable = true;
# Add OpenGl support
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
}

View File

@@ -0,0 +1,7 @@
{...}: {
virtualisation.docker = {
enable = true;
storageDriver = "btrfs";
enableNvidia = true;
};
}

6
modules/containers.nix Normal file
View File

@@ -0,0 +1,6 @@
{...}: {
virtualisation.docker = {
enable = true;
storageDriver = "btrfs";
};
}

View File

@@ -35,7 +35,7 @@
users.users.panotaka = {
isNormalUser = true;
description = "panotaka";
extraGroups = ["networkmanager" "wheel"];
extraGroups = ["networkmanager" "wheel" "libvirtd"];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
];

View File

@@ -0,0 +1,6 @@
{...}: {
virtualisation.libvirtd.enable = true;
# Only true if a desktop environment is installed
programs.virt-manager.enable = true;
}