systemd-initrd: dbus
This commit is contained in:
parent
834ec135ce
commit
8598234651
@ -14,13 +14,17 @@ let
|
||||
serviceDirectories = cfg.packages;
|
||||
};
|
||||
|
||||
inherit (lib) mkOption mkIf mkMerge types;
|
||||
inherit (lib) mkOption mkEnableOption mkIf mkMerge types;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
|
||||
boot.initrd.systemd.dbus = {
|
||||
enable = mkEnableOption (lib.mdDoc "dbus in stage 1") // { visible = false; };
|
||||
};
|
||||
|
||||
services.dbus = {
|
||||
|
||||
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") {
|
||||
environment.systemPackages = [
|
||||
pkgs.dbus
|
||||
|
@ -3155,6 +3155,9 @@ let
|
||||
|
||||
systemd.package = pkgs.systemdStage1Network;
|
||||
|
||||
# For networkctl
|
||||
systemd.dbus.enable = mkDefault true;
|
||||
|
||||
systemd.additionalUpstreamUnits = [
|
||||
"systemd-networkd-wait-online.service"
|
||||
"systemd-networkd.service"
|
||||
|
Loading…
Reference in New Issue
Block a user