mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-21 17:40: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]
|
||||
... "nixos config attr"
|
||||
flags:
|
||||
system:
|
||||
? "get system path installables"
|
||||
^minimal
|
||||
run:
|
||||
if not system:
|
||||
if not minimal:
|
||||
echo nixosConfigAttrs().join(" ")
|
||||
else:
|
||||
echo getSystemPathDrvs().mapIt(it & "^*").join("\n")
|
||||
showOizysDerivations()
|
||||
|
||||
[update]
|
||||
... "update and run nixos-rebuild"
|
||||
|
|
|
@ -211,6 +211,11 @@ proc getOizysDerivations(): seq[OizysDerivation] =
|
|||
drv: drv,
|
||||
)
|
||||
|
||||
proc showOizysDerivations*() =
|
||||
let drvs = getOizysDerivations()
|
||||
echo drvs.mapIt(it.name & "^*").join("\n")
|
||||
|
||||
|
||||
# TODO: remove this proc
|
||||
proc systemPathDrvsToBuild*(): 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:
|
||||
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() =
|
||||
info "getting updated flake.lock as updated.lock"
|
||||
let res = runCmdCapt("git --no-pager show origin/flake-lock:flake.lock")
|
||||
|
|
Loading…
Reference in a new issue