mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
add fall back for pinix to oizys
This commit is contained in:
parent
40fb99a47b
commit
53e6e9951c
2 changed files with 16 additions and 3 deletions
|
@ -17,6 +17,14 @@ proc error(args: varargs[string, `$`]) =
|
|||
args.join("")
|
||||
)
|
||||
|
||||
proc warn(args: varargs[string, `$`]) =
|
||||
stdout.styledWriteLine(
|
||||
fgCyan, "oizys", resetStyle, "|",
|
||||
fgYellow, "WARN", resetStyle, "| ",
|
||||
args.join("")
|
||||
)
|
||||
|
||||
|
||||
type
|
||||
OizysContext = object
|
||||
flake, host: string
|
||||
|
@ -43,7 +51,13 @@ proc check(c: OizysContext) =
|
|||
info "host: ", c.host
|
||||
|
||||
proc cmd(c: OizysContext): string {.inline.} =
|
||||
if c.pinix: "pix" else: "nix"
|
||||
let pixExists = findExe("pix") != ""
|
||||
if c.pinix:
|
||||
if pixExists:
|
||||
return "pix"
|
||||
else:
|
||||
warn "pinix not found, falling back to nix"
|
||||
return "nix"
|
||||
|
||||
proc systemFlakePath(c: OizysContext): string =
|
||||
c.flake & "#nixosConfigurations." & c.host & ".config.system.build.toplevel"
|
||||
|
|
3
todo.md
3
todo.md
|
@ -1,8 +1,7 @@
|
|||
# oizys todo's
|
||||
|
||||
- [ ] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet
|
||||
- [-] add graceful fall back for oizys-cli if pinix isn't installed system-wide yet
|
||||
- [ ] trackdown wezterm bug... (try building from flake?)
|
||||
> https://github.com/wez/wezterm/issues/5067
|
||||
- [ ] add auto-sleep functionality to hyprland environment
|
||||
|
||||
<!-- generated with <3 by daylinmorgan/todo -->
|
||||
|
|
Loading…
Reference in a new issue