system.services.(<name>.services)*: Make pkgs available

I don't think we should keep this, but let's make it work for now,
and then we can remove it later.

Changed files
+16
nixos
modules
system
service
systemd
+16
nixos/modules/system/service/systemd/system.nix
···
class = "service";
modules = [
./service.nix
+
+
# TODO: Consider removing pkgs. Service modules can provide their own
+
# dependencies.
+
{
+
# Extend portable services option
+
options.services = lib.mkOption {
+
type = types.attrsOf (
+
types.submoduleWith {
+
specialArgs.pkgs = pkgs;
+
modules = [ ];
+
}
+
);
+
};
+
}
];
specialArgs = {
# perhaps: features."systemd" = { };
+
# TODO: Consider removing pkgs. Service modules can provide their own
+
# dependencies.
inherit pkgs;
systemdPackage = config.systemd.package;
};