helm/modules/services/docker.nix
Henrik Lissner a75c64d04a
Rewrite to use flakes
This puts a hard dependency on 20.09, but that's to be expected.
2020-10-11 01:31:33 -04:00

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 = [];
};
};
};
}