vika_nezrimaya has quit [Quit: ERC (IRC client for Emacs 26.3)]
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 260 seconds]
h0m1 has joined #nixos-aarch64
LnL has quit [Ping timeout: 260 seconds]
LnL has joined #nixos-aarch64
LnL has joined #nixos-aarch64
LnL has quit [Changing host]
Darkmatter66_ has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 256 seconds]
<fps>
hmm, looking through the different nix expressions for the sdcard images i'm still a little bit confused
<fps>
for example this line from sd-image-raspberrypi4.nix:
<fps>
# the installation media is also the installation target,
<fps>
installer.cloneConfig = false;
<fps>
# so we don't want to provide the installation configuration.nix.
<fps>
is there a way to include a config in the generated image such that "nixos-rebuild switch" from the booted system is a noop?
<fps>
the creater of that sd card config seems to assume that people want to customize the image completely after a boot
<fps>
my goal is to provide a ready-made system. sure if people want to modify it later, they can. but it would be nice if all they needed to do was to nixos-rebuild switch --upgrade and that's it
<samueldr>
fps: if cloneConfig is set to true that would clone the config to the sd card
<samueldr>
though it may not do what you want
<samueldr>
as it ends up copying only one part of the config, and relies on imports, including the ones about the installer media, in that case
<samueldr>
though try it
* samueldr
thinks
<samueldr>
yeah, if you're making an sd card that's not using the installer profile, that should works just fine I guess
<fps>
hmmm
<fps>
oh ok, i thought the installer profile was needed to install it on the sdcard in the first place, but i was wrong. i'll try hacking that out of there and see what it gives me
<samueldr>
nah, the installer profile is what makes it use the passwordless `nixos` with autologin and stuff
<samueldr>
stuff that's quite unsafe by default
<samueldr>
and that's why we don't copy that to the sd card anymore
<samueldr>
else people keep the file as a stub, add to it, and get confused by the nixos user and weird defaults like ssh not starting
<fps>
i used that configuration to build the sd card image
<fps>
and it boots fine..
<fps>
oh, i think i got it.. i need to have two nix expressions, one for the build which includes the clone-config stuff AND my configuration.nix to go onto the image
<fps>
and i'll configure the clone-config thing to only clone the latter configuration.nix
<fps>
s/includes/imports/
<fps>
and i'd really like to take out the compression and decomression steps. my machine is not hydra :)
<thefloweringash>
Flashing an entire image to an sd card is going to be slow. While you’re iterating on the system configuration you could try updating the card instead of replacing its contents.
<thefloweringash>
Roughly: build the top level system and `nix copy --store /mnt/card`. And build the extlinux.conf and copy that to /mnt/card/boot
<fps>
yeah, the iterations are rather slow. i need to copy the damn image to my laptop with an sdcard slot in between ;)
<srk>
or nix copy --to ssh://pi or even nixos-rebuild switch --build-host localhost --target-host pi
<fps>
once i got a configuration and image build process that works i can of course change the config on the booted system and once everything works as intended there copy it back over to the build machine
<thefloweringash>
I copied the above from my notes, but I don’t see how it works. It might have to be `nix copy --to /mnt/card ./result`.