mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
This adds a module for dbus with only one option, `packages`. The `dbus.packages` options allows users to specify packages to have their dbus service files (from `/share/dbus-1/services`) linked to the users dbus services directory (`$XDG_DATA_HOME/dbus-1/services/`), effectively enabling the services.
21 lines
496 B
Nix
21 lines
496 B
Nix
{ pkgs, config, ... }:
|
|
let
|
|
inherit (config.lib.test) mkStubPackage;
|
|
in
|
|
{
|
|
dbus.packages = [
|
|
(mkStubPackage {
|
|
name = "test";
|
|
buildScript = ''
|
|
mkdir -p $out/share/dbus-1/services
|
|
printf '%s' test > $out/share/dbus-1/services/test.service
|
|
'';
|
|
})
|
|
];
|
|
|
|
nmt.script = ''
|
|
serviceFile=home-files/.local/share/dbus-1/services/test.service
|
|
assertFileExists $serviceFile
|
|
assertFileContent $serviceFile "${pkgs.writeText "expected" "test"}"
|
|
'';
|
|
}
|