liminix/modules/systemd/types.nix
2024-10-07 18:03:49 +02:00

29 lines
618 B
Nix

{
pkgs,
lib,
utils,
busybox
}:
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 [
busybox
# 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
]);
}