From d397be861baeebda49e6962598209585cb321e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Sun, 29 Dec 2024 00:23:43 +0100 Subject: [PATCH] refactor: pkgs paths to self --- SwarselSystems.org | 150 +++++++++++++++----------- lib/default.nix | 2 +- modules/home/firefox.nix | 4 +- pkgs/bak/default.nix | 4 +- pkgs/cdb/default.nix | 2 +- pkgs/cdw/default.nix | 2 +- pkgs/cura5/default.nix | 2 +- pkgs/e/default.nix | 10 +- pkgs/eontimer/default.nix | 2 +- pkgs/fs-diff/default.nix | 10 +- pkgs/github-notifications/default.nix | 2 +- pkgs/hm-specialisation/default.nix | 2 +- pkgs/opacitytoggle/default.nix | 10 +- pkgs/pass-fuzzel/default.nix | 10 +- pkgs/screenshare/default.nix | 10 +- pkgs/swarsel-bootstrap/default.nix | 10 +- pkgs/swarsel-install/default.nix | 10 +- pkgs/swarsel-postinstall/default.nix | 10 +- pkgs/swarsel-rebuild/default.nix | 10 +- pkgs/swarselcheck/default.nix | 10 +- pkgs/t2ts/default.nix | 2 +- pkgs/timer/default.nix | 2 +- pkgs/ts2t/default.nix | 2 +- pkgs/update-checker/default.nix | 10 +- pkgs/vershell/default.nix | 2 +- pkgs/waybarupdate/default.nix | 10 +- 26 files changed, 174 insertions(+), 126 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index f09a0c6..f6f8dc3 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -2190,12 +2190,14 @@ This app allows me, in conjunction with my Yubikey, to quickly enter passwords w #+end_src #+begin_src nix :tangle pkgs/pass-fuzzel/default.nix - { writeShellApplication, libnotify, pass, fuzzel, wtype }: - - writeShellApplication { + { self, writeShellApplication, libnotify, pass, fuzzel, wtype }: + let name = "pass-fuzzel"; + in + writeShellApplication { + inherit name; runtimeInputs = [ libnotify (pass.withExtensions (exts: [ exts.pass-otp ])) fuzzel wtype ]; - text = builtins.readFile ../../scripts/pass-fuzzel.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2210,7 +2212,7 @@ The version of =cura= used to be quite outdated in nixpkgs. I am fetching a newe #+begin_src nix :tangle pkgs/cura5/default.nix # taken from https://github.com/NixOS/nixpkgs/issues/186570#issuecomment-1627797219 - { appimageTools, fetchurl, writeScriptBin, pkgs }: + { appimageTools, fetchurl, writeScriptBin, pkgs, ... }: let @@ -2250,7 +2252,7 @@ This script allows for quick git home-manager specialisation switching. #+begin_src nix :tangle pkgs/hm-specialisation/default.nix - { writeShellApplication, fzf, findutils, home-manager }: + { writeShellApplication, fzf, findutils, home-manager, ... }: writeShellApplication { name = "hm-specialisation"; @@ -2274,7 +2276,7 @@ This script allows for quick git worktree switching. #+begin_src nix :tangle pkgs/cdw/default.nix - { writeShellApplication, fzf }: + { writeShellApplication, fzf, ... }: writeShellApplication { name = "cdw"; @@ -2295,7 +2297,7 @@ This script allows for quick git worktree switching. This script allows for quick git branch switching. #+begin_src nix :tangle pkgs/cdb/default.nix - { writeShellApplication, fzf }: + { writeShellApplication, fzf, ... }: writeShellApplication { name = "cdb"; @@ -2316,12 +2318,12 @@ This script lets me quickly backup files by appending =.bak= to the filename. #+begin_src nix :tangle pkgs/bak/default.nix - { writeShellApplication }: + { writeShellApplication, ... }: writeShellApplication { name = "bak"; text = '' - cp "$1"{,.bak} + cp -r "$1"{,.bak} ''; } @@ -2337,7 +2339,7 @@ This app starts a configuratble timer and uses TTS to say something once the tim #+begin_src nix :tangle pkgs/timer/default.nix - { writeShellApplication, speechd }: + { writeShellApplication, speechd, ... }: writeShellApplication { name = "timer"; @@ -2383,12 +2385,14 @@ This is a shorthand for calling emacsclient mostly. Also, it hides the kittyterm #+end_src #+begin_src nix :tangle pkgs/e/default.nix - { writeShellApplication, emacs30-pgtk, sway, jq }: - - writeShellApplication { + { self, writeShellApplication, emacs30-pgtk, sway, jq }: + let name = "e"; + in + writeShellApplication { + inherit name; runtimeInputs = [ emacs30-pgtk sway jq ]; - text = builtins.readFile ../../scripts/e.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2510,12 +2514,14 @@ This app checks for different apps that I keep around in the scratchpad for quic #+end_src #+begin_src nix :tangle pkgs/swarselcheck/default.nix - { writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }: - - writeShellApplication { + { self, writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }: + let name = "swarselcheck"; + in + writeShellApplication { + inherit name; runtimeInputs = [ kitty element-desktop-wayland vesktop spotify-player jq ]; - text = builtins.readFile ../../scripts/swarselcheck.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2555,12 +2561,14 @@ This scripts checks if there are uncommited changes in either my dotfile repo, m #+end_src #+begin_src nix :tangle pkgs/waybarupdate/default.nix - { writeShellApplication, git }: - - writeShellApplication { + { self, writeShellApplication, git }: + let name = "waybarupdate"; + in + writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/waybarupdate.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2581,12 +2589,14 @@ This app quickly toggles between 5% and 0% transparency. #+end_src #+begin_src nix :tangle pkgs/opacitytoggle/default.nix - { writeShellApplication, sway }: - - writeShellApplication { + { self, writeShellApplication, sway }: + let name = "opacitytoggle"; + in + writeShellApplication { + inherit name; runtimeInputs = [ sway ]; - text = builtins.readFile ../../scripts/opacitytoggle.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2621,11 +2631,13 @@ This utility is used to compare the current state of the root directory with the #+end_src #+begin_src nix :tangle pkgs/fs-diff/default.nix - { writeShellApplication }: - - writeShellApplication { + { self, writeShellApplication }: + let name = "fs-diff"; - text = builtins.readFile ../../scripts/fs-diff.sh; + in + writeShellApplication { + inherit name; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2654,12 +2666,14 @@ This utility checks if there are updated packages in nixpkgs-unstable. It does s #+end_src #+begin_src nix :tangle pkgs/update-checker/default.nix - { writeShellApplication, nvd }: - - writeShellApplication { + { self, writeShellApplication, nvd }: + let name = "update-checker"; + in + writeShellApplication { + inherit name; runtimeInputs = [ nvd ]; - text = builtins.readFile ../../scripts/update-checker.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -2672,7 +2686,7 @@ This utility checks if there are updated packages in nixpkgs-unstable. It does s #+begin_src nix :tangle pkgs/github-notifications/default.nix - { writeShellApplication, jq }: + { writeShellApplication, jq, ... }: writeShellApplication { name = "github-notifications"; @@ -2715,12 +2729,14 @@ This utility checks if there are updated packages in nixpkgs-unstable. It does s #+begin_src nix :tangle pkgs/screenshare/default.nix - { writeShellApplication, sway }: - - writeShellApplication { + { self, writeShellApplication, sway }: + let name = "screenshare"; + in + writeShellApplication { + inherit name; runtimeInputs = [ sway ]; - text = builtins.readFile ../../scripts/screenshare.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -3075,12 +3091,14 @@ This program sets up a new NixOS host remotely. It also takes care of secret man #+begin_src nix :tangle pkgs/swarsel-bootstrap/default.nix - { writeShellApplication, openssh }: - - writeShellApplication { + { self, writeShellApplication, openssh }: + let name = "swarsel-bootstrap"; + in + writeShellApplication { + inherit name; runtimeInputs = [ openssh ]; - text = builtins.readFile ../../scripts/swarsel-bootstrap.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -3181,12 +3199,14 @@ This program builds a configuration locally. #+begin_src nix :tangle pkgs/swarsel-rebuild/default.nix - { writeShellApplication, git }: - - writeShellApplication { + { self, writeShellApplication, git }: + let name = "swarsel-rebuild"; + in + writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/swarsel-rebuild.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -3363,12 +3383,14 @@ This program sets up a new NixOS host locally. #+begin_src nix :tangle pkgs/swarsel-install/default.nix - { writeShellApplication, git }: - - writeShellApplication { + { self, writeShellApplication, git }: + let name = "swarsel-install"; + in + writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/swarsel-install.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -3457,12 +3479,14 @@ This program sets up a new NixOS host locally. #+begin_src nix :tangle pkgs/swarsel-postinstall/default.nix - { writeShellApplication, git }: - - writeShellApplication { + { self, writeShellApplication, git }: + let name = "swarsel-postinstall"; + in + writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/swarsel-postinstall.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } #+end_src @@ -3474,7 +3498,7 @@ This program sets up a new NixOS host locally. This script allows for quick git branch switching. #+begin_src nix :tangle pkgs/t2ts/default.nix - { writeShellApplication }: + { writeShellApplication, ... }: writeShellApplication { name = "t2ts"; @@ -3494,7 +3518,7 @@ This script allows for quick git branch switching. This script allows for quick git branch switching. #+begin_src nix :tangle pkgs/ts2t/default.nix - { writeShellApplication }: + { writeShellApplication, ... }: writeShellApplication { name = "ts2t"; @@ -3511,7 +3535,7 @@ This script allows for quick git branch switching. This script allows for quick git branch switching. #+begin_src nix :tangle pkgs/vershell/default.nix - { writeShellApplication }: + { writeShellApplication, ... }: writeShellApplication { name = "vershell"; @@ -3528,7 +3552,7 @@ This script allows for quick git branch switching. This script allows for quick git branch switching. #+begin_src nix :tangle pkgs/eontimer/default.nix - { pkgs, python3Packages }: + { pkgs, python3Packages, ... }: python3Packages.buildPythonApplication rec { pname = "eontimer"; @@ -3590,7 +3614,7 @@ This file now holds all of the "nixpkgs-changes" that I am using across the conf When adding a new entry here, do not forget to add it in the default output of this file, otherwise it will not be exposed to the rest of the system. #+begin_src nix :tangle overlays/default.nix - { self,inputs, lib, ... }: + { self, inputs, lib, ... }: let additions = final: _: import "${self}/pkgs" { pkgs = final; inherit lib; }; @@ -4167,7 +4191,7 @@ At work I am using several services that are using SSO login - however, as I am Set in firefox =about:config > toolkit.legacyUserProfileCustomizations.stylesheets= to true. This should in principle be set automatically using the below config, but it seems not to be working reliably #+begin_src nix :noweb yes :tangle modules/home/firefox.nix -{ lib, pkgs, ... }: +{ self, lib, pkgs, ... }: let lock-false = { Value = false; @@ -4183,7 +4207,7 @@ Set in firefox =about:config > toolkit.legacyUserProfileCustomizations.styleshee type = lib.types.attrs; default = { isDefault = false; - userChrome = builtins.readFile ../../programs/firefox/chrome/userChrome.css; + userChrome = builtins.readFile "${self}/programs/firefox/chrome/userChrome.css"; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ tridactyl tampermonkey diff --git a/lib/default.nix b/lib/default.nix index 639af2e..f452bc3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -65,7 +65,7 @@ mkPackages = names: pkgs: builtins.listToAttrs (map (name: { inherit name; - value = pkgs.callPackage "${self}/pkgs/${name}" { }; + value = pkgs.callPackage "${self}/pkgs/${name}" { inherit self; }; }) names); diff --git a/modules/home/firefox.nix b/modules/home/firefox.nix index ebcbc99..769ca03 100644 --- a/modules/home/firefox.nix +++ b/modules/home/firefox.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ self, lib, pkgs, ... }: let lock-false = { Value = false; @@ -14,7 +14,7 @@ in type = lib.types.attrs; default = { isDefault = false; - userChrome = builtins.readFile ../../programs/firefox/chrome/userChrome.css; + userChrome = builtins.readFile "${self}/programs/firefox/chrome/userChrome.css"; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ tridactyl tampermonkey diff --git a/pkgs/bak/default.nix b/pkgs/bak/default.nix index 3bd5041..50e57b2 100644 --- a/pkgs/bak/default.nix +++ b/pkgs/bak/default.nix @@ -1,8 +1,8 @@ -{ writeShellApplication }: +{ writeShellApplication, ... }: writeShellApplication { name = "bak"; text = '' - cp "$1"{,.bak} + cp -r "$1"{,.bak} ''; } diff --git a/pkgs/cdb/default.nix b/pkgs/cdb/default.nix index 6ff9705..fdf9064 100644 --- a/pkgs/cdb/default.nix +++ b/pkgs/cdb/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication, fzf }: +{ writeShellApplication, fzf, ... }: writeShellApplication { name = "cdb"; diff --git a/pkgs/cdw/default.nix b/pkgs/cdw/default.nix index 5d842be..190f7d2 100644 --- a/pkgs/cdw/default.nix +++ b/pkgs/cdw/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication, fzf }: +{ writeShellApplication, fzf, ... }: writeShellApplication { name = "cdw"; diff --git a/pkgs/cura5/default.nix b/pkgs/cura5/default.nix index fdde5f4..68905d8 100644 --- a/pkgs/cura5/default.nix +++ b/pkgs/cura5/default.nix @@ -1,5 +1,5 @@ # taken from https://github.com/NixOS/nixpkgs/issues/186570#issuecomment-1627797219 -{ appimageTools, fetchurl, writeScriptBin, pkgs }: +{ appimageTools, fetchurl, writeScriptBin, pkgs, ... }: let diff --git a/pkgs/e/default.nix b/pkgs/e/default.nix index 44ce262..f058ecb 100644 --- a/pkgs/e/default.nix +++ b/pkgs/e/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, emacs30-pgtk, sway, jq }: - -writeShellApplication { +{ self, writeShellApplication, emacs30-pgtk, sway, jq }: +let name = "e"; +in +writeShellApplication { + inherit name; runtimeInputs = [ emacs30-pgtk sway jq ]; - text = builtins.readFile ../../scripts/e.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/eontimer/default.nix b/pkgs/eontimer/default.nix index 7d085cb..9ba8da1 100644 --- a/pkgs/eontimer/default.nix +++ b/pkgs/eontimer/default.nix @@ -1,4 +1,4 @@ -{ pkgs, python3Packages }: +{ pkgs, python3Packages, ... }: python3Packages.buildPythonApplication rec { pname = "eontimer"; diff --git a/pkgs/fs-diff/default.nix b/pkgs/fs-diff/default.nix index d99453a..2ed8a34 100644 --- a/pkgs/fs-diff/default.nix +++ b/pkgs/fs-diff/default.nix @@ -1,6 +1,8 @@ -{ writeShellApplication }: - -writeShellApplication { +{ self, writeShellApplication }: +let name = "fs-diff"; - text = builtins.readFile ../../scripts/fs-diff.sh; +in +writeShellApplication { + inherit name; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/github-notifications/default.nix b/pkgs/github-notifications/default.nix index fe3977a..13d6099 100644 --- a/pkgs/github-notifications/default.nix +++ b/pkgs/github-notifications/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication, jq }: +{ writeShellApplication, jq, ... }: writeShellApplication { name = "github-notifications"; diff --git a/pkgs/hm-specialisation/default.nix b/pkgs/hm-specialisation/default.nix index 83ed443..285fcb9 100644 --- a/pkgs/hm-specialisation/default.nix +++ b/pkgs/hm-specialisation/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication, fzf, findutils, home-manager }: +{ writeShellApplication, fzf, findutils, home-manager, ... }: writeShellApplication { name = "hm-specialisation"; diff --git a/pkgs/opacitytoggle/default.nix b/pkgs/opacitytoggle/default.nix index e1ba6e2..6223df3 100644 --- a/pkgs/opacitytoggle/default.nix +++ b/pkgs/opacitytoggle/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, sway }: - -writeShellApplication { +{ self, writeShellApplication, sway }: +let name = "opacitytoggle"; +in +writeShellApplication { + inherit name; runtimeInputs = [ sway ]; - text = builtins.readFile ../../scripts/opacitytoggle.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/pass-fuzzel/default.nix b/pkgs/pass-fuzzel/default.nix index ba1418a..a8cfba1 100644 --- a/pkgs/pass-fuzzel/default.nix +++ b/pkgs/pass-fuzzel/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, libnotify, pass, fuzzel, wtype }: - -writeShellApplication { +{ self, writeShellApplication, libnotify, pass, fuzzel, wtype }: +let name = "pass-fuzzel"; +in +writeShellApplication { + inherit name; runtimeInputs = [ libnotify (pass.withExtensions (exts: [ exts.pass-otp ])) fuzzel wtype ]; - text = builtins.readFile ../../scripts/pass-fuzzel.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/screenshare/default.nix b/pkgs/screenshare/default.nix index aafd8f7..bc3819e 100644 --- a/pkgs/screenshare/default.nix +++ b/pkgs/screenshare/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, sway }: - -writeShellApplication { +{ self, writeShellApplication, sway }: +let name = "screenshare"; +in +writeShellApplication { + inherit name; runtimeInputs = [ sway ]; - text = builtins.readFile ../../scripts/screenshare.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/swarsel-bootstrap/default.nix b/pkgs/swarsel-bootstrap/default.nix index b4cc8de..f8bfb3d 100644 --- a/pkgs/swarsel-bootstrap/default.nix +++ b/pkgs/swarsel-bootstrap/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, openssh }: - -writeShellApplication { +{ self, writeShellApplication, openssh }: +let name = "swarsel-bootstrap"; +in +writeShellApplication { + inherit name; runtimeInputs = [ openssh ]; - text = builtins.readFile ../../scripts/swarsel-bootstrap.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/swarsel-install/default.nix b/pkgs/swarsel-install/default.nix index 6b3c4b2..e61a540 100644 --- a/pkgs/swarsel-install/default.nix +++ b/pkgs/swarsel-install/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, git }: - -writeShellApplication { +{ self, writeShellApplication, git }: +let name = "swarsel-install"; +in +writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/swarsel-install.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/swarsel-postinstall/default.nix b/pkgs/swarsel-postinstall/default.nix index 6191846..9b278f7 100644 --- a/pkgs/swarsel-postinstall/default.nix +++ b/pkgs/swarsel-postinstall/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, git }: - -writeShellApplication { +{ self, writeShellApplication, git }: +let name = "swarsel-postinstall"; +in +writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/swarsel-postinstall.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/swarsel-rebuild/default.nix b/pkgs/swarsel-rebuild/default.nix index cb80eda..2225126 100644 --- a/pkgs/swarsel-rebuild/default.nix +++ b/pkgs/swarsel-rebuild/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, git }: - -writeShellApplication { +{ self, writeShellApplication, git }: +let name = "swarsel-rebuild"; +in +writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/swarsel-rebuild.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/swarselcheck/default.nix b/pkgs/swarselcheck/default.nix index 681debc..be6a182 100644 --- a/pkgs/swarselcheck/default.nix +++ b/pkgs/swarselcheck/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }: - -writeShellApplication { +{ self, writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }: +let name = "swarselcheck"; +in +writeShellApplication { + inherit name; runtimeInputs = [ kitty element-desktop-wayland vesktop spotify-player jq ]; - text = builtins.readFile ../../scripts/swarselcheck.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/t2ts/default.nix b/pkgs/t2ts/default.nix index 49bacef..aad3e6a 100644 --- a/pkgs/t2ts/default.nix +++ b/pkgs/t2ts/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication }: +{ writeShellApplication, ... }: writeShellApplication { name = "t2ts"; diff --git a/pkgs/timer/default.nix b/pkgs/timer/default.nix index 37c5d08..92b9558 100644 --- a/pkgs/timer/default.nix +++ b/pkgs/timer/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication, speechd }: +{ writeShellApplication, speechd, ... }: writeShellApplication { name = "timer"; diff --git a/pkgs/ts2t/default.nix b/pkgs/ts2t/default.nix index 276a7f5..e09d193 100644 --- a/pkgs/ts2t/default.nix +++ b/pkgs/ts2t/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication }: +{ writeShellApplication, ... }: writeShellApplication { name = "ts2t"; diff --git a/pkgs/update-checker/default.nix b/pkgs/update-checker/default.nix index 9459aba..908b9b2 100644 --- a/pkgs/update-checker/default.nix +++ b/pkgs/update-checker/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, nvd }: - -writeShellApplication { +{ self, writeShellApplication, nvd }: +let name = "update-checker"; +in +writeShellApplication { + inherit name; runtimeInputs = [ nvd ]; - text = builtins.readFile ../../scripts/update-checker.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; } diff --git a/pkgs/vershell/default.nix b/pkgs/vershell/default.nix index 12d3e15..16dea35 100644 --- a/pkgs/vershell/default.nix +++ b/pkgs/vershell/default.nix @@ -1,4 +1,4 @@ -{ writeShellApplication }: +{ writeShellApplication, ... }: writeShellApplication { name = "vershell"; diff --git a/pkgs/waybarupdate/default.nix b/pkgs/waybarupdate/default.nix index a879a32..9438ba1 100644 --- a/pkgs/waybarupdate/default.nix +++ b/pkgs/waybarupdate/default.nix @@ -1,7 +1,9 @@ -{ writeShellApplication, git }: - -writeShellApplication { +{ self, writeShellApplication, git }: +let name = "waybarupdate"; +in +writeShellApplication { + inherit name; runtimeInputs = [ git ]; - text = builtins.readFile ../../scripts/waybarupdate.sh; + text = builtins.readFile "${self}/scripts/${name}.sh"; }