!yUrHuDcxUngfTlDbiy:matrix.org

flakelight

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

Load older messages


SenderMessageTime
2 Mar 2026
@lunik1:lunik.onelunik1is this just the wrong way to pass common functions to all my system/home configurations?16:40:19
3 Mar 2026
@accelbread:matrix.orgaccelbreadyeah, modifying lib is a bit of a minefield so I usually add my own attr. You could either add your own personal lib attr to packages, or use a module to make it a module argument for nixos/home configs03:26:41
4 Mar 2026
@accelbread:matrix.orgaccelbreadby the way, I'll be at SCaLE if anyones there and wants to say hi09:08:07
16 Mar 2026
@vicenzogiuseppe:matrix.orgVicenzo Giuseppe set a profile picture.09:39:27
19 Mar 2026
@phga:matrix.orgphga joined the room.09:34:46
@phga:matrix.orgphga👋09:42:51
@accelbread:matrix.orgaccelbread👋16:22:17
27 Mar 2026
@smoothie_one:matrix.org@smoothie_one:matrix.org joined the room.13:03:19
31 Mar 2026
@smoothie_one:matrix.org@smoothie_one:matrix.org left the room.11:52:02
8 Apr 2026
@piquu:matrix.orgpiqu joined the room.10:07:13
@marvesms:matrix.org@marvesms:matrix.org joined the room.21:31:59
@mjolnir:nixos.orgNixOS Moderation Bot banned @marvesms:matrix.org@marvesms:matrix.org (spam).22:01:00
@feathecutie:tchncs.de@feathecutie:tchncs.de left the room.22:40:08
9 Apr 2026
@piquu:matrix.orgpiquis it possible to import files from the nixDir like flake-parts does it?11:12:34
@accelbread:matrix.orgaccelbreadI'm not sure how flake-parts does it (didn't have auto-importing last time I looked at it)16:17:16
@accelbread:matrix.orgaccelbreadwhat do you mean by importing files?16:17:50
@piquu:matrix.orgpiqu
In reply to @accelbread:matrix.org
what do you mean by importing files?
I mean when you use it with import-tree
16:31:30
@accelbread:matrix.orgaccelbreadnot sure what thats doing, but in flakelight you can set all the options by loading files from nixDir17:51:18
27 Apr 2026
@ninja:worldethicaldataforum.orgNinja joined the room.15:04:07
29 Apr 2026
@wibblyfrog:toadstool.onlinewibblyfrog joined the room.00:41:44
1 May 2026
@wibblyfrog:toadstool.onlinewibblyfrog left the room.19:37:46
26 May 2026
@sweatkroket:matrix.org@sweatkroket:matrix.org left the room.14:18:44
6 Jun 2026
@worldsgonemad:matrix.orgWorldsGoneMad joined the room.19:55:13
8 Jun 2026
@inomena:matrix.orginomena joined the room.16:18:19
@inomena:matrix.orginomena

hey, having some trouble getting started with flakelight for my nixos configuration, if someone could point me in the right direction;
my flake.nix:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-26.05";

    flakelight = {
      url = "github:nix-community/flakelight";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = { flakelight, ...} @ inputs: flakelight ./. {
    inherit inputs;
  };
}

nix/nixos/vm/default.nix:

{
  modules = [
    {
      mystuff.test.enable = true;

      nixpkgs.hostPlatform = "x86_64-linux";
    }
  ];
}

nix/nixosModules/test.nix:

{ lib, config, ... }:
let
  cfg = config.mystuff.test;
in {
  options.mystuff.test = {
    enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
    };
  };

  config = lib.mkIf cfg.enable {
    boot.loader.grub.enable = true;
  };
}

I assumed this should be enough of a minimal example on how to get a module with options working, but I just get this error (i.e. from nix flake show):

error: The option `mystuff' does not exist. Definition values:
       - In `/nix/store/czgkz14jgyp1inif7gv3jf2rr0znmh3k-source/flake.nix':
           {
             test = {
               enable = true;
             };
           }
16:21:31
@inomena:matrix.orginomena

if I disable the definition of mystuff.test.enable I can see that the module loads just fine, so I'm unsure what's going on:

├───checks                                                                                                                                                                                                                                                                                             
│   ├───aarch64-linux                                                                                                                                                                                                                                                                                  
│   │   └───formatting omitted (use '--all-systems' to show)                                                                                                                                                                                                                                           
│   └───x86_64-linux                                                                                                                                                                                                                                                                                   
│       ├───formatting: derivation 'check-formatting'                                                                                                                                                                                                                                                  
│       └───nixos-vm: derivation 'check-nixos-vm'                                                                                                                                                                                                                                                      
├───formatter                                                                                                                                                                                                                                                                                          
│   ├───aarch64-linux omitted (use '--all-systems' to show)                                                                                                                                                                                                                                            
│   └───x86_64-linux: package 'formatter'                                                                                                                                                                                                                                                              
├───nixosConfigurations                                                                                                                                                                                                                                                                                
│   └───vm: NixOS configuration                                                                                                                                                                                                                                                                        
└───nixosModules                                                                                                                                                                                                                                                                                       
    └───test: NixOS module   
16:25:00
@accelbread:matrix.orgaccelbread if you nix flake show, you should have nixosModules.test 16:46:54
@inomena:matrix.orginomenaI do, see last block :)16:47:15
@accelbread:matrix.orgaccelbreadin your modules you'll want to import it16:47:30
@accelbread:matrix.orgaccelbreadso in the nixos config, you can add self.nixosModules.test16:48:04

Show newer messages


Back to Room ListRoom Version: 10