Last active
April 21, 2017 19:04
-
-
Save cleverca22/067caef678a22792e24894ca5fd1ae84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { pkgs, ... }: | |
| let | |
| script1 = pkgs.writeScript "brightnessscript" '' | |
| #!/bin/sh | |
| your script here | |
| ''; | |
| script2 = pkgs.writeScriptBin "brightness" '' | |
| #!/bin/sh | |
| sudo ${script1} | |
| ''; | |
| in { | |
| environment.systemPackages = [ script2 ]; | |
| security.sudo.extraConfig = '' | |
| infinisil ALL=(root) NOPASSWD: ${script1} | |
| ''; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment