How do you share flake between NixOS and MacOS?

Thank you so much!! What you have there is inspiring. Let me try listing out anything special so I can help others to learn for your dot and I can learn more from you:

  • using _module.args.dotroot = ./..; to create a dotroot for using absolute path

  • separate configuration into different file based on their function(?), and compose them back in as a profile here: https://github.com/TLATER/dotfiles/blob/d37ea7a8ed1cbeba33c49a7f498af14d254902a2/nixpkgs/profiles.nix

  • separating dotfiles and nix definition(nixpkgs) there. So it will be easier to ditch nix(if needed)

  • using Flake as the input of another Flake! This one is huge for me, with this I realize its potential. This is much better than using a simple configuration.nix

And really I am suprised that I am able to read your code! I have been struggling with nix for about 2 months since installing NixOS, and I feel like I have been using it like JSON, whereas your code is like Javascript LOL cool thanks!