Enable GPU support for some services
This commit is contained in:
@ -83,7 +83,7 @@
|
|||||||
users.users.christoph = {
|
users.users.christoph = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Christoph";
|
description = "Christoph";
|
||||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [];
|
||||||
};
|
};
|
||||||
@ -95,6 +95,7 @@
|
|||||||
alejandra
|
alejandra
|
||||||
nnn
|
nnn
|
||||||
busybox
|
busybox
|
||||||
|
glances
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@ -129,10 +130,10 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
autoPrune.enable = true;
|
autoPrune.enable = true;
|
||||||
enableNvidia = true;
|
enableNvidia = true;
|
||||||
rootless = {
|
# rootless = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
setSocketVariable = true;
|
# setSocketVariable = true;
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
oci-containers.backend = "docker";
|
oci-containers.backend = "docker";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
# "--restart=always" # Conflicts with NixOS' default of using --rm
|
# "--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 = [
|
extraOptions = [
|
||||||
# "--restart=always" # Conflicts with NixOS' default of using --rm
|
# "--restart=always" # Conflicts with NixOS' default of using --rm
|
||||||
|
"--runtime=nvidia"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user