Enable GPU support for some services
This commit is contained in:
@ -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";
|
||||
};
|
||||
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
extraOptions = [
|
||||
# "--restart=always" # Conflicts with NixOS' default of using --rm
|
||||
"--runtime=nvidia"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user