liminix/modules/systemd/types.nix

30 lines
618 B
Nix
Raw Normal View History

2024-10-06 18:38:36 +02:00
{
pkgs,
lib,
2024-10-06 23:27:48 +02:00
utils,
busybox
2024-10-06 18:38:36 +02:00
}:
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 [
2024-10-06 23:27:48 +02:00
busybox
# pkgs.coreutils
2024-10-06 18:38:36 +02:00
# pkgs.gnugrep
# pkgs.gnused
pkgs.systemd
];
};
in
{
inherit (utils.systemdUtils.types) units targets;
services = lib.types.attrsOf (lib.types.submodule [
unitConfig
stage2ServiceOptions
stage2ServiceConfig
]);
}