Make Docker toggleable
This commit is contained in:
parent
6728f32ffc
commit
37673680cd
1 changed files with 14 additions and 10 deletions
|
@ -1,20 +1,24 @@
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
flake.modules.nixos.pc = {
|
flake.modules.nixos.pc = args: {
|
||||||
virtualisation = {
|
options.docker.enable = lib.mkEnableOption "Enable Docker";
|
||||||
oci-containers.backend = "docker";
|
|
||||||
|
|
||||||
docker = {
|
config = lib.mkIf args.config.docker.enable {
|
||||||
enable = true;
|
virtualisation = {
|
||||||
|
oci-containers.backend = "docker";
|
||||||
|
|
||||||
autoPrune = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dates = "weekly";
|
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "weekly";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
users.users.${config.flake.meta.owner.username}.extraGroups = [ "docker" ];
|
users.users.${config.flake.meta.owner.username}.extraGroups = [ "docker" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue