How to install home-manager with flox?

Hi all, I am new to Nix and flox, and I’ve been using flox successfully to manage environments and so on.

I was trying to install home-manager using flox so I can also configure my dotfiles through Nix/flox.

First I added the channel

flox [default] ~ flox subscribe home-manager
Enter URL for 'home-manager' channel: github:nix-community/home-manager

Then I tried to install it but got the following error:

flox [default] ~ flox install home-manager
error: syntax error, unexpected '=', expecting ID or OR_KW or DOLLAR_CURLY or '"'

       at /nix/store/n7digx3gn2c3gish6f3k8jfg8blczgqr-pkgs/default/flox.nix:22:26:

           21|   packages.nixpkgs-flox.go_1_20 = {};
           22|   packages.home-manager. = {};
             |                          ^
           23|   packages.nixpkgs-flox.exa = {};
(use '--show-trace' to show detailed location information)

ERROR: failed to install packages: flake:home-manager#evalCatalog.aarch64-darwin.stable.

This is my flox config

flox [default] ~ flox config -l
channels = "{"home-manager":"github:nix-community/home-manager"}"
educatePublish = "0"
floxClientUUID = "e6aa3276-bd91-11ed-a129-3a8faff036ba"
floxMetricsConsent = "1"
gitBaseURL = "https://github.com/"

I can see that it is failing because of some syntax error, but not sure why that is happening in the first place? Or is it possible to install home-manager at all?

Hi @refz - welcome and thanks for your query! Before I get one of the engineers involved, have you tried doing a simply search first using the default channels (nixpkgs-flox and flox) and then installing one of those versions?

$ flox search home-manager
home-manager - A user environment configurator
  stable.nixpkgs-flox.home-manager@2021-12-25
  stable.nixpkgs-flox.home-manager@2022-04-17
  stable.nixpkgs-flox.home-manager@2022-10-25
  staging.nixpkgs-flox.home-manager@2021-12-25
  staging.nixpkgs-flox.home-manager@2022-04-17
  staging.nixpkgs-flox.home-manager@2022-10-25
  unstable.nixpkgs-flox.home-manager@2021-12-25
  unstable.nixpkgs-flox.home-manager@2022-04-17
  unstable.nixpkgs-flox.home-manager@2022-10-25
1 Like

Hi @robinbrantley, indeed I removed the subscription to the home-manager channel and using the default channel the installation worked!

Thank you!

1 Like