about summary refs log tree commit diff stats
path: root/pkgs/by-name/br/brightness/package.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/br/brightness/package.nix29
1 files changed, 22 insertions, 7 deletions
diff --git a/pkgs/by-name/br/brightness/package.nix b/pkgs/by-name/br/brightness/package.nix
index c2e31a0c..f3797d43 100644
--- a/pkgs/by-name/br/brightness/package.nix
+++ b/pkgs/by-name/br/brightness/package.nix
@@ -1,14 +1,29 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
-  sysLib,
+  writeShellApplication,
+  # Arguments
   backlightName ? "intel_backlight", # nixosConfig.soispha.laptop.backlight
+  # Dependencies
+  gawk,
+  coreutils,
 }:
-sysLib.writeShellScript {
+writeShellApplication {
   name = "brightness";
-  src = ./brightness.sh;
-  generateCompletions = true;
-  keepPath = false;
+  text = builtins.readFile ./brightness.sh;
+  inheritPath = false;
 
-  replacementStrings = {BACKLIGHT_NAME = backlightName;};
+  runtimeEnv = {BACKLIGHT_NAME = backlightName;};
 
-  dependencies = [];
+  runtimeInputs = [
+    gawk
+    coreutils
+  ];
 }