This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / tools / s / flake-module.nix
617 B 28 lines
1{ self, ... }: 2{ 3 perSystem = 4 { pkgs, ... }: 5 { 6 packages.s = pkgs.writers.writeDashBin "s" '' 7 set -efu 8 9 # Use local checkout if it exists, otherwise fall back to self 10 if [ -d "$HOME/src/superconfig" ]; then 11 flake="$HOME/src/superconfig" 12 else 13 flake="${self}" 14 fi 15 16 if [ $# -eq 0 ]; then 17 echo "Usage: s <package> [args...]" >&2 18 echo "Runs a package from superconfig ($flake)" >&2 19 exit 1 20 fi 21 22 pkg="$1" 23 shift 24 25 exec ${pkgs.nix}/bin/nix run "$flake#$pkg" -- "$@" 26 ''; 27 }; 28}