mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
semantics
This commit is contained in:
parent
0b0132ee6d
commit
dba9b0c0e1
2 changed files with 7 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue