!yUrHuDcxUngfTlDbiy:matrix.org

flakelight

45 Members
https://github.com/nix-community/flakelight13 Servers

Load older messages


SenderMessageTime
8 Jun 2026
@inomena:matrix.orginomenai.e. so I wouldn't have to import every single one16:48:44
@inomena:matrix.orginomena* i.e. so I wouldn't have to import every single one, one by one16:49:05
@accelbread:matrix.orgaccelbreadyou can put a line in your nixos config to import all of them16:49:15
@accelbread:matrix.orgaccelbreadbut generally, in flakes with multiple nixos configs, they may use different subsets16:50:17
@accelbread:matrix.orgaccelbread for the single nixos config flake, defs makes sense to do modules = self.nixosModules 16:51:00
@inomena:matrix.orginomenaI 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:matrix.orginomena I'd want this for all nixos configs 17:00:15
@inomena:matrix.orginomenaand tbh the same thing for all home-manager configs too, for homeModules17:00:47
@accelbread:matrix.orgaccelbread
{ 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:matrix.orgaccelbreadhmm i can see about how to make that ergonomic17:02:41
@accelbread:matrix.orgaccelbreadthough outside of nixpkgs itself, a lot of modules I've seen do not use an enable option and just add their settings17:03:19
@inomena:matrix.orginomenayeah that works, but it's boilerplate I hoped this lib had auto wiring for :)17:03:50
@inomena:matrix.orginomenaor opt-in atleast17:04:12
@accelbread:matrix.orgaccelbreadpotentially could have something that gets added to each nixosConfig17:04:20
@accelbread:matrix.orgaccelbreadand could add it there17:04:23
@inomena:matrix.orginomenaI'm migrating from snowfall-lib, which has this kind of auto wiring out of the box17:04:59
@accelbread:matrix.orgaccelbreadI think adding an opt-in setting to autoimport all modules makes sense17:06:20
@accelbread:matrix.orgaccelbreadim thinking if its possible to detect whether a module is "well-behaved"17:08:29
@accelbread:matrix.orgaccelbreadso it could be automatic17:08:52
@inomena:matrix.orginomenai.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:matrix.orginomenaI would like to auto load "misbehaving" modules too :P17:18:30
@accelbread:matrix.orgaccelbreadmakes sense17:22:26
@inomena:matrix.orginomena* I would like to auto import "misbehaving" modules too :P17:23:33
@accelbread:matrix.orgaccelbread maybe like flakelight.autoImportModules = ["*"] for everything, and flakelight.autoImportModules = ["nixos/*"] for just nixos ones 17:23:56
@inomena:matrix.orginomenayeah that could work17:24:13
@accelbread:matrix.orgaccelbreadnixos/home-manager will be easy. would need to export some machinery for flakelight-darwin to use17:25:06
@accelbread:matrix.orgaccelbreadflakelightModules may be tricky but imo makes sense too17:25:29
@inomena:matrix.orginomenawas 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:matrix.orginomena* 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:matrix.orginomenaRedacted or Malformed Event17:28:48

Show newer messages


Back to Room ListRoom Version: 10