Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when doing a nixos-rebuild #10

Open
hmajid2301 opened this issue Aug 28, 2024 · 2 comments
Open

Errors when doing a nixos-rebuild #10

hmajid2301 opened this issue Aug 28, 2024 · 2 comments

Comments

@hmajid2301
Copy link

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

@spikespaz
Copy link
Collaborator

Please check if it works with the rewrite branch.

hyprnix.url = "github:hyprland-community/hyprnix/rewrite";

@hmajid2301
Copy link
Author

Hey I seem to be getting issues with catpuccin/nix now

┏━ 1 Errors:
 ⋮
┃              |           ^
┃          1576|         else
┃
┃        … while evaluating the attribute 'value'
┃          at /nix/store/ia1zpg1s63v6b3vin3n7bxxjgcs51s2r-source/lib/modules.nix:821:9:
┃           820|     in warnDeprecation opt //
┃           821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
┃              |         ^
┃           822|         inherit (res.defsFinal') highestPrio;
┃
┃        … while evaluating the option `system.build.toplevel':
┃
┃        … while evaluating definitions from `/nix/store/ia1zpg1s63v6b3vin3n7bxxjgcs51s2r-source/nixos/modules/system/activation/top-level.nix':
┃
┃        … while evaluating the option `assertions':
┃
┃        … while evaluating definitions from `/nix/store/cllqwnqqr2nci1l1b3fpr9f28vd4arfq-source/nixos/common.nix':
┃
┃        (stack trace truncated; use '--show-trace' to show the full, detailed trace)
┃
┃        error: The option `home-manager.users.haseeb.wayland.windowManager.hyprland.settings."\$accent"' does not exist. Definition values:
┃        - In `/nix/store/2phys7y5pxk5dvp489ipx67hl9gzw4jr-source/modules/home-manager/hyprland.nix':
┃            {
┃              _type = "if";
┃              condition = false;
┃              content = "$mauve";
┃            } 

I tried to follow the issue #9

dots: https://gitlab.com/hmajid2301/dotfiles/-/blob/docker-vps/modules/home/desktops/hyprland/config.nix?ref_type=heads#L14

looks like it could be this change causing issues ? catppuccin/nix@512306a adding new attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants