forked from DGNum/liminix
29 lines
618 B
Nix
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
|
|
]);
|
|
}
|