mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
Compare commits
5 commits
f3eb0a78aa
...
fb848dfa1b
Author | SHA1 | Date | |
---|---|---|---|
fb848dfa1b | |||
02e668f2b2 | |||
b634a2fca6 | |||
3d663c381b | |||
7869e1374d |
7 changed files with 38 additions and 37 deletions
30
flake.lock
30
flake.lock
|
@ -240,11 +240,11 @@
|
||||||
"zig": "zig"
|
"zig": "zig"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731182230,
|
"lastModified": 1731351056,
|
||||||
"narHash": "sha256-fFMFH0n+4r9NL/AobvFwSs+PA+F5yiOiImkfi3RJF2k=",
|
"narHash": "sha256-a779DeG+HXRR5Gy/pU47KI/1xeLdeYoA8gyopRRseW4=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "72659d48ac0e27d815fb8b0b96eb8aa2614a4dd9",
|
"rev": "70b984ebaff9fb9e80e0332a00eaac7b45b52e1d",
|
||||||
"revCount": 7940,
|
"revCount": 7942,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@github.com/ghostty-org/ghostty"
|
"url": "ssh://git@github.com/ghostty-org/ghostty"
|
||||||
},
|
},
|
||||||
|
@ -318,11 +318,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731279191,
|
"lastModified": 1731340175,
|
||||||
"narHash": "sha256-9gJ3G8j9yUmzZdluh3fZoSN4qj/Y4XZgl2hsa8sdCwg=",
|
"narHash": "sha256-IfE7lqNFfFyzAu3pe2XTeNovU9tVzJeGLzQ2B8Segy0=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "c10739e6e35c30ef5f273bfe5d219d361a31e226",
|
"rev": "f5fa84554ffe55e29a397014964238be89ffa54d",
|
||||||
"revCount": 5438,
|
"revCount": 5448,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/hyprwm/Hyprland/"
|
"url": "https://github.com/hyprwm/Hyprland/"
|
||||||
|
@ -498,11 +498,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731235488,
|
"lastModified": 1731334117,
|
||||||
"narHash": "sha256-RMv1RqyGy88LnKx3XWqVuKlTxdZW6oB4K72LdndM2ZM=",
|
"narHash": "sha256-GoddkPg0/UDv06KcQJiOYP/2IzruYorbI03QRCjN3K8=",
|
||||||
"rev": "d1d96cc4c8bd661a65c6159039a9d7e7e8fdf771",
|
"rev": "8a9094303bc7873c979e54ea20b9f50464ee3965",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/d1d96cc4c8bd661a65c6159039a9d7e7e8fdf771.tar.gz?rev=d1d96cc4c8bd661a65c6159039a9d7e7e8fdf771"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/8a9094303bc7873c979e54ea20b9f50464ee3965.tar.gz?rev=8a9094303bc7873c979e54ea20b9f50464ee3965"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
@ -745,11 +745,11 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731277985,
|
"lastModified": 1731353483,
|
||||||
"narHash": "sha256-s6hkbXZSSlIxsP7RwmPt/OTfgkmMC+HDQaZcjGaiVog=",
|
"narHash": "sha256-0IZPqgc4k/VqP3yLhNw8QbiPRq56Cl07ewRv7aqQZIw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "7722c64bdf19304754fbcf05722348e340514ccd",
|
"rev": "e71b4345d9aebca98d9ea91eb5f86d57f804f6d6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
2
pkgs/oizys/.gitignore
vendored
2
pkgs/oizys/.gitignore
vendored
|
@ -1,5 +1,5 @@
|
||||||
nimbledeps
|
nimbledeps
|
||||||
nimble.paths
|
nimble.paths
|
||||||
nimble.develop
|
nimble.develop
|
||||||
|
bin/
|
||||||
oizys.out
|
oizys.out
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
task build, "build oizys":
|
|
||||||
selfExec "c -o:oizys src/oizys.nim"
|
|
||||||
|
|
||||||
# begin Nimble config (version 2)
|
# begin Nimble config (version 2)
|
||||||
--noNimblePath
|
--noNimblePath
|
||||||
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
when withDir(thisDir(), system.fileExists("nimble.paths")):
|
||||||
|
|
|
@ -8,7 +8,7 @@ buildNimblePackage {
|
||||||
verions = "unstable";
|
verions = "unstable";
|
||||||
src = lib.cleanSource ./.;
|
src = lib.cleanSource ./.;
|
||||||
nativeBuildInputs = [ openssl ];
|
nativeBuildInputs = [ openssl ];
|
||||||
nimbleDepsHash = "sha256-/H/HvnJqpDJcyVJ2rbn7PDSSoJB/TMr9yiIKxtB1O+E=";
|
nimbleDepsHash = "sha256-ZEPzosRwokkvPKbv5nqzATv6IqUhqM2prOU0vUUC80Q=";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "nix begat oizys";
|
description = "nix begat oizys";
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"hwylterm": {
|
"hwylterm": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"vcsRevision": "e8e090c5b76bc555231bda536193df6f92a54db2",
|
"vcsRevision": "65a952e9f0d75659d39f8a3b146753e291ee0a66",
|
||||||
"url": "https://github.com/daylinmorgan/hwylterm",
|
"url": "https://github.com/daylinmorgan/hwylterm",
|
||||||
"downloadMethod": "git",
|
"downloadMethod": "git",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"checksums": {
|
"checksums": {
|
||||||
"sha1": "925aad3ce660979de7cdb2f58a31dc7ac693e34d"
|
"sha1": "10894d492bbe1d0ea32ee9bb0686abfcd3b0b0fe"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jsony": {
|
"jsony": {
|
||||||
|
|
|
@ -13,5 +13,5 @@ bin = @["oizys"]
|
||||||
requires "nim >= 2.0.8"
|
requires "nim >= 2.0.8"
|
||||||
requires "jsony"
|
requires "jsony"
|
||||||
requires "zippy"
|
requires "zippy"
|
||||||
requires "https://github.com/daylinmorgan/hwylterm#e8e090c"
|
requires "https://github.com/daylinmorgan/hwylterm#65a952e"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
## nix begat oizys
|
## nix begat oizys
|
||||||
import std/[os, osproc, sequtils, strformat, strutils]
|
import std/[os, osproc, sequtils, strformat, strutils]
|
||||||
import hwylterm, hwylterm/[hwylcli, logging]
|
import hwylterm, hwylterm/[hwylcli]
|
||||||
import oizys/[context, github, nix, logging]
|
import oizys/[context, github, nix, logging]
|
||||||
|
|
||||||
proc checkExes() =
|
proc checkExes() =
|
||||||
|
@ -13,47 +13,49 @@ hwylCli:
|
||||||
name "oizys"
|
name "oizys"
|
||||||
flags:
|
flags:
|
||||||
[global]
|
[global]
|
||||||
flake "path/to/flake"
|
flake:
|
||||||
|
T string
|
||||||
|
? "path/to/flake"
|
||||||
host:
|
host:
|
||||||
T seq[string]
|
T seq[string]
|
||||||
? "host(s) to build"
|
? "host(s) to build"
|
||||||
debug:
|
debug:
|
||||||
T bool
|
|
||||||
? "enable debug mode"
|
? "enable debug mode"
|
||||||
- d
|
- d
|
||||||
resetCache:
|
resetCache:
|
||||||
T bool
|
|
||||||
? "set cache timeout to 0"
|
? "set cache timeout to 0"
|
||||||
- r
|
- r
|
||||||
[yes]
|
[yes]
|
||||||
yes:
|
yes:
|
||||||
T bool
|
- y
|
||||||
? "skip all confirmation prompts"
|
? "skip all confirmation prompts"
|
||||||
[minimal]
|
[minimal]
|
||||||
minimal:
|
minimal:
|
||||||
T bool
|
|
||||||
? "set minimal"
|
? "set minimal"
|
||||||
- m
|
- m
|
||||||
|
|
||||||
preSub:
|
preSub:
|
||||||
setupLoggers(debug)
|
setupLoggers(debug)
|
||||||
updateContext(host, flake, debug, resetCache)
|
updateContext(host, flake, debug, resetCache)
|
||||||
|
|
||||||
subcommands:
|
subcommands:
|
||||||
|
|
||||||
--- build
|
[build]
|
||||||
... "nix build"
|
... "nix build"
|
||||||
flags:
|
flags:
|
||||||
^[minimal]
|
^[minimal]
|
||||||
run:
|
run:
|
||||||
nixBuild(minimal, args)
|
nixBuild(minimal, args)
|
||||||
|
|
||||||
--- cache
|
[cache]
|
||||||
... "build and push store paths"
|
... "build and push store paths"
|
||||||
flags:
|
flags:
|
||||||
name:
|
name:
|
||||||
|
T string
|
||||||
? "name of binary cache"
|
? "name of binary cache"
|
||||||
* "oizys"
|
* "oizys"
|
||||||
service:
|
service:
|
||||||
|
T string
|
||||||
? "name of cache service"
|
? "name of cache service"
|
||||||
* "attic"
|
* "attic"
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -64,24 +66,25 @@ hwylCli:
|
||||||
run:
|
run:
|
||||||
nixBuildWithCache(name, args, service, jobs)
|
nixBuildWithCache(name, args, service, jobs)
|
||||||
|
|
||||||
--- ci
|
[ci]
|
||||||
... "trigger GHA"
|
... "trigger GHA"
|
||||||
flags:
|
flags:
|
||||||
`ref`:
|
`ref`:
|
||||||
|
T string
|
||||||
? "git ref/branch/tag to trigger workflow on"
|
? "git ref/branch/tag to trigger workflow on"
|
||||||
* "main"
|
* "main"
|
||||||
run:
|
run:
|
||||||
if args.len == 0: fatalQuit "expected workflow file name"
|
if args.len == 0: fatalQuit "expected workflow file name"
|
||||||
createDispatch(args[0], `ref`)
|
createDispatch(args[0], `ref`)
|
||||||
|
|
||||||
--- dry
|
[dry]
|
||||||
... "dry run build"
|
... "dry run build"
|
||||||
flags:
|
flags:
|
||||||
^[minimal]
|
^[minimal]
|
||||||
run:
|
run:
|
||||||
nixBuildHostDry(minimal, args)
|
nixBuildHostDry(minimal, args)
|
||||||
|
|
||||||
--- os
|
[os]
|
||||||
? "[b]oizys os[/] [i]subcmd[/] [[[faint]flags[/]]"
|
? "[b]oizys os[/] [i]subcmd[/] [[[faint]flags[/]]"
|
||||||
... "nixos-rebuild [italic]subcmd[/]"
|
... "nixos-rebuild [italic]subcmd[/]"
|
||||||
run:
|
run:
|
||||||
|
@ -94,16 +97,17 @@ hwylCli:
|
||||||
)
|
)
|
||||||
nixosRebuild(subcmd, args[1..^1])
|
nixosRebuild(subcmd, args[1..^1])
|
||||||
|
|
||||||
--- output
|
[output]
|
||||||
... "nixos config attr"
|
... "nixos config attr"
|
||||||
run:
|
run:
|
||||||
echo nixosConfigAttrs().join(" ")
|
echo nixosConfigAttrs().join(" ")
|
||||||
|
|
||||||
--- update
|
[update]
|
||||||
... "update and run nixos-rebuild"
|
... "update and run nixos-rebuild"
|
||||||
flags:
|
flags:
|
||||||
^[yes]
|
^[yes]
|
||||||
preview:
|
preview:
|
||||||
|
- p
|
||||||
T bool
|
T bool
|
||||||
? "show preview and exit"
|
? "show preview and exit"
|
||||||
run:
|
run:
|
||||||
|
@ -116,4 +120,4 @@ hwylCli:
|
||||||
if yes or confirm("Proceed with system update?"):
|
if yes or confirm("Proceed with system update?"):
|
||||||
updateRepo()
|
updateRepo()
|
||||||
nixosRebuild("switch")
|
nixosRebuild("switch")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue