From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- overlays/morph/default.nix | 5 ---- overlays/morph/dry-run.patch | 59 ---------------------------------------- overlays/morph/verbose_nix.patch | 12 -------- 3 files changed, 76 deletions(-) delete mode 100644 overlays/morph/default.nix delete mode 100644 overlays/morph/dry-run.patch delete mode 100644 overlays/morph/verbose_nix.patch (limited to 'overlays/morph') diff --git a/overlays/morph/default.nix b/overlays/morph/default.nix deleted file mode 100644 index 448f051..0000000 --- a/overlays/morph/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -self: super: { - morph = super.morph.overrideAttrs(old: { - patches = (old.patches or []) ++ [ ./verbose_nix.patch ./dry-run.patch ]; - }); -} diff --git a/overlays/morph/dry-run.patch b/overlays/morph/dry-run.patch deleted file mode 100644 index 2ff099e..0000000 --- a/overlays/morph/dry-run.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/morph.go b/morph.go -index a88414b..e5894df 100644 ---- a/morph.go -+++ b/morph.go -@@ -542,6 +542,7 @@ func getNixContext() *nix.NixContext { - return &nix.NixContext{ - EvalMachines: filepath.Join(assetRoot, assets.Friendly, "eval-machines.nix"), - ShowTrace: showTrace, -+ DryRun: *dryRun, - KeepGCRoot: *keepGCRoot, - AllowBuildShell: *allowBuildShell, - } -@@ -574,8 +575,10 @@ func buildHosts(hosts []nix.Host) (resultPath string, err error) { - return - } - -- fmt.Fprintln(os.Stderr, "nix result path: ") -- fmt.Println(resultPath) -+ if resultPath != "" { -+ fmt.Fprintln(os.Stderr, "nix result path: ") -+ fmt.Println(resultPath) -+ } - return - } - -diff --git a/nix/nix.go b/nix/nix.go -index 6a9cfd5..0f7884b 100644 ---- a/nix/nix.go -+++ b/nix/nix.go -@@ -49,6 +49,7 @@ type Deployment struct { - type NixContext struct { - EvalMachines string - ShowTrace bool -+ DryRun bool - KeepGCRoot bool - AllowBuildShell bool - } -@@ -269,6 +270,10 @@ func (ctx *NixContext) BuildMachines(deploymentPath string, hosts []Host, nixArg - args = append(args, "--show-trace") - } - -+ if ctx.DryRun { -+ args = append(args, "--dry-run") -+ } -+ - if nixBuildTargets != "" { - args = append(args, - "--arg", "buildTargets", nixBuildTargets) -@@ -308,6 +313,10 @@ func (ctx *NixContext) BuildMachines(deploymentPath string, hosts []Host, nixArg - return resultPath, errors.New(errorMessage) - } - -+ if ctx.DryRun { -+ return "", err -+ } -+ - resultPath, err = os.Readlink(resultLinkPath) - if err != nil { - return "", err diff --git a/overlays/morph/verbose_nix.patch b/overlays/morph/verbose_nix.patch deleted file mode 100644 index 389a79c..0000000 --- a/overlays/morph/verbose_nix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/nix/nix.go b/nix/nix.go -index bb63870..7fe04aa 100644 ---- a/nix/nix.go -+++ b/nix/nix.go -@@ -347,6 +347,7 @@ func Push(ctx *ssh.SSHContext, host Host, paths ...string) (err error) { - options := mkOptions(host) - for _, path := range paths { - args := []string{ -+ "-v", - "copy", - path, - "--to", "ssh://" + userArg + host.TargetHost + keyArg, -- cgit v1.2.3