liminix/modules/systemd/types.nix

28 lines
591 B
Nix
Raw Normal View History

2024-10-06 18:38:36 +02:00
{
pkgs,
lib,
utils
}:
let
inherit (utils.systemdUtils.lib) serviceConfig unitConfig;
inherit (utils.systemdUtils.unitOptions) stage2ServiceOptions;
stage2ServiceConfig = {
imports = [ serviceConfig ];
# Default path for systemd services. Should be quite minimal.
config.path = lib.mkAfter [
pkgs.coreutils
# pkgs.gnugrep
# pkgs.gnused
pkgs.systemd
];
};
in
{
inherit (utils.systemdUtils.types) units targets;
services = lib.types.attrsOf (lib.types.submodule [
unitConfig
stage2ServiceOptions
stage2ServiceConfig
]);
}