Skip to content

updating NixOS with flakes fails #323

@Stunkymonkey

Description

@Stunkymonkey

What did you expect to happen?

updates NixOS with flakes

What actually happened?

fails

Additional Details

  • Which operating system or Linux distribution are you using? NixOS
  • How did you install Topgrade? nixpkgs
  • Which version are you running? Topgrade 10.1.2
topgrade --dry-run

―― 21:53:11 - System update ――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /run/wrappers/bin/sudo /run/current-system/sw/bin/nixos-rebuild switch --upgrade

―― 21:53:11 - Nix ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

―― 21:53:11 - Git repositories ―――――――――――――――――――――――――――――――――――――――――――――――――
Would pull /home/felix/code/dotfiles

―― 21:53:11 - Vim ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /run/current-system/sw/bin/vim -u /home/felix/.vimrc -U NONE -V1 -nNesS /tmp/.tmpnjvain

―― 21:53:11 - Containers ―――――――――――――――――――――――――――――――――――――――――――――――――――――――

―― 21:53:11 - Firmware upgrades ――――――――――――――――――――――――――――――――――――――――――――――――
Dry running: /run/current-system/sw/bin/fwupdmgr refresh
Dry running: /run/current-system/sw/bin/fwupdmgr get-updates

Currently when rebuilding my system I run:
sudo nixos-rebuild switch --flake .#thinkman in the specific directory. Not sure how to fix it easily. Maybe this option is a little hint: https://search.nixos.org/options?channel=22.11&show=system.autoUpgrade.flags&from=0&size=50&sort=relevance&type=packages&query=system.autoUpgrade.flags
maybe also: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/auto-upgrade.nix#L167-L173

topgrade -v
 2023-01-25T20:53:55.859Z DEBUG topgrade::config > Configuration at /home/felix/.config/topgrade.toml
 2023-01-25T20:53:55.859Z DEBUG topgrade::config > Loaded configuration: ConfigFile { pre_commands: None, post_commands: None, commands: None, git_repos: None, predefined_git_repos: None, disable: None, ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, skip_notify: None, bashit_branch: None, only: None, composer: None, brew: None, linux: None, git: None, windows: None, npm: None, yarn: None, vim: None, firmware: None, vagrant: None, flatpak: None, distrobox: None }
 2023-01-25T20:53:55.859Z DEBUG topgrade::utils  > Detected "/run/current-system/sw/bin/notify-send" as "notify-send"
 2023-01-25T20:53:55.859Z DEBUG topgrade         > Version: 10.1.2
 2023-01-25T20:53:55.859Z DEBUG topgrade         > OS: x86_64-unknown-linux-gnu
 2023-01-25T20:53:55.859Z DEBUG topgrade         > Args { inner: ["topgrade", "-v"] }
 2023-01-25T20:53:55.859Z DEBUG topgrade         > Binary path: Ok("/nix/store/vvvp73n7rk75ssdw981ac4mrqs5nfx0h-topgrade-10.1.2/bin/topgrade")
 2023-01-25T20:53:55.859Z DEBUG topgrade         > Self Update: false
 2023-01-25T20:53:55.859Z DEBUG topgrade::utils  > Detected "/run/current-system/sw/bin/git" as "git"
 2023-01-25T20:53:55.859Z DEBUG topgrade::utils  > Cannot find "doas"
 2023-01-25T20:53:55.859Z DEBUG topgrade::utils  > Detected "/run/wrappers/bin/sudo" as "sudo"
 2023-01-25T20:53:55.860Z DEBUG topgrade::utils  > Cannot find "pwsh"
 2023-01-25T20:53:55.860Z DEBUG topgrade::utils  > Cannot find "powershell"
 2023-01-25T20:53:55.860Z DEBUG topgrade::runner > Step "System update"

―― 21:53:55 - System update ――――――――――――――――――――――――――――――――――――――――――――――――――――
2023-01-25T20:53:55.860Z DEBUG topgrade::executor > Running "/run/wrappers/bin/sudo" "/run/current-system/sw/bin/nixos-rebuild" "switch" "--upgrade"
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at /nix/store/mhxwwyjhy6xgqqyj5h3rcvndqchj5kyv-rbasp0xlgysa4i8wxfj9lcdcdhldlbnn-source/nixos/default.nix:1:60:

        1| { configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" <nixos-config>
         |                                                            ^
        2| , system ? builtins.currentSystem

(use '--show-trace' to show detailed location information)
building Nix...
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at /nix/store/mhxwwyjhy6xgqqyj5h3rcvndqchj5kyv-rbasp0xlgysa4i8wxfj9lcdcdhldlbnn-source/nixos/default.nix:1:60:

        1| { configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" <nixos-config>
         |                                                            ^
        2| , system ? builtins.currentSystem

(use '--show-trace' to show detailed location information)
building the system configuration...
error: file 'nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at /nix/store/mhxwwyjhy6xgqqyj5h3rcvndqchj5kyv-rbasp0xlgysa4i8wxfj9lcdcdhldlbnn-source/nixos/default.nix:1:60:

        1| { configuration ? import ./lib/from-env.nix "NIXOS_CONFIG" <nixos-config>
         |                                                            ^
        2| , system ? builtins.currentSystem

(use '--show-trace' to show detailed location information)
2023-01-25T20:53:57.604Z DEBUG topgrade::runner > Step "System update" failed: exit status: 1
2023-01-25T20:53:57.604Z DEBUG topgrade::terminal > Desktop notification: System update failed

Metadata

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