refactor: pkgs paths to self

This commit is contained in:
Leon Schwarzäugl 2024-12-29 00:23:43 +01:00
parent b71bb5794a
commit d397be861b
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
26 changed files with 174 additions and 126 deletions

View file

@ -1,8 +1,8 @@
{ writeShellApplication }:
{ writeShellApplication, ... }:
writeShellApplication {
name = "bak";
text = ''
cp "$1"{,.bak}
cp -r "$1"{,.bak}
'';
}

View file

@ -1,4 +1,4 @@
{ writeShellApplication, fzf }:
{ writeShellApplication, fzf, ... }:
writeShellApplication {
name = "cdb";

View file

@ -1,4 +1,4 @@
{ writeShellApplication, fzf }:
{ writeShellApplication, fzf, ... }:
writeShellApplication {
name = "cdw";

View file

@ -1,5 +1,5 @@
# taken from https://github.com/NixOS/nixpkgs/issues/186570#issuecomment-1627797219
{ appimageTools, fetchurl, writeScriptBin, pkgs }:
{ appimageTools, fetchurl, writeScriptBin, pkgs, ... }:
let

View file

@ -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";
}

View file

@ -1,4 +1,4 @@
{ pkgs, python3Packages }:
{ pkgs, python3Packages, ... }:
python3Packages.buildPythonApplication rec {
pname = "eontimer";

View file

@ -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";
}

View file

@ -1,4 +1,4 @@
{ writeShellApplication, jq }:
{ writeShellApplication, jq, ... }:
writeShellApplication {
name = "github-notifications";

View file

@ -1,4 +1,4 @@
{ writeShellApplication, fzf, findutils, home-manager }:
{ writeShellApplication, fzf, findutils, home-manager, ... }:
writeShellApplication {
name = "hm-specialisation";

View file

@ -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";
}

View file

@ -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";
}

View file

@ -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";
}

View file

@ -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";
}

View file

@ -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";
}

View file

@ -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";
}

View file

@ -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";
}

View file

@ -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";
}

View file

@ -1,4 +1,4 @@
{ writeShellApplication }:
{ writeShellApplication, ... }:
writeShellApplication {
name = "t2ts";

View file

@ -1,4 +1,4 @@
{ writeShellApplication, speechd }:
{ writeShellApplication, speechd, ... }:
writeShellApplication {
name = "timer";

View file

@ -1,4 +1,4 @@
{ writeShellApplication }:
{ writeShellApplication, ... }:
writeShellApplication {
name = "ts2t";

View file

@ -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";
}

View file

@ -1,4 +1,4 @@
{ writeShellApplication }:
{ writeShellApplication, ... }:
writeShellApplication {
name = "vershell";

View file

@ -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";
}