I appreciate your patience and the careful thought you have put in these responses.
I have tried both sets of commands. They both show different errors and a flakes issue persists. Here they are:
First suggestion
$ sudo -i
# export NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels
nixos-rebuild switch --upgrade-all
unpacking 1 channels...
unpacking 1 channels...
error: attribute 'system' missing
at «string»:1:33:
1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
| ^
building Nix...
error: attribute 'nix' in selection path 'config.nix.package.out' not found
error: opening file '/nix/store/bjr17hv9r2fqk5g13wm8ij5rlddgl5ny-user-environment/default.nix': No such file or directory
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)
/tmp/nixos-rebuild.CHQkKS/nix
building the system configuration...
error: expression does not evaluate to a derivation (or a set or list of those)
#
Second suggestion
$ sudo NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels nixos-rebuild switch --upgrade-all
unpacking 1 channels...
unpacking 1 channels...
error:
… while calling the 'import' builtin
at «string»:1:6:
1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
| ^
… while realising the context of a path
… while calling the 'findFile' builtin
at «string»:1:13:
1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
| ^
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
building Nix...
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
/tmp/nixos-rebuild.FtUBIg/nix
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
building the system configuration...
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
$
Noted. I made the change to my configuration.nix but stashed the changes effectively removing those lines.
It’s bed time for me too now. I will be back tomorrow when I can. Hopefully you @Torinthiel or another forum member can jump in here and advise on some things we can try next.