cleanup minify
This commit is contained in:
parent
c3900591be
commit
420ca309d9
|
@ -23,16 +23,13 @@ in
|
|||
rage
|
||||
nix
|
||||
nix-diff
|
||||
nixpkgs-update
|
||||
];
|
||||
commands = [
|
||||
{
|
||||
package = pkgs.deploy;
|
||||
help = "build and deploy nix configurations";
|
||||
}
|
||||
{
|
||||
package = pkgs.minify;
|
||||
help = "build and deploy nix configurations";
|
||||
}
|
||||
{
|
||||
package = pkgs.agenix-rekey;
|
||||
help = "Edit and rekey repository secrets";
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
actual = super.callPackage ./actual.nix {};
|
||||
homebox = super.callPackage ./homebox.nix {};
|
||||
deploy = super.callPackage ./deploy.nix {};
|
||||
minify = super.callPackage ./minify {};
|
||||
j-link = super.callPackage ./jlink.nix {};
|
||||
firefly-iii = super.callPackage ./firefly-iii.nix {};
|
||||
mongodb-bin = super.callPackage ./mongodb-bin.nix {};
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{writeShellApplication}:
|
||||
writeShellApplication {
|
||||
name = "minify";
|
||||
text = ''
|
||||
set -euo pipefail
|
||||
function die { echo "error: $*" >&2; exit 1;}
|
||||
function print_help() {
|
||||
echo ' Usage: minify <flake> [OPTION]'
|
||||
}
|
||||
|
||||
OPTIONS=()
|
||||
POSITIONAL_ARGS=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
"help"|"--help"|"-h")
|
||||
show_help
|
||||
exit 1
|
||||
;;
|
||||
-*)
|
||||
OPTIONS+=("$1")
|
||||
;;
|
||||
*)
|
||||
POSITIONAL_ARGS+=("$1")
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[[ ! ''${#POSITIONAL_ARGS[@]} -lt 1 ]] \
|
||||
|| die "Missing argument: <flake>"
|
||||
[[ ! ''${#POSITIONAL_ARGS[@]} -gt 2 ]] \
|
||||
|| die "Too many arguments"
|
||||
|
||||
path=$(realpath "''${POSITIONAL_ARGS[0]}")
|
||||
nix eval --impure --argstr path "$path" --file ${./minify.nix} "erg"
|
||||
'';
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{path}: let
|
||||
flake = builtins.getFlake path;
|
||||
in {
|
||||
erg = builtins.mapAttrs (name: value: builtins.mapAttrs (name: value: name) value.inputs) flake.inputs;
|
||||
}
|
Loading…
Reference in a new issue