Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4bdd577aff74
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0960fc72b7cd
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 12, 2018

  1. Copy the full SHA
    fab6a43 View commit details

Commits on Apr 11, 2019

  1. Merge pull request #49868 from jfrankenau/fix-triggerhappy

    nixos/triggerhappy: add option user
    ryantm authored Apr 11, 2019
    Copy the full SHA
    0960fc7 View commit details
Showing with 10 additions and 1 deletion.
  1. +10 −1 nixos/modules/services/hardware/triggerhappy.nix
11 changes: 10 additions & 1 deletion nixos/modules/services/hardware/triggerhappy.nix
Original file line number Diff line number Diff line change
@@ -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 {
type = types.listOf (types.submodule bindingCfg);
default = [];
@@ -96,7 +105,7 @@ in
after = [ "local-fs.target" ];
description = "Global hotkey daemon";
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*";
};
};