semantics

This commit is contained in:
Daylin Morgan 2024-09-03 12:01:32 -05:00
parent 0b0132ee6d
commit dba9b0c0e1
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 7 additions and 8 deletions

View file

@ -33,7 +33,7 @@ overlay:
echo nixosConfigAttrs().join(" ")
proc update(yes: bool = false) =
## *TBD* update and run nixos-rebuild
## *TBI* update and run nixos-rebuild
fatal "not implemented"
proc build(minimal: bool = false) =
@ -41,7 +41,7 @@ overlay:
nixBuild(minimal, rest)
proc cache(name: string = "daylin") =
## *TBD* build and push to cachix
## *TBI* build and push to cachix
fatal "not implemented"
proc osCmd() =
@ -52,8 +52,7 @@ overlay:
error (
&"unknown nixos-rebuild subcmd: {subcmd}\nexpected one of: \n" &
nixosSubcmds.mapIt(" " & it).join("\n")
)
quit QuitFailure
); quit QuitFailure
nixosRebuild(subcmd, rest[1..^1])
proc ci(`ref`: string = "main") =
@ -67,7 +66,7 @@ proc checkExes() =
quit("oizys requires nix", QuitFailure)
proc `//`(t1: Table[string, string], t2: Table[string, string]): Table[string, string] =
# nix style table merge
# nix style shallow table merge
for k, v in t1.pairs(): result[k] = v
for k, v in t2.pairs(): result[k] = v

View file

@ -38,7 +38,7 @@ const defaultFlushThreshold = lvlAll
proc genFmtStr(
fmtPrefix, fmtSep, fmtSuffix, levelBb: string,
level: Level
): string =
): string =
var parts: seq[string]
if fmtPrefix != "": parts.add fmtPrefix
parts.add $LevelNames[level].bb(levelBb)
@ -58,8 +58,8 @@ proc newFancyConsoleLogger*(
warnBb: string = "bold yellow",
errorBb: string = "bold red",
fatalBb: string = "bold red"
): FancyConsoleLogger =
## Creates a new `ColoredConsoleLogger<#ConsoleLogger>`_.
): FancyConsoleLogger =
## Creates a new `FancyConsoleLogger<#ConsoleLogger>`_.
new result
let fmtStrs: array[Level, string] = [
genFmtStr(fmtPrefix,fmtSep, fmtSuffix, "", lvlAll),