Adding docker support
This commit is contained in:
parent
d7e2c0a924
commit
95e6223340
25
modules/system/docker.nix
Normal file
25
modules/system/docker.nix
Normal 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 ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user