diff options
Diffstat (limited to '')
| -rwxr-xr-x | pkgs/by-name/ll/ll/ll.sh | 29 | ||||
| -rw-r--r-- | pkgs/by-name/sy/systemd-toggle/package.nix (renamed from pkgs/by-name/ll/ll/package.nix) | 19 |
2 files changed, 12 insertions, 36 deletions
diff --git a/pkgs/by-name/ll/ll/ll.sh b/pkgs/by-name/ll/ll/ll.sh deleted file mode 100755 index e012cffa..00000000 --- a/pkgs/by-name/ll/ll/ll.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env dash - -# 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>. - -last_directory="$(mktemp)" -cleanup() { - rm "$last_directory" -} -trap cleanup EXIT - -command lf -last-dir-path="$last_directory" "$@" - -dir="$(cat "$last_directory")" -if cd "$dir"; then - [ -d "$XDG_RUNTIME_DIR/ll" ] || mkdir "$XDG_RUNTIME_DIR/ll" - echo "$dir" >"$XDG_RUNTIME_DIR/ll/last_directory" -else - die "$dir does not exist!" -fi - -# vim: ft=sh diff --git a/pkgs/by-name/ll/ll/package.nix b/pkgs/by-name/sy/systemd-toggle/package.nix index 6e4ee336..04ed576f 100644 --- a/pkgs/by-name/ll/ll/package.nix +++ b/pkgs/by-name/sy/systemd-toggle/package.nix @@ -7,12 +7,17 @@ # # 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>. -{writeShellApplication}: +{ + writeShellApplication, + systemd, +}: writeShellApplication { - name = "ll"; - text = builtins.readFile ./ll.sh; - - # This is sourced in the shell - inheritPath = true; - bashOptions = []; + name = "systemd-toggle"; + text = builtins.readFile ./systemd-toggle.sh; + runtimeInputs = [ + systemd + ]; + meta = { + mainProgram = "systemd-toggle"; + }; } |
