Misterio77 / nix-config

Personal nixos and home-manager configurations.
https://m7.rs/git/nix-config/
MIT License
861 stars 51 forks source link

Question: Purpose of what seems to be a double import of home-manager configuration #38

Closed J0G closed 4 months ago

J0G commented 6 months ago

Hi Misterio77,

I am studying your work on you personal flake as a learning exercice. I came across something odd, maybe the answer is simple but I'm a litte stuck.

In hosts/common/users/misterio/default.nix : I see that you declare the home-manager package with packages = [pkgs.home-manager]; and proceed with I guess using it in home-manager.users.misterio = import ../../../../home/misterio/${config.networking.hostName}.nix;

I'm wondering what is the reason for doing so since this file is also imported via the flake.nix file with:

      # Desktops
      "misterio@atlas" = lib.homeManagerConfiguration {
        modules = [./home/misterio/atlas.nix ./home/misterio/nixpkgs.nix];
        pkgs = pkgsFor.x86_64-linux;
        extraSpecialArgs = {
          inherit inputs outputs;

I would have said the flake one would be sufficient to load your user config.

nakoo commented 5 months ago

I guess It's becuase of impermanenece setup, which must be enabled as nixos modules, not standalone.