modules: system: add docker
This commit is contained in:
parent
8fcb7f42a6
commit
73fdd4622b
|
@ -4,6 +4,7 @@
|
|||
{
|
||||
imports = [
|
||||
./boot
|
||||
./docker
|
||||
./documentation
|
||||
./language
|
||||
./nix
|
||||
|
|
27
modules/system/docker/default.nix
Normal file
27
modules/system/docker/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Podman related settings
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.system.docker;
|
||||
in
|
||||
{
|
||||
options.my.system.docker = with lib; {
|
||||
enable = mkEnableOption "docker configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
|
||||
# Remove unused data on a weekly basis
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
|
||||
dates = "weekly";
|
||||
|
||||
flags = [
|
||||
"--all"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue