Error: opening lock file '/nix/var/nix/profiles/per-user/myuser/home-manager.lock': Permission denied

I’m trying to setup Home Manager on a non-NixOS Linux via flakes. After nix run home-manager/master -- --flake ~/dotfiles/hm-only switch I get

Starting Home Manager activation
error: opening lock file '/nix/var/nix/profiles/per-user/artem/home-manager.lock': Permission denied

What’s wrong?

My config (hm-only directory included) is on a branch in the repo: GitHub - ulysses4ever/dotfiles at prl-julia

1 Like

Appears to be known issue, sorry for the noise opening lock file '/nix/var/nix/profiles/per-user/root/home-manager.lock': No such file or directory · Issue #3734 · nix-community/home-manager · GitHub

Although, nothing mentioned there seems helpful to me. So, if anyone has ideas, please, share.

I described my problem in more detail on the issue: opening lock file '/nix/var/nix/profiles/per-user/root/home-manager.lock': No such file or directory · Issue #3734 · nix-community/home-manager · GitHub