nixos/lirc: expose socket path via passthru
This commit is contained in:
parent
987fdea1a8
commit
9b2f0fbcdd
@ -32,14 +32,6 @@ in {
|
|||||||
default = [];
|
default = [];
|
||||||
description = "Extra arguments to lircd.";
|
description = "Extra arguments to lircd.";
|
||||||
};
|
};
|
||||||
|
|
||||||
socket = mkOption {
|
|
||||||
type = types.path;
|
|
||||||
# default search path of many applications
|
|
||||||
default = "/run/lirc/lircd";
|
|
||||||
description = "Socket path";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -50,13 +42,15 @@ in {
|
|||||||
# Note: LIRC executables raises a warning, if lirc_options.conf do not exists
|
# Note: LIRC executables raises a warning, if lirc_options.conf do not exists
|
||||||
environment.etc."lirc/lirc_options.conf".text = cfg.options;
|
environment.etc."lirc/lirc_options.conf".text = cfg.options;
|
||||||
|
|
||||||
|
passthru.lirc.socket = "/run/lirc/lircd";
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.lirc ];
|
environment.systemPackages = [ pkgs.lirc ];
|
||||||
|
|
||||||
systemd.sockets.lircd = {
|
systemd.sockets.lircd = {
|
||||||
description = "LIRC daemon socket";
|
description = "LIRC daemon socket";
|
||||||
wantedBy = [ "sockets.target" ];
|
wantedBy = [ "sockets.target" ];
|
||||||
socketConfig = {
|
socketConfig = {
|
||||||
ListenStream = cfg.socket;
|
ListenStream = config.passthru.lirc.socket;
|
||||||
SocketUser = "lirc";
|
SocketUser = "lirc";
|
||||||
SocketMode = "0660";
|
SocketMode = "0660";
|
||||||
};
|
};
|
||||||
|
@ -75,7 +75,7 @@ in {
|
|||||||
services.lirc.enable = true;
|
services.lirc.enable = true;
|
||||||
users.users.vdr.extraGroups = [ "lirc" ];
|
users.users.vdr.extraGroups = [ "lirc" ];
|
||||||
services.vdr.extraArguments = [
|
services.vdr.extraArguments = [
|
||||||
"--lirc=${config.services.lirc.socket}"
|
"--lirc=${config.passthru.lirc.socket}"
|
||||||
];
|
];
|
||||||
})]);
|
})]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user