Merge pull request #49868 from jfrankenau/fix-triggerhappy
nixos/triggerhappy: add option user
This commit is contained in:
commit
0960fc72b7
@ -57,6 +57,15 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "nobody";
|
||||||
|
example = "root";
|
||||||
|
description = ''
|
||||||
|
User account under which <command>triggerhappy</command> runs.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
bindings = mkOption {
|
bindings = mkOption {
|
||||||
type = types.listOf (types.submodule bindingCfg);
|
type = types.listOf (types.submodule bindingCfg);
|
||||||
default = [];
|
default = [];
|
||||||
@ -96,7 +105,7 @@ in
|
|||||||
after = [ "local-fs.target" ];
|
after = [ "local-fs.target" ];
|
||||||
description = "Global hotkey daemon";
|
description = "Global hotkey daemon";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.triggerhappy}/bin/thd --user nobody --socket ${socket} --triggers ${configFile} --deviceglob /dev/input/event*";
|
ExecStart = "${pkgs.triggerhappy}/bin/thd ${optionalString (cfg.user != "root") "--user ${cfg.user}"} --socket ${socket} --triggers ${configFile} --deviceglob /dev/input/event*";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user