1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/modules/services/podman-linux/options.nix
Nicholas Hassan 1743615b61
podman: add module
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-11-01 20:45:06 +01:00

52 lines
1.4 KiB
Nix

{ lib, pkgs, ... }:
let
# Define the systemd service type
quadletInternalType = lib.types.submodule {
options = {
assertions = lib.mkOption {
type = with lib.types; listOf unspecified;
default = [ ];
internal = true;
description = "List of Nix type assertions.";
};
resourceType = lib.mkOption {
type = lib.types.str;
default = "";
internal = true;
description = "The type of the podman Quadlet resource.";
};
serviceName = lib.mkOption {
type = lib.types.str;
internal = true;
description = "The name of the systemd service.";
};
source = lib.mkOption {
type = lib.types.str;
internal = true;
description = "The quadlet source file content.";
};
};
};
in {
options.services.podman = {
internal.quadletDefinitions = lib.mkOption {
type = lib.types.listOf quadletInternalType;
default = { };
internal = true;
description = "List of quadlet source file content and service names.";
};
package = lib.mkOption {
type = lib.types.package;
default = pkgs.podman;
defaultText = lib.literalExpression "pkgs.podman";
description = "The podman package to use.";
};
enableTypeChecks = lib.mkEnableOption "type checks for podman quadlets";
};
}