snowfallorg / lib

Unified configuration for systems, packages, modules, shells, templates, and more with Nix Flakes.

Home Page:https://snowfall.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modules applied to every system causing breakages

arichtman opened this issue · comments

Hi Jake,

Hope you're feeling better!
Thanks so much for Snowfall to date and congrats on joining Replit!

I figured this was a better channel to try and work through the weird module/config application that was causing me to be unable to use one flake for both Mac and Linux.

Essentially, it seems that my WSL module is being applied to the Mac system despite configuration being controlled via an enable property. I've pared back all the other stuff to a minimal example. If I rename the modules/wsl/default.nix to anything other than default.nix I get some kind of infinite recursion error :(

It can be replicated by cloning this and running nix eval .#darwinConfigurations.macbookpro

https://github.com/arichtman/nix/tree/toy-mac

Hey! Thanks for making this issue. I think it'll make this much easier to track. I'll see if I can reproduce this (though it may have to wait a few days).

I also had this issue with my config which caused me to just delete my mac config attempt, for now. I believe i also had the issue in relation to setting a different display manager and stuff within modules that were supposed to be kept behind enable flags but when evaluated would complain about the conflicts.

I have some changes in the works that separate Darwin and NixOS systems, including their modules. The current version of Snowfall Lib loads all modules for all systems which can introduce these incompatibilities. Thanks again for reporting this :)

Thanks for the early preview.
Good news is - the feat/home-manager branch seems to have removed the error where the other module was always applied. Bad news is - I'm struggling to get the modules to apply. I was working on my actual implementation when the modules for darwin or homes didn't seem to be applying to the host. I tried reproducing it on my pared-back troubleshooting branch but it's just looping infinitely now. As before the test I'm using is cross-platform and should be nix eval .#darwinConfigurations.macbookpro

I'll keep trying, if I could put up a sample repository that might help others.

This seems to be resolved for me in the home-manager branch. Followed Jake's Config and got it working in my Khanelinix

This has been working for me a while I think and the dev branch has landed the changes. Thanks all for the help!