diff --git a/client/default.nix b/client/default.nix index aa70351..aa1005e 100644 --- a/client/default.nix +++ b/client/default.nix @@ -19,6 +19,7 @@ in ./users.nix ./desktop.nix ./programs.nix + ./docker.nix ]; deployment = optionalAttrs (client != null) { diff --git a/client/docker.nix b/client/docker.nix new file mode 100644 index 0000000..ea09045 --- /dev/null +++ b/client/docker.nix @@ -0,0 +1,26 @@ +{ lib, ... }: + +with lib; + +{ + virtualisation.docker = { + enable = true; + + daemon.settings = { + group = mkForce "users"; + }; + + autoPrune = { + enable = true; + dates = "weekly"; + }; + }; + + hardware.nvidia-container-toolkit.enable = true; + + systemd.sockets."docker" = { + socketConfig = { + SocketGroup = mkForce "users"; + }; + }; +}