about summary refs log tree commit diff stats
path: root/pkgs/by-name/br
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpkgs/by-name/br/brightness/brightness.sh (renamed from pkgs/sources/scripts/source/small_functions/brightness.sh)0
-rw-r--r--pkgs/by-name/br/brightness/package.nix14
2 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/sources/scripts/source/small_functions/brightness.sh b/pkgs/by-name/br/brightness/brightness.sh
index a7272279..a7272279 100755
--- a/pkgs/sources/scripts/source/small_functions/brightness.sh
+++ b/pkgs/by-name/br/brightness/brightness.sh
diff --git a/pkgs/by-name/br/brightness/package.nix b/pkgs/by-name/br/brightness/package.nix
new file mode 100644
index 00000000..c2e31a0c
--- /dev/null
+++ b/pkgs/by-name/br/brightness/package.nix
@@ -0,0 +1,14 @@
+{
+  sysLib,
+  backlightName ? "intel_backlight", # nixosConfig.soispha.laptop.backlight
+}:
+sysLib.writeShellScript {
+  name = "brightness";
+  src = ./brightness.sh;
+  generateCompletions = true;
+  keepPath = false;
+
+  replacementStrings = {BACKLIGHT_NAME = backlightName;};
+
+  dependencies = [];
+}