meat
This commit is contained in:
parent
c8ee397794
commit
7f3dc64568
10 changed files with 302 additions and 47 deletions
54
flakes/meat/src/meat
Executable file
54
flakes/meat/src/meat
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cmd=${1:help}
|
||||
shift
|
||||
|
||||
|
||||
call_nix() {
|
||||
cd $(dirname $0)
|
||||
nixpkgs_pin=$(nix eval --raw -f npins/default.nix nixpkgs)
|
||||
nix_path="nixpkgs=${nixpkgs_pin}:nixos-config=${HOME}/.nix/entry.nix"
|
||||
local cmd=$1
|
||||
shift
|
||||
env NIX_PATH="${nix_path}" nixos-rebuild "$cmd" --fast "$@"
|
||||
}
|
||||
|
||||
cd $FLAKE
|
||||
case $cmd in
|
||||
look)
|
||||
nix flake show
|
||||
;;
|
||||
|
||||
fresh)
|
||||
nix flake update "$@"
|
||||
;;
|
||||
|
||||
yum)
|
||||
nh os switch -- "$@"
|
||||
# call_nix switch "$@"
|
||||
;;
|
||||
|
||||
cook)
|
||||
nh os build "$@"
|
||||
# call_nix build "$@"
|
||||
;;
|
||||
|
||||
poke)
|
||||
nh os build -- --show-trace "$@"
|
||||
# call_nix build --show-trace "$@"
|
||||
;;
|
||||
|
||||
help|*)
|
||||
printf "
|
||||
--- MEAT ---------------------------------------------
|
||||
|
||||
FRESH \t\t| GET LATEST MEAT
|
||||
YUM \t\t| CONSUME DELICIOUS MEAT
|
||||
COOK \t\t| ONLY PREPARE MEAT
|
||||
POKE \t\t| TRY COOK SUSPICIOUS MEAT
|
||||
LOOK \t\t| INSPECT MEATS
|
||||
|
||||
------------------------------------------------------\n"
|
||||
;;
|
||||
esac
|
||||
cd $PWD
|
Loading…
Add table
Add a link
Reference in a new issue