mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
use "host" instead path
This commit is contained in:
parent
4171629934
commit
610d339b59
1 changed files with 8 additions and 4 deletions
|
@ -67,21 +67,25 @@ func ParseDryRunOutput(nixOutput string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NixDryRun(flake string, host string) {
|
func NixDryRun(flake string, host string) {
|
||||||
|
output := termenv.NewOutput(os.Stdout)
|
||||||
path := Output(flake, host)
|
path := Output(flake, host)
|
||||||
cmd := exec.Command("nix", "build", path, "--dry-run")
|
cmd := exec.Command("nix", "build", path, "--dry-run")
|
||||||
s := spinner.New(
|
s := spinner.New(
|
||||||
spinner.CharSets[14],
|
spinner.CharSets[14],
|
||||||
100*time.Millisecond,
|
100*time.Millisecond,
|
||||||
spinner.WithSuffix(" evaluating derivation for: "+path),
|
spinner.WithSuffix(
|
||||||
|
fmt.Sprintf("%s %s", " evaluating derivation for:",
|
||||||
|
output.String(host).Bold().Foreground(output.Color("6")),
|
||||||
|
)),
|
||||||
spinner.WithColor("fgHiMagenta"))
|
spinner.WithColor("fgHiMagenta"))
|
||||||
s.Start()
|
s.Start()
|
||||||
output, err := cmd.CombinedOutput()
|
result, err := cmd.CombinedOutput()
|
||||||
s.Stop()
|
s.Stop()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(string(output))
|
fmt.Println(string(result))
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
ParseDryRunOutput(string(output))
|
ParseDryRunOutput(string(result))
|
||||||
}
|
}
|
||||||
|
|
||||||
func NixosRebuild(subcmd string, flake string, rest ...string) {
|
func NixosRebuild(subcmd string, flake string, rest ...string) {
|
||||||
|
|
Loading…
Reference in a new issue