35
hosts/common/user/configs/console/docker/default.nix
Normal file
35
hosts/common/user/configs/console/docker/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
username ? throw "username argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
enableOnBoot = false;
|
||||
storageDriver = "btrfs";
|
||||
|
||||
daemon.settings = {
|
||||
experimental = true;
|
||||
ipv6 = true;
|
||||
fixed-cidr-v6 = "fd00::/80";
|
||||
};
|
||||
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
flags = [ "--all" ];
|
||||
};
|
||||
};
|
||||
|
||||
# This is not set though home-manager because we need to hide the mount
|
||||
# otherwise docker complains with the following error:
|
||||
# dockerd-rootless: failed to start daemon: error initializing graphdriver: prerequisites for driver not satisfied (wrong filesystem?): btrfs
|
||||
environment.persistence."/persist".users.${username}.directories = [ ".local/share/docker" ];
|
||||
|
||||
home-manager.users.${username}.home.packages = with pkgs; [ docker-compose ];
|
||||
}
|
Reference in New Issue
Block a user