!RRerllqmbATpmbJgCn:nixos.org

Nix / NixOS

3851 Members
Nix/NixOS user help channel | Latest NixOS: 24.05 (Uakari) | Ask your question here or on https://discourse.nixos.org | All NixOS rooms are moderated! Ask for help in #moderation:nixos.org659 Servers

Load older messages


SenderMessageTime
21 Oct 2024
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:15:14
@liv:liv.townliv <3This is with config.liv.laptop and options for the other two.20:15:30
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:15:35
@liv:liv.townliv <3And this is with options.liv.laptop and config for the other two20:16:03
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:16:06
@liv:liv.townliv <3Which leads me to believe I should try without options in front of it, but then I get:20:16:27
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:16:36
@aftix:matrix.orgaftixYou're defining the option config.liv.laptop.enable but trying to set config.liv.laptop to a Boolean (but it has to be an attrset because it contains the key "enable")20:19:30
@liv:liv.townliv <3ah okay, so now I have the following:20:27:29
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:27:29
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:27:41
@liv:liv.townliv <3and that returns20:28:02
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:28:04
@emilazy:matrix.orgemily just liv.laptop.enable = true. 20:31:09
@emilazy:matrix.orgemilyuh, also your option declaration is wrong.20:31:22
@emilazy:matrix.orgemily get rid of the type/default stuff. 20:31:28
@aftix:matrix.orgaftix

The type and default aren't doing what you think here. Remove the enable= line and put a mkOption between laptop = and { if you want to use config.liv.laptop = true, or remove the type and default lines if you want to use config.liv.laptop.enable = true

20:31:33
@emilazy:matrix.orgemily that's part of enable and handled by mkEnableOption. 20:31:34
@liv:liv.townliv <3
In reply to @liv:liv.town
sent an image.
when I remove .enable from here, it returns error: An option declaration for liv.laptop' has type 'bool' rather than an attribute set.` again
20:31:36
@liv:liv.townliv <3
In reply to @aftix:matrix.org

The type and default aren't doing what you think here. Remove the enable= line and put a mkOption between laptop = and { if you want to use config.liv.laptop = true, or remove the type and default lines if you want to use config.liv.laptop.enable = true

ah I see, they're now defining liv.laptop itself, right?
20:32:59
@aftix:matrix.orgaftix

Because you need to define an option with a function such as mkOption or it's siblings (call the function with an attrset as an argument) and not by setting the name equal to a bare attrset

20:33:09
@wuyoli:c3d2.dewuyoliI am currently in https://matrix.to/#/#community:nixos.org and https://matrix.to/#/#space:nixos.org which one is the current matrix space?20:39:44
@emilazy:matrix.orgemilyI think those are the same?20:44:28
@liv:liv.townliv <3
In reply to @emilazy:matrix.org
just liv.laptop.enable = true.
that wont work either :p
20:48:26
@liv:liv.townliv <3it's still yelling about a set/boolean20:48:36
@emilazy:matrix.orgemilyit should, if the other issues are addressed.20:48:46
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:50:29
@liv:liv.townliv <3clipboard.png
Download clipboard.png
20:50:29
@liv:liv.townliv <3this is what I have now20:50:34
@mjm:midna.devmjmtake the options off the front in that first one20:50:46

Show newer messages


Back to Room ListRoom Version: 10