Giter VIP home page Giter VIP logo

Comments (13)

dustinlyons avatar dustinlyons commented on May 2, 2024

Hmm, something must have went wrong during install. Before rebooting, you should have been given an option to set a password. This is the root password.

Can you login as root in the terminal and share the output of

journalctl -xb

and

systemctl list-unit-files --state=enabled

?

from nixos-config.

daniel-heppner-ibigroup avatar daniel-heppner-ibigroup commented on May 2, 2024

from nixos-config.

dustinlyons avatar dustinlyons commented on May 2, 2024

Okay, that actually looks okay. What happens if you try this?

sudo systemctl start lightdm

from nixos-config.

daniel-heppner-ibigroup avatar daniel-heppner-ibigroup commented on May 2, 2024

Sorry about my above comment including email garbage. I'll reply from GitHub UI.

I'm getting
Unit lightdm.service not found.. I saw that Syncthing is there, so it seems like some elements of the nix configuration applied.

It's not clear to me what your installer actually does. Where does the config end up for the system?

from nixos-config.

dustinlyons avatar dustinlyons commented on May 2, 2024

It runs this script:

#!/usr/bin/env bash
set -exu

check_installer() {
  if [ -e /etc/NIXOS ]; then
    echo -e "\e[1;32mRunning in the NixOS installer environment.\e[0m"
  else
    echo -e "\e[1;31mNot running in the NixOS installer environment.\e[0m"
    exit 1
  fi
}

cleanup() {
  rm -rf nixos-config-main.zip nixos-config-main nixos-config
}

download_config() {
  curl -LJ0 https://github.com/dustinlyons/nixos-config/archive/main.zip -o nixos-config-main.zip
  unzip nixos-config-main.zip
  mv nixos-config-main/templates/starter nixos-config
  cd nixos-config
}

run_apply() {
  ./apps/x86_64-linux/apply
  if [ ! -f /tmp/username.txt ]; then
    echo -e "\e[1;31mError: /tmp/username.txt does not exist.\e[0m"
    exit 1
  fi
  export USERNAME=$(cat /tmp/username.txt)
}

run_disko() {
  sudo nix run --extra-experimental-features nix-command --extra-experimental-features flakes \
    github:nix-community/disko -- --mode zap_create_mount ./modules/nixos/disk-config.nix
}

setup_files() {
  sudo mkdir -p /mnt/etc/nixos
  sudo cp -r * /mnt/etc/nixos
  cd /mnt/etc/nixos
}

install_nixos() {
  ARCH=$(uname -m)

  case "$ARCH" in
    x86_64)
      FLAKE_TARGET="x86_64-linux"
      ;;
    aarch64)
      FLAKE_TARGET="aarch64-linux"
      ;;
    *)
      echo -e "${RED}Unsupported architecture: $ARCH${CLEAR}"
      exit 1
      ;;
  esac

  sudo nixos-install --flake .#$FLAKE_TARGET $@
  sudo chmod -R 775 /mnt/etc/nixos
}

prompt_reboot() {
  read -p "Do you want to reboot now? (y/yes) " choice
  case "$choice" in
  y|Y|yes|YES ) echo -e "\e[1;32mRebooting...\e[0m" && sudo reboot;;
  * ) echo -e "\e[1;33mReboot skipped.\e[0m";;
  esac
}

cleanup
check_installer
download_config
run_apply
run_disko
setup_files
install_nixos
cleanup
prompt_reboot

You can check /etc/nixos and ensure the configuration is there. This project doesn't use a traditional configuration.nix, it's all built on flakes.

If you see the configuration, you can try to deploy it again to generate any errors:

nixos-rebuild switch --flake .#x86_64-linux

from nixos-config.

dustinlyons avatar dustinlyons commented on May 2, 2024

That last command assumes the flake is in the current working directory.

. - current directory

# - flake target

x86_64-linux - target inside flake.nix defined as "x86_64-linux"

from nixos-config.

daniel-heppner-ibigroup avatar daniel-heppner-ibigroup commented on May 2, 2024

No errors upon running the deployment again. Looking around, I saw some lines under the xserver config for GPU drivers. I uncommented the lines for AMD, as I have an AMD GPU. However, (and I think this is a bug), the following lines are wrong since they're positioned under the services.xserver object, but it seems like they need to be on the top level.

      # Uncomment these for AMD GPU
      # boot.initrd.kernelModules = [ "amdgpu" ];
      # services.xserver.videoDrivers = [ "amdgpu" ];

I figured that out and upon rebooting I saw the AMD driver load, but still no display output and the lightdm service is not found.

from nixos-config.

daniel-heppner-ibigroup avatar daniel-heppner-ibigroup commented on May 2, 2024

In journalctl -u display-manager I see that it attempts to start on each boot but immediately shuts down.

from nixos-config.

dustinlyons avatar dustinlyons commented on May 2, 2024

Okay, this is good you're surfacing this. I will eventually need to add to the installer the choice for nvidia and AMD and then choose the right options accordingly.

You're right that it needs to be at the top level, and videoDrivers = [ "nvidia" ] just needs to be videoDrivers = [ "amdgpu" ].

Here is the info on AMD GPUs:
https://nixos.wiki/wiki/AMD_GPU

I'm not sure which card you have. Does this help at all?

from nixos-config.

daniel-heppner-ibigroup avatar daniel-heppner-ibigroup commented on May 2, 2024

I have a fairly recent card, a 6700XT.

I think I have the drivers configured correctly, but I'm still not getting a GUI. I haven't used lightdm before either, but running lightdm on the shell as root gets me a Failed to use bus name: org.freeddesktop.DisplayManager, do you have appropriate permissions?

I also see a "Failed to get D-Bus connection" in the journal for display-manager from an earlier reboot, but the more recent reboots it seems to be starting successfully.

from nixos-config.

dustinlyons avatar dustinlyons commented on May 2, 2024

A few things to try:

systemctl list-unit-files --type=service | grep -E 'gdm|sddm|lightdm|xdm'

to check if multiple display managers are installed for some reason

sudo systemctl restart dbus

to restart the dbus to see any errors

journalctl -u lightdm and journalctl -u dbus

to check for errors

Remove this in the hosts/nixos.config

      screenSection = ''
        Option       "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
        Option       "AllowIndirectGLXProtocol" "off"
        Option       "TripleBuffer" "on"
      '';

not needed for AMD GPUs

or try to remove this for another displayManager

      displayManager.lightdm = {
        enable = true;
        greeters.slick.enable = true;
        background = ../../modules/nixos/config/login-wallpaper.png;
      };

Display manager options: https://search.nixos.org/options?channel=23.11&from=0&size=50&sort=relevance&type=packages&query=displayManager

from nixos-config.

dustinlyons avatar dustinlyons commented on May 2, 2024

Hi @daniel-heppner-ibigroup , any luck?
Lots of good examples here of folks using AMD GPUs in their Nix configuration: https://github.com/search?q=initrd.kernelModules+%3D+%5B+%22amdgpu%22+%5D%3B&type=code

I'd love to help but unfortunately don't have an AMD GPU to test.

from nixos-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.