systemd-initrd: dbus
This commit is contained in:
parent
834ec135ce
commit
8598234651
@ -14,13 +14,17 @@ let
|
|||||||
serviceDirectories = cfg.packages;
|
serviceDirectories = cfg.packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (lib) mkOption mkIf mkMerge types;
|
inherit (lib) mkOption mkEnableOption mkIf mkMerge types;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
boot.initrd.systemd.dbus = {
|
||||||
|
enable = mkEnableOption (lib.mdDoc "dbus in stage 1") // { visible = false; };
|
||||||
|
};
|
||||||
|
|
||||||
services.dbus = {
|
services.dbus = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@ -111,6 +115,21 @@ in
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(mkIf config.boot.initrd.systemd.dbus.enable {
|
||||||
|
boot.initrd.systemd = {
|
||||||
|
users.messagebus = { };
|
||||||
|
groups.messagebus = { };
|
||||||
|
contents."/etc/dbus-1".source = pkgs.makeDBusConf {
|
||||||
|
inherit (cfg) apparmor;
|
||||||
|
suidHelper = "/bin/false";
|
||||||
|
serviceDirectories = [ pkgs.dbus ];
|
||||||
|
};
|
||||||
|
packages = [ pkgs.dbus ];
|
||||||
|
storePaths = [ "${pkgs.dbus}/bin/dbus-daemon" ];
|
||||||
|
targets.sockets.wants = [ "dbus.socket" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(mkIf (cfg.implementation == "dbus") {
|
(mkIf (cfg.implementation == "dbus") {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.dbus
|
pkgs.dbus
|
||||||
|
@ -3155,6 +3155,9 @@ let
|
|||||||
|
|
||||||
systemd.package = pkgs.systemdStage1Network;
|
systemd.package = pkgs.systemdStage1Network;
|
||||||
|
|
||||||
|
# For networkctl
|
||||||
|
systemd.dbus.enable = mkDefault true;
|
||||||
|
|
||||||
systemd.additionalUpstreamUnits = [
|
systemd.additionalUpstreamUnits = [
|
||||||
"systemd-networkd-wait-online.service"
|
"systemd-networkd-wait-online.service"
|
||||||
"systemd-networkd.service"
|
"systemd-networkd.service"
|
||||||
|
Loading…
Reference in New Issue
Block a user