remove lots of dead code and refactor

This commit is contained in:
cy 2025-03-03 15:26:01 -05:00
parent 471434366b
commit 7f7223d85f
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
35 changed files with 227 additions and 1616 deletions

View file

@ -0,0 +1,35 @@
{
config,
lib,
...
}:
let
cfg = config.my.containerization;
in
{
options.my.containerization = {
enable = lib.mkEnableOption "containerization";
usePodman = lib.mkOption {
type = lib.types.bool;
default = true;
description = "whether to use podman instead of docker";
};
};
config = lib.mkIf cfg.enable {
virtualisation = {
containers.enable = true;
podman = lib.mkIf cfg.usePodman {
enable = true;
# create 'docker' alias for podman, to use as
# drop-in replacement
dockerCompat = true;
defaultNetwork.settings = {
dns_enabled = true;
ipv6_enabled = true;
};
};
oci-containers.backend = lib.mkIf cfg.usePodman "podman";
};
};
}

View file

@ -5,5 +5,6 @@
./caddy.nix
./roundcube.nix
./zipline.nix
./containerization.nix
];
}