What does “not work” mean in this context? Does your DE not automatically bring up a mount button on your desktop, are you attempting to mount manually and it fails, or does the device not show up in the kernel?
You’ll have to install usbutils
for that:
# Somewhere in /etc/configuration.nix
environment.systemPackages = with pkgs; [
usbutils
];
lsblk
is pre-installed and should help you find device names for manual mounting, too.
Your nixos channel is missing - that probably means you’ve explicitly deleted it for some reason. You won’t be able to rebuild your system or install anything either. You’re on an outdated NixOS release (and a way outdated home-manager one as well), so for now add back the outdated 23.11 channel:
sudo nix-channel --add https://channels.nixos.org/nixos-23.11 nixos
sudo nix-channel --update
That should allow you to run that command, and build your configuration again.
Once you’ve got your channel back and can build configs again, consider upgrading to NixOS 24.05. You should read the release notes, and then run:
sudo nix-channel --add https://channels.nixos.org/nixos-24.05 nixos
sudo nix-channel --update
After that update any configuration mentioned in the release notes, rebuild with nixos-rebuild boot --use-remote-sudo
and reboot.
Should your system not boot properly, remember that you can go back to an old generation using the grub/systemd-boot menu.
Also update your home-manager config, since you’re running it standalone you have to do that manually. This might be more painful since you’ve missed at least a full year of updates, but the commands are:
nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
nix-channel --update
home-manager switch