refactor(docker): rootless only
Drops the root daemon and the root-equivalent docker group; the daemon settings now apply to the rootless daemon. compose ships with the docker package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# add docker group to user
|
# rootless only: no root daemon and no root-equivalent docker group
|
||||||
users.users.aaron.extraGroups = [ "docker" ];
|
virtualisation.docker.rootless = {
|
||||||
|
|
||||||
virtualisation.docker = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
# Customize Docker daemon settings
|
setSocketVariable = true;
|
||||||
daemon.settings = {
|
daemon.settings = {
|
||||||
dns = [
|
dns = [
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
@@ -14,16 +10,6 @@
|
|||||||
];
|
];
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
registry-mirrors = [ "https://mirror.gcr.io" ];
|
registry-mirrors = [ "https://mirror.gcr.io" ];
|
||||||
storage-driver = "overlay2";
|
|
||||||
};
|
};
|
||||||
# Use the rootless mode
|
|
||||||
rootless = {
|
|
||||||
enable = true;
|
|
||||||
setSocketVariable = true;
|
|
||||||
};
|
|
||||||
# Install docker-compose
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
docker-compose
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user