home-manager/modules/services/podman-linux/options.nix
Nicholas Hassan 14bbb67c08
podman: add new module 'podman'
Adds a new Podman module for creating user containers and networks as
systemd services. These are installed to the user's XDG_CONFIG/systemd/user directory.
2024-05-12 22:30:17 +09:30

43 lines
1.1 KiB
Nix

{lib, pkgs, ...}:
let
# Define the systemd service type
quadletInternalType = lib.types.submodule {
options = {
serviceName = lib.mkOption {
type = lib.types.str;
description = "The name of the systemd service.";
};
unitType = lib.mkOption {
type = lib.types.str;
default = "";
description = "The type of the systemd unit.";
};
source = lib.mkOption {
type = lib.types.str;
description = "The quadlet source file content.";
};
assertions = lib.mkOption {
type = with lib.types; listOf unspecified;
default = [];
description = "List of Nix type assertions.";
};
};
};
in {
options.internal.podman-quadlet-definitions = lib.mkOption {
type = lib.types.listOf quadletInternalType;
default = {};
description = "List of quadlet source file content and service names.";
};
options.services.podman.package = lib.mkOption {
type = lib.types.package;
default = pkgs.podman;
description = "The podman package to use.";
};
}