diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-09-09 21:26:14 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-09-09 21:26:14 +0900 |
| commit | 396066de7b56d846af1f2ec34df9e09720a9f515 (patch) | |
| tree | b76b206fdc1fe42353120bc74b91c10b48dcef99 | |
| parent | 44301cd979ea7b2a03e1dc535fb98cdb2e356580 (diff) | |
nix: implement dbus-system option in nixos module
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
| -rw-r--r-- | nixos.nix | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -73,6 +73,15 @@ in ''; }; + configSystem = mkOption { + type = nullOr anything; + default = null; + description = '' + D-Bus system bus custom configuration. + Setting this to null will disable the system bus proxy. + ''; + }; + id = mkOption { type = nullOr str; default = null; @@ -227,6 +236,11 @@ in pkgs.writeText "${name}-dbus.json" (builtins.toJSON launcher.dbus.config) else null; + dbusSystem = + if launcher.dbus.configSystem != null then + pkgs.writeText "${name}-dbus-system.json" (builtins.toJSON launcher.dbus.configSystem) + else + null; capArgs = (if wayland then " -wayland" else "") + (if x11 then " -X" else "") @@ -235,6 +249,7 @@ in + (if launcher.dbus.mpris then " -mpris" else "") + (if launcher.dbus.id != null then " -dbus-id ${dbus.id}" else "") + (if dbusConfig != null then " -dbus-config ${dbusConfig}" else "") + + (if dbusSystem != null then " -dbus-system ${dbusSystem}" else "") + (if launcher.method == "fortify-sudo" then " -sudo" else ""); in pkgs.writeShellScriptBin name ( |
