Add nvidia support to docker module
This commit is contained in:
parent
201090eee6
commit
d9e13fb4b3
1 changed files with 19 additions and 13 deletions
|
@ -16,22 +16,16 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [ docker-compose ];
|
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||||
|
|
||||||
virtualisation.podman = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableNvidia = cfg.enableNvidia;
|
enableNvidia = cfg.enableNvidia;
|
||||||
networkSocket = mkIf cfg.enableTcpSocket {
|
|
||||||
|
autoPrune = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
dates = "weekly";
|
||||||
};
|
};
|
||||||
dockerSocket.enable = true;
|
|
||||||
dockerCompat = true;
|
|
||||||
defaultNetwork.dnsname.enable = true;
|
|
||||||
};
|
};
|
||||||
# virtualisation.docker = {
|
|
||||||
# autoPrune = {
|
|
||||||
# enable = true;
|
|
||||||
# dates = "weekly";
|
|
||||||
# };
|
|
||||||
virtualisation.containers = {
|
virtualisation.containers = {
|
||||||
registries = {
|
registries = {
|
||||||
insecure = [ "docker02.bedum.horus.nu:5000" "yocto-build-server.bedum.horus.nu:5000" "containers.internal.horus.nu" ];
|
insecure = [ "docker02.bedum.horus.nu:5000" "yocto-build-server.bedum.horus.nu:5000" "containers.internal.horus.nu" ];
|
||||||
|
@ -45,8 +39,20 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# virtualisation.oci-containers.backend = "podman";
|
|
||||||
|
|
||||||
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "docker" "podman" ];
|
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "docker" "podman" ];
|
||||||
|
|
||||||
|
# services.ghostunnel = mkIf cfg.enableTcpSocket {
|
||||||
|
# enable = true;
|
||||||
|
# servers."podman-socket" = {
|
||||||
|
# listen = "0.0.0.0:2376";
|
||||||
|
# target = "unix:/run/podman/podman.sock";
|
||||||
|
# allowAll = mkDefault true;
|
||||||
|
# extraArguments = ''
|
||||||
|
# --auto-acme-cert=mimir.internal.horus.nu
|
||||||
|
# --auto-acme-email=erwin@horus.nu
|
||||||
|
# --auto-acme-ca=https://mimir.internal.horus.nu
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue