diff --git a/pkgs/oizys/src/oizys.nim b/pkgs/oizys/src/oizys.nim index 8af6be9..ab38178 100644 --- a/pkgs/oizys/src/oizys.nim +++ b/pkgs/oizys/src/oizys.nim @@ -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" diff --git a/pkgs/oizys/src/oizys/nix.nim b/pkgs/oizys/src/oizys/nix.nim index d6c6923..d32a833 100644 --- a/pkgs/oizys/src/oizys/nix.nim +++ b/pkgs/oizys/src/oizys/nix.nim @@ -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")