You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the feature flag and make the DetSys installer the default.
- Download the installer directly in case the system doesn't have curl.
- Expose the auto-install functionality in the public nix package so we
can reuse it elsewhere.
- Remove some checks that were only relevant to the old installer (WSL2
limitations and warnings about root).
The install logic is also now part of an `Installer` struct to provide
some flexibility around what install program is run and when it's
downloaded.
type Installer struct{ ... }
func (i *Installer) Download(ctx context.Context) error
func (i *Installer) Run(ctx context.Context) error
deferspinny.Stop() // reset the terminal in case of a panic
165
87
166
-
// Source again
167
-
if_, err=SourceProfile(); err!=nil {
88
+
err=installer.Download(ctx)
89
+
iferr!=nil {
90
+
returnerr
91
+
}
92
+
spinny.Stop()
93
+
} else {
94
+
fmt.Fprint(writer, "Downloading the Nix installer...")
95
+
err=installer.Download(ctx)
96
+
iferr!=nil {
97
+
fmt.Fprintln(writer)
98
+
returnerr
99
+
}
100
+
fmt.Fprintln(writer, " done.")
101
+
}
102
+
err=installer.Run(ctx)
103
+
iferr!=nil {
168
104
returnerr
169
105
}
170
106
171
107
fmt.Fprintln(writer, "Nix installed successfully. Devbox is ready to use!")
172
108
returnnil
173
109
}
174
-
175
-
funcisLinuxWithoutSystemd() bool {
176
-
ifbuild.OS() !=build.OSLinux {
177
-
returnfalse
178
-
}
179
-
// My best interpretation of https://github.com/DeterminateSystems/nix-installer/blob/66ad2759a3ecb6da345373e3c413c25303305e25/src/action/common/configure_init_service.rs#L108-L118
0 commit comments