a75c64d04a
This puts a hard dependency on 20.09, but that's to be expected.
34 lines
691 B
Nix
34 lines
691 B
Nix
{ options, config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
with lib.my;
|
|
let cfg = config.modules.services.docker;
|
|
in {
|
|
options.modules.services.docker = {
|
|
enable = mkBoolOpt false;
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
user.packages = with pkgs; [
|
|
docker
|
|
docker-compose
|
|
];
|
|
|
|
env.DOCKER_CONFIG = "$XDG_CONFIG_HOME/docker";
|
|
env.MACHINE_STORAGE_PATH = "$XDG_DATA_HOME/docker/machine";
|
|
|
|
user.extraGroups = [ "docker" ];
|
|
|
|
modules.shell.zsh.rcFiles = [ "${configDir}/docker/aliases.zsh" ];
|
|
|
|
virtualisation = {
|
|
docker = {
|
|
enable = true;
|
|
autoPrune.enable = true;
|
|
enableOnBoot = false;
|
|
# listenOptions = [];
|
|
};
|
|
};
|
|
};
|
|
}
|