Compare commits
2 commits
c3900591be
...
62a6893709
Author | SHA1 | Date | |
---|---|---|---|
Patrick | 62a6893709 | ||
Patrick | 420ca309d9 |
|
@ -164,6 +164,7 @@
|
|||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
packages = pkgs;
|
||||
|
||||
topology = import nix-topology {
|
||||
inherit pkgs;
|
||||
|
|
|
@ -23,16 +23,13 @@ in
|
|||
rage
|
||||
nix
|
||||
nix-diff
|
||||
nix-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;
|
||||
}
|
|
@ -10,7 +10,7 @@ writeShellApplication {
|
|||
runtimeInputs = [ps procps xdotool jq];
|
||||
text = ''
|
||||
|
||||
if [[ $XDG_CURRENT_DESKTOP == sway ]]; then
|
||||
if [[ ''${XDG_CURRENT_DESKTOP-} == sway ]]; then
|
||||
PAREN=$(swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true).pid')
|
||||
else
|
||||
PAREN=$(xdotool getwindowfocus getwindowpid)
|
||||
|
|
Loading…
Reference in a new issue