After I make configuration changes, I cannot log in to the graphical interface and tty interface
I want use unstables Plasmadesktop version, edit configuration.nix:
sudo nix-channel --add https://mirrors.ustc.edu.cn/nix-channels/nixpkgs-unstable/ unstable
sudo nix-channel --list
sudo nix-channel --update unstable
# configuration.nix edit libsForQt514.plasma-desktop
services.xserver.displayManager.sddm.enable = false;
nixpkgs.config.packageOverrides = pkgs: {
unstable = import <unstable> {
config = config.nixpkgs.config;
};
};
environment = {
systemPackages = with pkgs; [
unstable.libsForQt514.plasma-desktop
];
};
reboot
# Then the system cannot be accessed, and many services fail: img1.png
1.I tried to record grub history, but failed
2.grub add single in , but failed, err mgs: Login incorrect
3.i try into usb live system, Attempt to restore file, but failed
# Attempt to restore file, but failed
vi /mnt/etc/nixos/configuration.nix
services.xserver.displayManager.sddm.enable = true;
nixos-install --root /mnt
# so many chown err
reboot
Something is terribly wrong in your setup, but I can’t tell you why.
I’d recommend using nixos-install like you did the first time after mounting your system partitions from a NixOS livecd, it should properly rebuild a new profile using your current configuration. Make sure to have backups of course, but it shouldn’t damage anything.
# Finally, reinstall and retain the home data
vi /mnt/etc/nixos/configuration.nix
mount /dev/nvme0n1p2 /mnt
cd /mnt
# delete all data, but /home
rm -rf bin boot data dev etc lib nix opt proc result root run srv swp sys tmp usr var
# install
nixos-install --root /mnt
# chroot in system
nixos-enter --root '/mnt'
# set root passwd
passwd
# set my jcleng passwd
passwd jcleng