Adding docker support

This commit is contained in:
James Patrick 2022-08-14 20:32:59 -04:00
parent d7e2c0a924
commit 95e6223340

25
modules/system/docker.nix Normal file
View File

@ -0,0 +1,25 @@
{ 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 ];
};
}