1

Enable GPU support for some services

This commit is contained in:
2023-09-01 13:32:59 +02:00
parent 5947626dde
commit 284817838d
3 changed files with 9 additions and 5 deletions

View File

@ -83,7 +83,7 @@
users.users.christoph = {
isNormalUser = true;
description = "Christoph";
extraGroups = ["networkmanager" "wheel" "docker"];
extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish;
packages = with pkgs; [];
};
@ -95,6 +95,7 @@
alejandra
nnn
busybox
glances
];
programs = {
@ -129,10 +130,10 @@
enable = true;
autoPrune.enable = true;
enableNvidia = true;
rootless = {
enable = true;
setSocketVariable = true;
};
# rootless = {
# enable = true;
# setSocketVariable = true;
# };
};
oci-containers.backend = "docker";
};

View File

@ -30,6 +30,8 @@
extraOptions = [
# "--restart=always" # Conflicts with NixOS' default of using --rm
# "--gpus device=0" # This only works when I start the container using sudo, but not from the systemd service?
"--runtime=nvidia" # Older option but seems to work
];
};
}

View File

@ -29,6 +29,7 @@
extraOptions = [
# "--restart=always" # Conflicts with NixOS' default of using --rm
"--runtime=nvidia"
];
};
}