add more docs

This commit is contained in:
Daylin Morgan 2024-01-29 10:31:18 -06:00
parent a60746c374
commit 275b5ca82a
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
5 changed files with 91 additions and 11 deletions

View file

@ -1,3 +1,70 @@
# oizys
<div align="center">
<h1>oizys</h1>
<p>nix begat oizys</p>
</div>
This is a custom multi-host [nixos](https://nixos.org) flake.
See below for the currently maintained hosts.
## hosts
<table>
<tr>
<th>rune</th>
<th>name</th>
<th>system</th>
</tr>
<tr>
<td><img src="https://upload.wikimedia.org/wikipedia/commons/7/70/Runic_letter_othalan.svg"></td>
<td>othalan</td>
<td>Thinkpad Carbon X1 Gen 9</td>
</tr>
<tr>
<td><img src="https://upload.wikimedia.org/wikipedia/commons/d/df/Runic_letter_algiz.svg"></td>
<td>algiz</td>
<td>Vultr VPS hosting forgejo,soft-serve & gts</td>
</tr>
<tr>
<td><img src="https://upload.wikimedia.org/wikipedia/commons/5/57/Runic_letter_mannaz.svg"></td>
<td>mannaz</td>
<td>Custom AMD Tower with Nvidia 1050ti</td>
</tr>
</table>
## oizys cli
A small helper utility that mostly just wraps `nix` commands for convenience.
```sh
nix run "github:daylinmorgan/oizys"
```
```
oizys <cmd> [opts]
commands:
dry poor man's nix flake check
boot nixos-rebuild boot
switch nixos-rebuild switch
cache build and push to cachix
build build system flake
options:
-h|--help show this help
--host hostname (current host)
-f|--flake path to flake ($FLAKE_PATH or $HOME/styx)
-c|--cache name of cachix binary cache (daylin)
--no-nom don't use nix-output-monitor
```
## oizys?
Oizys was birthed by the goddess Nyx/Nix and embodies suffering and misery. Which is all that awaits you if you embrace nix.
---
> **NOTE**
> I don't use home-manager to manager my shell/user configs. You can find those in my separate `chezmoi`-managed [`dotfiles`](https://git.dayl.in/daylin/dotfiles) repository.
[![](https://github.com/daylinmorgan/oizys/actions/workflows/build.yml/badge.svg)](https://github.com/daylinmorgan/oizys/actions/workflows/build.yml)

View file

@ -1,6 +1,6 @@
<div align="center">
<img src="https://upload.wikimedia.org/wikipedia/commons/d/df/Runic_letter_algiz.svg">
<h1>Algiz</h1>
<h1>algiz</h1>
</div>
## Setting up git user for use with gitea originally

View file

@ -1,5 +1,5 @@
<div align="center">
<img src="https://upload.wikimedia.org/wikipedia/commons/5/57/Runic_letter_mannaz.svg">
<h1>Mannaz</h1>
<h1>mannaz</h1>
</div>

View file

@ -1,5 +1,5 @@
<div align="center">
<img src="https://upload.wikimedia.org/wikipedia/commons/7/70/Runic_letter_othalan.svg">
<h1>Othalan</h1>
<h1>othalan</h1>
</div>

View file

@ -14,7 +14,7 @@ proc info(args: varargs[string, `$`]) =
proc error(args: varargs[string, `$`]) =
stdout.styledWriteLine(
fgCyan, "oizys", resetStyle, "|",
styleDim, "ERROR", resetStyle, "| ",
fgRed, "ERROR", resetStyle, "| ",
args.join("")
)
@ -32,6 +32,17 @@ proc newCtx(): OizysContext =
result.flake = getEnv("FLAKE_PATH", getEnv("HOME") / "oizys")
result.host = getHostname()
proc check(c: OizysContext) =
if not dirExists c.flake:
error c.flake, " does not exist"
error "please use -f/--flake or $FLAKE_PATH"
quit 1
info "flake: ", c.flake
info "host: ", c.host
proc systemFlakePath(c: OizysContext): string =
c.flake & "#nixosConfigurations." & c.host & ".config.system.build.toplevel"
@ -87,12 +98,14 @@ oizys <cmd> [opts]
build build system flake
options:
-h|--help > show this help
--host > hostname (current host)
-f|--flake > path to flake ($FLAKE_PATH or $HOME/styx)
-c|--cache > name of cachix binary cache (daylin)
-h|--help show this help
--host hostname (current host)
-f|--flake path to flake ($FLAKE_PATH or $HOME/styx)
-c|--cache name of cachix binary cache (daylin)
--no-nom don't use nix-output-monitor
"""
proc runCmd(c: OizysContext, cmd: string) =
case cmd:
of "dry": dry c
@ -134,5 +147,5 @@ when isMainModule:
echo "please specify a command"
echo usage; quit 1
info $c
check c
runCmd c, cmd