mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 18:30:43 -06:00
styx will do the heavy lifting
This commit is contained in:
parent
246f47af20
commit
d8972aae6c
2 changed files with 28 additions and 19 deletions
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
||||||
https://hyprland.cachix.org
|
https://hyprland.cachix.org
|
||||||
https://nixpkgs-wayland.cachix.org
|
https://nixpkgs-wayland.cachix.org
|
||||||
https://daylin.cachix.org
|
https://daylin.cachix.org
|
||||||
cache.nixos.org
|
https://cache.nixos.org
|
||||||
|
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
- uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||||
- uses: cachix/cachix-action@v14
|
- uses: cachix/cachix-action@v14
|
||||||
|
@ -48,16 +48,11 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# for host in algiz othalan mannaz
|
|
||||||
for host in ${HOSTS[@]}
|
for host in ${HOSTS[@]}
|
||||||
do
|
do
|
||||||
cachix watch-exec daylin \
|
./modules/styx/styx cache --host $host --flake .
|
||||||
-- \
|
|
||||||
nix build \
|
|
||||||
".#nixosConfigurations.$host.config.system.build.toplevel" \
|
|
||||||
--print-build-logs
|
|
||||||
done
|
done
|
||||||
- name: Push
|
# - name: Push
|
||||||
env:
|
# env:
|
||||||
CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"
|
# CACHIX_ACTIVATE_TOKEN: "${{ secrets.CACHIX_ACTIVATE_TOKEN }}"
|
||||||
run: cachix push daylin ./result
|
# run: cachix push daylin ./result
|
||||||
|
|
|
@ -4,7 +4,8 @@ set -e
|
||||||
|
|
||||||
# rewrite as python script?
|
# rewrite as python script?
|
||||||
|
|
||||||
FLAKE_PATH=$HOME/nixcfg
|
HOSTNAME=${HOSTNAME:-$(hostname)}
|
||||||
|
FLAKE_PATH=${FLAKE_PATH-:$HOME/nixcfg}
|
||||||
|
|
||||||
DIM="$(tput dim)"
|
DIM="$(tput dim)"
|
||||||
BOLD="$(tput bold)"
|
BOLD="$(tput bold)"
|
||||||
|
@ -69,6 +70,14 @@ dry() {
|
||||||
nix build "$FLAKE_PATH#nixosConfigurations.$(hostname).config.system.build.toplevel" --dry-run
|
nix build "$FLAKE_PATH#nixosConfigurations.$(hostname).config.system.build.toplevel" --dry-run
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cache() {
|
||||||
|
cachix watch-exec daylin \
|
||||||
|
-- \
|
||||||
|
nix build "$FLAKE_PATH#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel" \
|
||||||
|
--print-build-logs
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
log no command specified see below for help
|
log no command specified see below for help
|
||||||
help
|
help
|
||||||
|
@ -76,17 +85,20 @@ fi
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
fmt | boot | switch | store | build | dry)
|
fmt | boot | switch | store | build | dry | cache)
|
||||||
cmd=$1
|
cmd=$1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-h | --help)
|
-f | --flake)
|
||||||
help
|
FLAKE_PATH="$2"
|
||||||
|
shift; shift;
|
||||||
;;
|
;;
|
||||||
--)
|
-h | --host)
|
||||||
# stop parsing and foward the rest of the args
|
HOSTNAME="$2"
|
||||||
shift
|
shift; shift;
|
||||||
break
|
;;
|
||||||
|
--help)
|
||||||
|
help
|
||||||
;;
|
;;
|
||||||
-*,--*)
|
-*,--*)
|
||||||
error "unknown flag: ${BOLD}$1${RESET}"
|
error "unknown flag: ${BOLD}$1${RESET}"
|
||||||
|
@ -103,4 +115,6 @@ if [[ $# -gt 0 ]]; then
|
||||||
echo "forwarding args: ${BOLD}$*${RESET}"
|
echo "forwarding args: ${BOLD}$*${RESET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$cmd "$@"
|
$cmd "$@"
|
||||||
|
|
Loading…
Reference in a new issue