Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My flake installation keeps crashing. #602

Open
PlumpMath opened this issue Jan 29, 2023 · 10 comments
Open

My flake installation keeps crashing. #602

PlumpMath opened this issue Jan 29, 2023 · 10 comments

Comments

@PlumpMath
Copy link

My flake installation keeps crashing.
intel-mac Monterey was broken, so I solved it by reinstalling,
My intel-mac with ventura was broken after garbage collection today.

Luckily, I got the PATH information from the terminal that remembers the PATH setting,
Not erased, survived, but

NixOS/nix#3261

in the last month? In ventura, you need to reboot for nix-build to take effect.
When will it stabilize?

One of the two Macs is set up as home-manager, should I configure two test types.. I'm contemplating.

I hope the nix-darwin flake will be stabilized soon.

@PlumpMath
Copy link
Author

PlumpMath commented Jan 30, 2023

$ sudo nix-collect-garbage -d
$ sudo nix-store --gc --print-dead
$ sudo nix-store --optimise

After doing that, the ssl went away.
The function to set the initialization is erased. Because after restoring ssl by applying the ssl solution link above, nix build and switch are executed. However, it cannot restore the initial settings as before.

error: unable to download 'https://github.com/LnL7/nix-darwin/archive/master.tar.gz': Problem with the SSL CA cert (path? access rights?) (77)

The rest of the macs also lost ssl;;
I'll have to try reinstalling recovery.

First, I changed home-manager as main, (It is unknown whether the migrate work of home-manager can also restore env-vars initialization settings. I'll leave the results in the comments again.)

second.. install as basic(not flake method) nix-darwin for addon.

@PlumpMath
Copy link
Author

In the build where home-manager is the main one, initial setup problems such as environment variables are set up well without any problems.
Now all that remains is to add spice(nix-darwin) on top of hm.

@PlumpMath
Copy link
Author

PlumpMath commented Feb 2, 2023

Troubleshooting working... nix completely blown away.
I'm not sure why.
It looks like there is a problem with the garbage collection command above.

It's not because of nix-darwin (because the problem occurred in montery, which left only the home-manager where nix-darwin was deleted. )

Perhaps if ventura is also deleted after reboot ventura com, my garbage collector command is dangerous, and
It is probably recognized as a problem with nix itself, which is the core source.

https://nixos.org/guides/nix-pills/garbage-collector.html
Reading and re-arranging the documentation. (After rebooting, report the result.)

@PlumpMath
Copy link
Author

error: not linking environment.etc."nix/nix.conf" because /etc/nix/nix.conf already exists, skipping...
existing file has unknown content ff08c12813680da98c4240328f828647b67a65ba7aa89c022bd8072cba862cf1, move and activate again to apply

@PlumpMath
Copy link
Author

I adjusted garbage collection, deleted all of nix, and reinstalled.
I don't know why there was an error that was cleared by gc .

@bestlem
Copy link

bestlem commented Feb 3, 2023

A complete guess but if you use flakes then you don't use nix/nix.conf and so that could be gced away and so no existing link.

@andrewcrook
Copy link

error: unable to download 'https://github.com/LnL7/nix-darwin/archive/master.tar.gz': Problem with the SSL CA cert (path? access rights?) (77)

I have had that
its caused by either the file not existing and returning 404 or the parameters are wrong for the for example github: does take the full HTTPS path but rather github:/lnl7/nix-darwin or if pinned the hash for that revision eg"github:lnl7/nix-darwin/379d42fad6bc5c28f79d5f7ff2fa5f1c90cb7bf8"

@andrewcrook
Copy link

andrewcrook commented May 7, 2023

SSL CA cert

Main systems are not touched they remain safe in keychain

@PlumpMath
Copy link
Author

Recently, there haven't been any issues, and it doesn't crash. I'm not sure why, but for a while, I only did gc without sudo in nix-darwin.

@andrewcrook
Copy link

I only did gc without sudo in nix-darwin.

I am still unsure of many thinhs regarding NIX there is just so much incorrect and outdated information out there.
However, regarding nix for Darwin it sets up multiple user mode by default so I thought everything is done via the daemon which has root access, therefore, you don't need to use sudo. May be someone can verify that?

I think auto garbage collection and store optimisation settings are also carried out by the daemon, if enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants