mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
add more docs
This commit is contained in:
parent
a60746c374
commit
275b5ca82a
5 changed files with 91 additions and 11 deletions
71
README.md
71
README.md
|
@ -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)
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://upload.wikimedia.org/wikipedia/commons/d/df/Runic_letter_algiz.svg">
|
<img src="https://upload.wikimedia.org/wikipedia/commons/d/df/Runic_letter_algiz.svg">
|
||||||
<h1>Algiz</h1>
|
<h1>algiz</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Setting up git user for use with gitea originally
|
## Setting up git user for use with gitea originally
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://upload.wikimedia.org/wikipedia/commons/5/57/Runic_letter_mannaz.svg">
|
<img src="https://upload.wikimedia.org/wikipedia/commons/5/57/Runic_letter_mannaz.svg">
|
||||||
<h1>Mannaz</h1>
|
<h1>mannaz</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://upload.wikimedia.org/wikipedia/commons/7/70/Runic_letter_othalan.svg">
|
<img src="https://upload.wikimedia.org/wikipedia/commons/7/70/Runic_letter_othalan.svg">
|
||||||
<h1>Othalan</h1>
|
<h1>othalan</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ proc info(args: varargs[string, `$`]) =
|
||||||
proc error(args: varargs[string, `$`]) =
|
proc error(args: varargs[string, `$`]) =
|
||||||
stdout.styledWriteLine(
|
stdout.styledWriteLine(
|
||||||
fgCyan, "oizys", resetStyle, "|",
|
fgCyan, "oizys", resetStyle, "|",
|
||||||
styleDim, "ERROR", resetStyle, "| ",
|
fgRed, "ERROR", resetStyle, "| ",
|
||||||
args.join("")
|
args.join("")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,6 +32,17 @@ proc newCtx(): OizysContext =
|
||||||
result.flake = getEnv("FLAKE_PATH", getEnv("HOME") / "oizys")
|
result.flake = getEnv("FLAKE_PATH", getEnv("HOME") / "oizys")
|
||||||
result.host = getHostname()
|
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 =
|
proc systemFlakePath(c: OizysContext): string =
|
||||||
c.flake & "#nixosConfigurations." & c.host & ".config.system.build.toplevel"
|
c.flake & "#nixosConfigurations." & c.host & ".config.system.build.toplevel"
|
||||||
|
|
||||||
|
@ -87,12 +98,14 @@ oizys <cmd> [opts]
|
||||||
build build system flake
|
build build system flake
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-h|--help > show this help
|
-h|--help show this help
|
||||||
--host > hostname (current host)
|
--host hostname (current host)
|
||||||
-f|--flake > path to flake ($FLAKE_PATH or $HOME/styx)
|
-f|--flake path to flake ($FLAKE_PATH or $HOME/styx)
|
||||||
-c|--cache > name of cachix binary cache (daylin)
|
-c|--cache name of cachix binary cache (daylin)
|
||||||
|
--no-nom don't use nix-output-monitor
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
proc runCmd(c: OizysContext, cmd: string) =
|
proc runCmd(c: OizysContext, cmd: string) =
|
||||||
case cmd:
|
case cmd:
|
||||||
of "dry": dry c
|
of "dry": dry c
|
||||||
|
@ -134,5 +147,5 @@ when isMainModule:
|
||||||
echo "please specify a command"
|
echo "please specify a command"
|
||||||
echo usage; quit 1
|
echo usage; quit 1
|
||||||
|
|
||||||
info $c
|
check c
|
||||||
runCmd c, cmd
|
runCmd c, cmd
|
||||||
|
|
Loading…
Reference in a new issue