From c6e048e5580f33a1a47bfd161e5c32bd1e88bb06 Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sat, 18 Nov 2023 15:20:09 -0700 Subject: [PATCH] Add rootless docker. --- configuration.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configuration.nix b/configuration.nix index c1c88eb..b4c04f6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -41,6 +41,7 @@ set colorcolumn=80,100 set expandtab " Spaces instead of tabs. set list " Show hidden characters. + set listchars=tab:>\ ,trail:-,nbsp:+ set shiftwidth=2 " # of spaces to use for each (auto)indent. set tabstop=2 " # of spaces a in the file counts for. ''; @@ -91,11 +92,19 @@ users.users.jrpotter = { isNormalUser = true; extraGroups = [ + "docker" "networkmanager" "wheel" # Enable `sudo` for the user. ]; }; + virtualisation.docker.rootless = { + enable = true; + # Sets the `DOCKER_HOST` variable to the rootless Docker instance for normal + # users by default. + setSocketVariable = true; + }; + # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix.