Reorganize imports
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
43
hosts/common/configs/user/console/docker/default.nix
Normal file
43
hosts/common/configs/user/console/docker/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
utils,
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist"."${home}/.local/share/docker" = { };
|
||||
|
||||
systemd.user = {
|
||||
services.docker.after = [
|
||||
config.environment.persistence."/persist"."${home}/.local/share/docker".mount
|
||||
];
|
||||
sockets.docker.after = [
|
||||
config.environment.persistence."/persist"."${home}/.local/share/docker".mount
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.${user}.home.packages = with pkgs; [ docker-compose ];
|
||||
}
|
Reference in New Issue
Block a user