nix: implement dbus-system option in nixos module
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
44301cd979
commit
396066de7b
15
nixos.nix
15
nixos.nix
|
@ -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 {
|
id = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -227,6 +236,11 @@ in
|
||||||
pkgs.writeText "${name}-dbus.json" (builtins.toJSON launcher.dbus.config)
|
pkgs.writeText "${name}-dbus.json" (builtins.toJSON launcher.dbus.config)
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
|
dbusSystem =
|
||||||
|
if launcher.dbus.configSystem != null then
|
||||||
|
pkgs.writeText "${name}-dbus-system.json" (builtins.toJSON launcher.dbus.configSystem)
|
||||||
|
else
|
||||||
|
null;
|
||||||
capArgs =
|
capArgs =
|
||||||
(if wayland then " -wayland" else "")
|
(if wayland then " -wayland" else "")
|
||||||
+ (if x11 then " -X" else "")
|
+ (if x11 then " -X" else "")
|
||||||
|
@ -235,6 +249,7 @@ in
|
||||||
+ (if launcher.dbus.mpris then " -mpris" else "")
|
+ (if launcher.dbus.mpris then " -mpris" else "")
|
||||||
+ (if launcher.dbus.id != null then " -dbus-id ${dbus.id}" else "")
|
+ (if launcher.dbus.id != null then " -dbus-id ${dbus.id}" else "")
|
||||||
+ (if dbusConfig != null then " -dbus-config ${dbusConfig}" 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 "");
|
+ (if launcher.method == "fortify-sudo" then " -sudo" else "");
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin name (
|
pkgs.writeShellScriptBin name (
|
||||||
|
|
Loading…
Reference in New Issue