This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/system/docker.nix

26 lines
585 B
Nix

{ config, lib, pkgs, user, ... }:
let
this = config.system.docker;
graphical = config.my.graphical;
in
with lib; {
options = {
system.docker.enable = mkOption {
default = true;
type = with types; bool;
};
};
config = mkIf this.enable {
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
users.users."${user.name}".extraGroups = [ "docker" ];
# This is the old version of docker-compose. run "docker compose" for the v2 implementation.
environment.systemPackages = with pkgs; [ docker-compose ];
};
}