remove lots of dead code and refactor
This commit is contained in:
parent
471434366b
commit
7f7223d85f
35 changed files with 227 additions and 1616 deletions
35
modules/containerization.nix
Normal file
35
modules/containerization.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -5,5 +5,6 @@
|
|||
./caddy.nix
|
||||
./roundcube.nix
|
||||
./zipline.nix
|
||||
./containerization.nix
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue