dbus: manage it ourselves instead of having systemd do it
This commit is contained in:
@@ -60,6 +60,8 @@ in
|
|||||||
"useradd"
|
"useradd"
|
||||||
"userdel"
|
"userdel"
|
||||||
"usermod"
|
"usermod"
|
||||||
|
# from <repo:nixos/nixpkgs:nixos/modules/system/boot/systemd/user.nix>
|
||||||
|
"systemd-user" #< N.B.: this causes the `systemd --user` service manager to not be started!
|
||||||
])) services;
|
])) services;
|
||||||
in lib.mapAttrs (_serviceName: service: service // {
|
in lib.mapAttrs (_serviceName: service: service // {
|
||||||
# replace references with the old pam_unix, which calls into /run/wrappers/bin/unix_chkpwd,
|
# replace references with the old pam_unix, which calls into /run/wrappers/bin/unix_chkpwd,
|
||||||
|
@@ -254,6 +254,7 @@ in
|
|||||||
# "abaddon" # discord client
|
# "abaddon" # discord client
|
||||||
"alacritty" # terminal emulator
|
"alacritty" # terminal emulator
|
||||||
"calls" # gnome calls (dialer/handler)
|
"calls" # gnome calls (dialer/handler)
|
||||||
|
"dbus"
|
||||||
"dconf" # required by many packages, but not well-documented :(
|
"dconf" # required by many packages, but not well-documented :(
|
||||||
# "delfin" # Jellyfin client
|
# "delfin" # Jellyfin client
|
||||||
"dialect" # language translation
|
"dialect" # language translation
|
||||||
|
27
hosts/common/programs/dbus.nix
Normal file
27
hosts/common/programs/dbus.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sane.programs.dissent;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
sane.programs.dbus = {
|
||||||
|
configOption = with lib; mkOption {
|
||||||
|
default = {};
|
||||||
|
type = types.submodule {
|
||||||
|
options.autostart = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# normally systemd would create a dbus session for us, but if you configure it not to do that
|
||||||
|
# then we can create our own. not sure if there's a dependency ordering issue here: lots
|
||||||
|
# of things depend on dbus but i don't do anything special to guarantee this is initialized
|
||||||
|
# before them.
|
||||||
|
services.dbus = {
|
||||||
|
description = "dbus user session";
|
||||||
|
partOf = lib.mkIf cfg.config.autostart [ "default" ];
|
||||||
|
command = "dbus-daemon --session --nofork --address=unix:path=/run/user/$UID/bus";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -24,6 +24,7 @@
|
|||||||
./cozy.nix
|
./cozy.nix
|
||||||
./cups.nix
|
./cups.nix
|
||||||
./curlftpfs.nix
|
./curlftpfs.nix
|
||||||
|
./dbus.nix
|
||||||
./dconf.nix
|
./dconf.nix
|
||||||
./deadd-notification-center
|
./deadd-notification-center
|
||||||
./dialect.nix
|
./dialect.nix
|
||||||
|
Reference in New Issue
Block a user