!UUqahLbShAYkkrXmKs:matrix.org

DevOS

37 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
13 Aug 2021
@blaggacao:matrix.orgDavid Arnold (blaggacao)I'm a happy man, now.05:47:56
@timdeh:matrix.org@timdeh:matrix.orgAwesome. We can soon say goodbye to nixos-install and friends ๐Ÿฅณ05:48:52
@gtrunsec:matrix.org@gtrunsec:matrix.orgCongratulation๏ผ05:51:56
@blaggacao:matrix.orgDavid Arnold (blaggacao) Ah, I still need to refactor to use chroot to catapult into that mounted env were symlinks (/nix/store/...) are valid, but that seems minor... ๐Ÿ™‚ Tomorrow, then. 06:14:00
@gytis-ivaskevicius:matrix.org@gytis-ivaskevicius:matrix.org
In reply to @timdeh:matrix.org
Awesome. We can soon say goodbye to nixos-install and friends ๐Ÿฅณ
what did i miss ๐Ÿ‘€
08:19:06
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @gytis-ivaskevicius:matrix.org
what did i miss ๐Ÿ‘€
Me learnig rust ๐Ÿ˜€
14:03:21
@d4hines:matrix.orgd4hines

Does anyone happen to know if the config I define for home-manager (vanilla, not using digga) is merged with the default config? I.e, does:

some.attr = foo

always yield the same results as:

some = { attr = foo };

16:00:25
@timdeh:matrix.org@timdeh:matrix.org So in the Nix language itself yes some.attr = foo is equivalent to some = { attr = foo; }, but in the Nix module system used by NixOS and home-manager to define config options, merge rules are dependent on the type of the value. 16:10:03
@timdeh:matrix.org@timdeh:matrix.orgSo for example if two separate modules declare a list for the same option, then those lists will be concatenated16:10:26
@timdeh:matrix.org@timdeh:matrix.orgif two modules declare a bool for the same option there will arise a conflict if one is true and the other is false.16:10:53
@timdeh:matrix.org@timdeh:matrix.orgSome modules expect a submodule, which is essentially an attribute set, and can accept as many submodules as you give it16:11:22
@timdeh:matrix.org@timdeh:matrix.org like the users.users.<some-user> options, some-user is considered a submodule. 16:11:48
@d4hines:matrix.orgd4hinesOk, so the value I give to home-manager is intelligently merged with the defaults (and any other modules I load as well), and if there are conflicts it fails to switch.16:13:45
@gytis-ivaskevicius:matrix.org@gytis-ivaskevicius:matrix.orgDam thats a lot of PR's16:44:43
@timdeh:matrix.org@timdeh:matrix.orgwell it depends, sometimes defaults are overwritten16:44:51
@timdeh:matrix.org@timdeh:matrix.orglike string defaults, for example16:44:57
@timdeh:matrix.org@timdeh:matrix.orgIn fact, is there any case where a default is not overwritten?16:45:06
@timdeh:matrix.org@timdeh:matrix.orgIf you mean the options you don't touch, then yes, they will remain their default value, but for anything you touch, I believe it's default is overwritten with whatever you supply.16:45:44
@timdeh:matrix.org@timdeh:matrix.org d4hines: ^^ 16:58:53
@d4hines:matrix.orgd4hinesCool. Iโ€™ve been writing out the full path for each attribute. I think I should be able to make my config more compact by using attribute sets. The glorious thing is that if Iโ€™m wrong I just git reset and reload!17:09:16
@timdeh:matrix.org@timdeh:matrix.org BTW, welcome back Gytis Ivaskevicius. I was worried you may have run into an unfortunate affair with a bus or something ๐Ÿ˜› 17:21:35
@gytis-ivaskevicius:matrix.org@gytis-ivaskevicius:matrix.orgno, it was worse - deadlines17:23:12
@gytis-ivaskevicius:matrix.org@gytis-ivaskevicius:matrix.org๐Ÿ˜‚17:23:14
@timdeh:matrix.org@timdeh:matrix.orgAt some point, we need to start reformulating rfc 96 for acceptance, and possibly begin patching the nix build chain to accept experimental flags at compile time (though maybe that's after it's officially accepted)17:27:05
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
Ok, so the value I give to home-manager is intelligently merged with the defaults (and any other modules I load as well), and if there are conflicts it fails to switch.
In the context of the 'module system' you can thing of advanced merge semantics and any such semantic can be expressed. Unfortunately, it is implemented itself in nix and not yet a language feature. This is at the root of a bad as bad can be tracing experience, which often hangs somewhere in or through the module system. nickel to the rescue.
18:16:20
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
Ok, so the value I give to home-manager is intelligently merged with the defaults (and any other modules I load as well), and if there are conflicts it fails to switch.
* In the context of the 'module system' you can thing of advanced merge semantics and any such semantic can be expressed. Unfortunately, it is implemented itself in nix and not yet a language feature. This is at the root of a bad as bad can be tracing experience, which often hangs somewhere in or through the module system. nickel to the rescue. ๐Ÿ™
18:16:49
@blaggacao:matrix.orgDavid Arnold (blaggacao)

Is there a bind mount experw among us who can give me a sanity check on:

mkdir -p "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
chmod 0755 "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
touch "$mountPoint/etc/mtab"
mount --rbind $(readlink -f /proc/mounts) "$mountPoint/etc/mtab"  # Grub needs an mtab.

exec chroot "$mountPoint" "CHROOTED=1 ${command[@]}"

18:18:30
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Is there a bind mount expert among us who can give me a sanity check on:

mkdir -p "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
chmod 0755 "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
touch "$mountPoint/etc/mtab"
mount --rbind $(readlink -f /proc/mounts) "$mountPoint/etc/mtab"  # Grub needs an mtab.

exec chroot "$mountPoint" "CHROOTED=1 ${command[@]}"

18:18:42
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Is there a bind mount expert among us who can give me a sanity check on:

mkdir -p "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
chmod 0755 "$mountPoint/dev" "$mountPoint/sys" "$mountPoint/tmp" "$mountPoint/etc"
mount --rbind /dev "$mountPoint/dev"
mount --rbind /sys "$mountPoint/sys"
touch "$mountPoint/etc/mtab"
mount --rbind $(readlink -f /proc/mounts) "$mountPoint/etc/mtab"  # Grub needs an mtab.

exec chroot "$mountPoint" "CHROOTED=1 ${command[@]}"
18:18:55
@blaggacao:matrix.orgDavid Arnold (blaggacao)(worth doing read only bind mounts in some places?)18:19:31

Show newer messages


Back to Room ListRoom Version: 6