Skip to content

Errors when doing a nixos-rebuild [fixed by rewrite] #10

Open
@hmajid2301

Description

Hi,

I am not sure if this is an issue with this flake or something else, so please let me know.
But when I do a nixos-rebuild

sudo nixos-rebuild switch --flake ~/dotfiles#workstation

Aug 28 15:13:01 workstation hm-activate-haseeb[1618486]: Writing syntax set to /home/haseeb/.local/cache/bat/syntaxes.bin ... okay
Aug 28 15:13:01 workstation hm-activate-haseeb[1618486]: Writing metadata to folder /home/haseeb/.local/cache/bat ... okay
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating createXdgUserDirectories
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating installPackages
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating dconfSettings
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating onFilesChange
Aug 28 15:13:01 workstation hm-activate-haseeb[1618529]: /nix/store/jjkp2xgjd882g59aqszh6zqm8inpdz8w-home-manager-generation/activate: line 382: HYPRLAND_INSTANCE_SIGNATURE: unbound variable
Aug 28 15:13:01 workstation systemd[1]: home-manager-haseeb.service: Main process exited, code=exited, status=1/FAILURE
Aug 28 15:13:01 workstation systemd[1]: home-manager-haseeb.service: Failed with result 'exit-code'.
Aug 28 15:13:01 workstation systemd[1]: Failed to start Home Manager environment for haseeb.

Looking at the journalctl

> journalctl -xeu home-manager-haseeb.service

Aug 28 15:13:01 workstation hm-activate-haseeb[1618486]: Writing metadata to folder /home/haseeb/.local/cache/bat ... okay
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating createXdgUserDirectories
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating installPackages
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating dconfSettings
Aug 28 15:13:01 workstation hm-activate-haseeb[1617597]: Activating onFilesChange
Aug 28 15:13:01 workstation hm-activate-haseeb[1618529]: /nix/store/jjkp2xgjd882g59aqszh6zqm8inpdz8w-home-manager-generation/activate: line 382: HYPRLAND_INSTANCE_SIGNATURE: unbound variable
Aug 28 15:13:01 workstation systemd[1]: home-manager-haseeb.service: Main process exited, code=exited, status=1/FAILURE

Looking at the lines in the activate script, causing an error, seems to be coming from this script.

  XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
  if [[ -d "$XDG_RUNTIME_DIR/hypr" ]]; then
    for instance in $(/nix/store/i7drl25lsfhzq7m9nccbdb25x6sa9mzj-hyprland-0.42.0/bin/hyprctl instances -j | jq ".[].instance" -r); do
      response="$(/nix/store/i7drl25lsfhzq7m9nccbdb25x6sa9mzj-hyprland-0.42.0/bin/hyprctl -i "$instance" reload config-only 2>&1)"
      [[ $response =~ ^ok ]] && \
        echo "Hyprland instance reloaded: $HYPRLAND_INSTANCE_SIGNATURE"
    done
  fi

However, I do not get any errors when doing a home-manager rebuild, weirdly enough.

❯ home-manager switch --flake ~/dotfiles#haseeb@workstation

Starting Home Manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating createGpgHomedir
Activating linkGeneration
Cleaning up orphan links from /home/haseeb
No change so reusing latest profile generation 607
Creating home file links in /home/haseeb
Activating batCache
No syntaxes were found in '/home/haseeb/.config/bat/syntaxes', using the default set.
Writing theme set to /home/haseeb/.local/cache/bat/themes.bin ... okay
Writing syntax set to /home/haseeb/.local/cache/bat/syntaxes.bin ... okay
Writing metadata to folder /home/haseeb/.local/cache/bat ... okay
Activating createXdgUserDirectories
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating dconfSettings
Activating onFilesChange
Hyprland instance reloaded: 9a09eac79b85c846e3a865a9078a3f8ff65a9259_1724780052_359788226
Activating reloadSystemd
Starting units: hyprland-session.target, kdeconnect-indicator.service, kdeconnect.service, sops-nix.service

Any help would be greatly appreciated.

Hyprland Config: https://gitlab.com/hmajid2301/dotfiles/-/tree/main/modules/home/desktops/hyprland?ref_type=heads

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions