real meat hours
This commit is contained in:
parent
d4a800971f
commit
0de0a3898a
7 changed files with 217 additions and 78 deletions
|
@ -1,43 +1,44 @@
|
|||
#!/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
|
||||
|
||||
printf "MEAT v0.0.1\n"
|
||||
|
||||
case $cmd in
|
||||
|
||||
look)
|
||||
nix flake show
|
||||
nix flake info
|
||||
;;
|
||||
|
||||
fresh)
|
||||
nix flake update $@
|
||||
if [[ "${#@}" > 0 ]]; then
|
||||
for f in $@; do
|
||||
if [ -d "./flakes/$f" ]; then
|
||||
nix flake update --flake "./flakes/$f"
|
||||
nix flake update $@
|
||||
fi
|
||||
done
|
||||
else
|
||||
for f in ./flakes/*; do
|
||||
nix flake update --flake "$f"
|
||||
done
|
||||
nix flake update
|
||||
fi
|
||||
;;
|
||||
|
||||
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|*)
|
||||
|
@ -52,5 +53,7 @@ case $cmd in
|
|||
|
||||
------------------------------------------------------\n"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
cd $PWD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue