| 13 Aug 2021 |
@kraftnix:matrix.org | In reply to @blaggacao:matrix.org
$ mount /dev/disk/by-label/nixos /mnt
$ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only
$ swapon /dev/$your_swap_partition
# add some extra space to the store, it's running on a tmpfs on your RAM
$ mkdir -p /mnt/tmpstore/{work,store}
$ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store
that's neat, i have actually run into the tmpfs storage issue before when trying to do a 0 -> full system build during bootstrap | 02:50:05 |
@kraftnix:matrix.org | In reply to @blaggacao:matrix.org Does anybody know a smart way to make the baked in flake writable? maybe using overlays? in the context of bootstrapIso my hack is just to rsync it the user home dir, edit + build there | 02:50:52 |
David Arnold (blaggacao) | I still want to do copy --to ssh://[fe08::47%eno1]/mnt though... | 02:51:11 |
David Arnold (blaggacao) | but the path part of the uri is not parsed in nix ... π₯ | 02:51:46 |
David Arnold (blaggacao) | * I still want to do nix copy --to ssh://[fe08::47%eno1]/mnt though... | 02:52:03 |
@kraftnix:matrix.org | ahhh | 02:52:07 |
David Arnold (blaggacao) | it seems to be a hard wall to hit | 02:52:53 |
@kraftnix:matrix.org | given that nix doesn't seem to support that, the cleanest hack i can think of (although i'm not sure whether this should be in deploy/yeet) is to run an sshfs to the install target at /mnt/nix/store and then nix copy --to file:///deploy-host/path/to/sshfs ποΈ | 02:59:07 |
@kraftnix:matrix.org | * given that nix doesn't seem to support that, the cleanest hack i can think of (although i'm not sure whether this should be in deploy/yeet) is to run an sshfs to the install target at /mnt/nix/store and then nix copy --to file:///deploy-host/path/to/sshfs ποΈ | 03:00:35 |
David Arnold (blaggacao) | ssh://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot?store=$NIX_STORE_DIR&real=$remoteRoot$NIX_STORE_DIR what is this???? | 03:51:54 |
David Arnold (blaggacao) | It certainle doesn't seem that draft uri RFC spec | 03:53:05 |
David Arnold (blaggacao) | * It certainly doesn't seem that draft uri RFC spec | 03:53:14 |
David Arnold (blaggacao) | And then there is ssh-ng ... π | 03:53:39 |
@timdeh:matrix.org | So second draft is pretty much a total rewrite π:
https://github.com/divnix/nix-book/blob/57e06c9cf52482209600505d1967939526fa95cd/src/ch01-00-foreword.md | 05:45:36 |
@timdeh:matrix.org | In reply to @blaggacao:matrix.org
ssh://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot?store=$NIX_STORE_DIR&real=$remoteRoot$NIX_STORE_DIR what is this???? where did you find this beast π | 05:46:31 |
David Arnold (blaggacao) | https://github.com/NixOS/nix/blob/7c90552879da4d1df99b50c85e94201981e60123/tests/nix-copy-ssh.sh | 05:47:19 |
David Arnold (blaggacao) | and IT TOTALLY WORKS π | 05:47:41 |
David Arnold (blaggacao) | I'm a happy man, now. | 05:47:56 |
@timdeh:matrix.org | Awesome. We can soon say goodbye to nixos-install and friends π₯³ | 05:48:52 |
@gtrunsec:matrix.org | CongratulationοΌ | 05:51:56 |
David 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 | In reply to @timdeh:matrix.org Awesome. We can soon say goodbye to nixos-install and friends π₯³ what did i miss π | 08:19:06 |
David Arnold (blaggacao) | In reply to @gytis-ivaskevicius:matrix.org what did i miss π Me learnig rust π | 14:03:21 |
@d4hines:matrix.org | 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 | 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 | So for example if two separate modules declare a list for the same option, then those lists will be concatenated | 16:10:26 |
@timdeh:matrix.org | if 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 | Some modules expect a submodule, which is essentially an attribute set, and can accept as many submodules as you give it | 16:11:22 |
@timdeh:matrix.org | like the users.users.<some-user> options, some-user is considered a submodule. | 16:11:48 |
@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. | 16:13:45 |