| 23 Aug 2023 |
Linux Hackerman | there are plans to make pkgsCross more consistent, afaik | 11:48:22 |
artemis | tangentially to this, can i nix-copy-closure (or whatever i actually want if its not this?) to just like, a mounted partition | 11:53:33 |
Linux Hackerman | nix copy --to /foo will copy things to /foo/nix/store | 11:54:00 |
artemis | sweet ok | 11:54:06 |
Linux Hackerman | using chroot stuff | 11:54:15 |
Linux Hackerman | if you want to boot from it, make sure to do the copying as root | 11:54:27 |
Linux Hackerman | otherwise the ownership will be on your user and things will be unhappy | 11:54:44 |
artemis | is that the correct way to update a NixOS partition too? Like will that "activate" the new config or what have you | 11:54:55 |
artemis | or do i need to do something else on top to do that | 11:55:04 |
Linux Hackerman | with cross it's a bit tricky | 11:55:33 |
artemis | right now im updating a crossbuilt pi2 i have but im doing that over the network with deploy-rs | 11:55:36 |
artemis | and deploy-rs handles all the specific nix stuff for me so i only sort of know what its actually doing | 11:56:05 |
artemis | but it like copies over my crossbuilt packages, sets up a new boot environment with an entry in the boot menu and everything | 11:56:25 |
Linux Hackerman | because the tools that generate bootloader config and stuff are only compiled for the target arch, so you can't properly switch to the config from a different machine | 11:56:25 |
artemis | * but it like copies over my crossbuilt packages, sets up a new boot environment with an entry in the boot menu and everything, and activates it | 11:56:29 |
Linux Hackerman | all nix copy does is copy things into the store | 11:56:41 |
Linux Hackerman | no activation or anything | 11:56:49 |
artemis | eh surely qemu-user is enough to handle that | 11:56:50 |
Linux Hackerman | probably, but you'll need to copy qemu-user in for it to work in the chroot too | 11:57:13 |
artemis | right | 11:57:21 |
Linux Hackerman | if you're using qemu-user, nixos-install might be what you want, with the --system param pointing to the toplevel, and probably --no-root-passwd and --no-channel-copy too | 11:57:42 |
artemis | is that a command i should be running from my host or inside the chroot | 11:58:16 |
Linux Hackerman | from the host | 11:58:20 |
Linux Hackerman | nixos-install copies the system in and does all the bits and pieces needed for it to boot | 11:58:58 |
artemis | where does it copy the system from? | 11:59:12 |
Linux Hackerman | the "normal" store | 11:59:23 |
artemis | oh right, ok | 11:59:36 |
Linux Hackerman | though I think it's happy to not do any copying if the system is already in the target store | 11:59:40 |
Linux Hackerman | this is all not ideal, and I have some thoughts about what a future replacement for nixos-rebuild and nixos-install should look like, as do others https://github.com/NixOS/nixpkgs/issues/54188 | 12:02:30 |
Linux Hackerman | (just as a disclaimer that this is how it currently is, but don't actually think it's cool and great :D ) | 12:02:50 |