mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 06:00:45 -06:00
swap system with minimal
This commit is contained in:
parent
97dec41e79
commit
351af9045f
2 changed files with 8 additions and 46 deletions
|
@ -122,13 +122,12 @@ hwylCli:
|
||||||
[output]
|
[output]
|
||||||
... "nixos config attr"
|
... "nixos config attr"
|
||||||
flags:
|
flags:
|
||||||
system:
|
^minimal
|
||||||
? "get system path installables"
|
|
||||||
run:
|
run:
|
||||||
if not system:
|
if not minimal:
|
||||||
echo nixosConfigAttrs().join(" ")
|
echo nixosConfigAttrs().join(" ")
|
||||||
else:
|
else:
|
||||||
echo getSystemPathDrvs().mapIt(it & "^*").join("\n")
|
showOizysDerivations()
|
||||||
|
|
||||||
[update]
|
[update]
|
||||||
... "update and run nixos-rebuild"
|
... "update and run nixos-rebuild"
|
||||||
|
|
|
@ -211,6 +211,11 @@ proc getOizysDerivations(): seq[OizysDerivation] =
|
||||||
drv: drv,
|
drv: drv,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
proc showOizysDerivations*() =
|
||||||
|
let drvs = getOizysDerivations()
|
||||||
|
echo drvs.mapIt(it.name & "^*").join("\n")
|
||||||
|
|
||||||
|
|
||||||
# TODO: remove this proc
|
# TODO: remove this proc
|
||||||
proc systemPathDrvsToBuild*(): seq[string] =
|
proc systemPathDrvsToBuild*(): seq[string] =
|
||||||
var inputDrvs, dropped: seq[string]
|
var inputDrvs, dropped: seq[string]
|
||||||
|
@ -355,48 +360,6 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i
|
||||||
if pushErr != 0:
|
if pushErr != 0:
|
||||||
errorQuit "failed to push build to cache"
|
errorQuit "failed to push build to cache"
|
||||||
|
|
||||||
#[
|
|
||||||
- name: Build
|
|
||||||
run: >
|
|
||||||
nix run .
|
|
||||||
--
|
|
||||||
build
|
|
||||||
"$(nix run . -- output --host,=othalan,algiz,mannaz,naudiz --flake .)"
|
|
||||||
--flake .
|
|
||||||
--debug
|
|
||||||
--
|
|
||||||
--keep-going
|
|
||||||
--no-link
|
|
||||||
|
|
||||||
- run: git show origin/flake-lock:flake.lock > updated.lock
|
|
||||||
|
|
||||||
- name: Pre-build oizys
|
|
||||||
run: nix build . --reference-lock-file updated.lock
|
|
||||||
|
|
||||||
- name: Build Updated
|
|
||||||
run: >
|
|
||||||
nix run .
|
|
||||||
--
|
|
||||||
build
|
|
||||||
"$(nix run . -- output --host,=othalan,algiz,mannaz,naudiz --flake .)"
|
|
||||||
--flake .
|
|
||||||
--debug
|
|
||||||
--
|
|
||||||
--keep-going
|
|
||||||
--no-link
|
|
||||||
--reference-lock-file updated.lock
|
|
||||||
|
|
||||||
- run: |
|
|
||||||
for host in othalan algiz mannaz naudiz; do
|
|
||||||
for rev in current updated; do
|
|
||||||
args="\"$(nix run . -- output --host $host)\" --out-link \"${host}-${rev}\""
|
|
||||||
[[ "$rev" == "updated" ]] && args="$args --reference-lock-file updated.lock"
|
|
||||||
nix build $args
|
|
||||||
done
|
|
||||||
done
|
|
||||||
]#
|
|
||||||
|
|
||||||
|
|
||||||
proc getUpdatedLockFile() =
|
proc getUpdatedLockFile() =
|
||||||
info "getting updated flake.lock as updated.lock"
|
info "getting updated flake.lock as updated.lock"
|
||||||
let res = runCmdCapt("git --no-pager show origin/flake-lock:flake.lock")
|
let res = runCmdCapt("git --no-pager show origin/flake-lock:flake.lock")
|
||||||
|
|
Loading…
Reference in a new issue