mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
1743615b61
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.
52 lines
1.4 KiB
Nix
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";
|
|
};
|
|
}
|