| 8 Jun 2026 |
inomena | i.e. so I wouldn't have to import every single one | 16:48:44 |
inomena | * i.e. so I wouldn't have to import every single one, one by one | 16:49:05 |
accelbread | you can put a line in your nixos config to import all of them | 16:49:15 |
accelbread | but generally, in flakes with multiple nixos configs, they may use different subsets | 16:50:17 |
accelbread | for the single nixos config flake, defs makes sense to do modules = self.nixosModules | 16:51:00 |
inomena | I want all modules I create to be imported/available, as they will all have options to enable them (like nixpkgs modules do) | 16:51:01 |
inomena | I'd want this for all nixos configs | 17:00:15 |
inomena | and tbh the same thing for all home-manager configs too, for homeModules | 17:00:47 |
accelbread | { outputs, ... }: {
modules = builtins.attrValues outputs.nixosModules ++ [
{
mystuff.test.enable = true;
nixpkgs.hostPlatform = "x86_64-linux";
}
];
}
for your nixos config would work
| 17:02:23 |
accelbread | hmm i can see about how to make that ergonomic | 17:02:41 |
accelbread | though outside of nixpkgs itself, a lot of modules I've seen do not use an enable option and just add their settings | 17:03:19 |
inomena | yeah that works, but it's boilerplate I hoped this lib had auto wiring for :) | 17:03:50 |
inomena | or opt-in atleast | 17:04:12 |
accelbread | potentially could have something that gets added to each nixosConfig | 17:04:20 |
accelbread | and could add it there | 17:04:23 |
inomena | I'm migrating from snowfall-lib, which has this kind of auto wiring out of the box | 17:04:59 |
accelbread | I think adding an opt-in setting to autoimport all modules makes sense | 17:06:20 |
accelbread | im thinking if its possible to detect whether a module is "well-behaved" | 17:08:29 |
accelbread | so it could be automatic | 17:08:52 |
inomena | i.e. if it outputs a config object it would just be imported, but if it doesn't then it won't? | 17:18:14 |
inomena | I would like to auto load "misbehaving" modules too :P | 17:18:30 |
accelbread | makes sense | 17:22:26 |
inomena | * I would like to auto import "misbehaving" modules too :P | 17:23:33 |
accelbread | maybe like flakelight.autoImportModules = ["*"] for everything, and flakelight.autoImportModules = ["nixos/*"] for just nixos ones | 17:23:56 |
inomena | yeah that could work | 17:24:13 |
accelbread | nixos/home-manager will be easy. would need to export some machinery for flakelight-darwin to use | 17:25:06 |
accelbread | flakelightModules may be tricky but imo makes sense too | 17:25:29 |
inomena | was not expecting this to also load modules from external flakes (like flakelightModules), I tend to import them within a module that does something with them (like I have a sops module for sops-nix that'd deal with sops stuff) | 17:27:33 |
inomena | * was not expecting this to also load modules from external flakes (like flakelightModules), I tend to import them within a module that does something with them (like I have a sops module for sops-nix that'd deal with sops stuff, disko module that imports disko's module and does stuff, etc) | 17:28:00 |
inomena | Redacted or Malformed Event | 17:28:48 |