Difficulties switching to flake configuration

I’m trying to migrate my existing configuration (including homemanager as NixOS module). Currently, my configuration consists of five separate .nix files - a setup I’m very happy with at the moment. Thus, my plan was to just ‘link’ to configuration.nix in the flake. I seem to be missing an attribute? I’m running NixOS on a virtual machine using Parallels on Apple’s M1 architecture.

hello :wave:t3:

replace ./parasite/configuration/configuration.nix by (import ./parasite/configuration/configuration.nix)

You also forgot an s in nixosConfigurations

1 Like

Oh my, I double checked and still missed the typo. Now it’s complaining that importing the channel home-manager would be impure, but without the import the option home-manager does not exist. It seems including home-manager as an input in the flake is not enough? Do I have to rewrite the home-manager part of my configuration, e.g. source it (import home.nix?) directly in the flake output?

yes, it’s a bit different, with flakes you need to declare the home-manager in the inputs of `flake.nix

Look at https://nix-community.github.io/home-manager/index.html#sec-flakes-nixos-module