2022/11/09/Nix issue

From Mew
Jump to navigation Jump to search

the Nix upgrade script issue: Day Two

Tuesday Wednesday Thursday

Jacob Helwig suggested that I look at user groups. My user (woozle, i.e. my usual login on this machine) is indeed not in the nix-users group -- but adding myself to the nix-users group doesn't seem to help:

woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ nix develop --extra-experimental-features nix-command
error: getting status of /nix/var/nix/daemon-socket/socket: Permission denied

Permissions Problem [SOLVED]

Invoking sudo does at least produce a different result:

woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ sudo nix develop --extra-experimental-features nix-command
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override

I don't recall needing to jump through these hoops when I first ran this script, successfully, some months ago... but maybe it makes a difference that I'm now using a distro (Linux Mint 21) that is a little bit behind the distro I was using then (Ubuntu-MATE 22.04). Maybe Nix can be used to update itself to the most recent version?

A Nixpert (I don't know if she wants credit/identification) in the TootCat Discord is providing me with some more information, as is shadow!admin. The following command should override the error messages:

nix --extra-experimental-features 'nix-command flakes' develop

Explanation for why "develop" is outside the single-quotes: "develop is a subcommand. this is just nix develop but with some features enabled." I don't entirely understand that, but maybe it will make sense later, and it gives me a bit more context.

error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ nix --extra-experimental-features 'nix-command flakes' develop
error: getting status of /nix/var/nix/daemon-socket/socket: Permission denied

/sidetrack: why won't usermod work. [SOLVED]

Where I Was

Take 1:

woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ nix develop --extra-experimental-features nix-command
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override

Take 2:

woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ nix --extra-experimental-features 'nix-command flakes' develop
warning: Git tree '/mnt/teralap/home/woozle/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config' is dirty
error: flake 'git+file:///mnt/teralap/home/woozle/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config' does not provide attribute 'devShells.x86_64-linux.devShell.x86_64-linux', 'packages.x86_64- linux.devShell.x86_64-linux', 'legacyPackages.x86_64-linux.devShell.x86_64-linux', 'devShell.x86_64-linux' or 'defaultPackage.x86_64-linux'

Hmm...

woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ git pull origin
Already up to date.
woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ git status
"git-crypt" clean: 1: git-crypt: not found
error: external filter '"git-crypt" clean' failed 127
error: external filter '"git-crypt" clean' failed
fatal: secrets/mastodon/aws-secret-access-key: clean filter 'git-crypt' failed

Well, that obviously means something.

After installing git-crypt on the local system (which feels a bit like whacking the side of the TV, as opposed to knowing what I'm doing), it's now this:

woozle@SamEagle:~/nextcloud/statler/woozle/projects/web/Mastodon/TootCat/nixos-config$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   update.sh

no changes added to commit (use "git add" and/or "git commit -a")

...but the nix command still gives the same error.

Where We Are

...and then Nixpert seriously dived in and first helped me figure out a bunch of stuff, and then tidied up the repo and ran a merge of the latest GlitchSoc repo, and now we're doing a backup before finally running the update.

The backup may take too long to finish today, but it looks like the upgrade should happen in the next 24 hours.

Once that's done, there's some documentation to be updated and also the backup routines need to be fixed.