From e3e465dc8d29882c106f4da2a03919d1b40755b6 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:10:27 -0500 Subject: [PATCH] add rootless docker --- common/systemModules/docker.nix | 15 +++++++++++++++ common/users/meyer/default.nix | 1 + 2 files changed, 16 insertions(+) create mode 100644 common/systemModules/docker.nix diff --git a/common/systemModules/docker.nix b/common/systemModules/docker.nix new file mode 100644 index 0000000..49e5df0 --- /dev/null +++ b/common/systemModules/docker.nix @@ -0,0 +1,15 @@ +{ NAME }: { ... }: { + virtualisation = { + docker = { + rootless = { + enable = true; + }; + enable = true; + }; + }; + environment = { + sessionVariables = { + DOCKER_HOST = "unix://$XDG_RUNTIME_DIR/docker.sock"; + }; + }; +} diff --git a/common/users/meyer/default.nix b/common/users/meyer/default.nix index d14d135..c7f480b 100644 --- a/common/users/meyer/default.nix +++ b/common/users/meyer/default.nix @@ -8,6 +8,7 @@ in (import ../../systemModules/sops.nix { inherit NAME; }) (import ../../systemModules/vm.nix { inherit NAME; }) (import ../../systemModules/razer.nix { inherit NAME; }) + (import ../../systemModules/docker.nix { inherit NAME; }) (import ../../systemModules/nixHelper.nix { inherit NAME; }) (import ../../programs/wireshark.nix { inherit NAME; }) (import ../../programs/kanata.nix { inherit NAME; })