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
Acou_Bass has quit [Ping timeout: 265 seconds]
<samueldr> it's not that thick to read through :)
<fps> yeah, i'm reading all these nix expressions the last couple of days :)
<samueldr> what makes it so it outputs the sd card is the nix invocation
<samueldr> well, nix-build
<samueldr> the `system.build` configuration option is an attribute set with... buildable... stuff... among others, you can get an sd image
<fps> ok, so i'll assemble a fully contained config that's suitable to go onto the sdcard and see how far i get
Acou_Bass has joined #nixos-aarch64
alp has joined #nixos-aarch64
nschoe has quit [Quit: No Ping reply in 180 seconds.]
nschoe has joined #nixos-aarch64
Acou_Bass has quit [Ping timeout: 246 seconds]
Acou_Bass has joined #nixos-aarch64
alp has quit [Ping timeout: 272 seconds]
Darkmatter66 has joined #nixos-aarch64
Darkmatter66_ has quit [Ping timeout: 272 seconds]
orivej_ has quit [Ping timeout: 260 seconds]
zupo has joined #nixos-aarch64
Acou_Bass has quit [Quit: ZNC 1.7.5 - https://znc.in]
Acou_Bass has joined #nixos-aarch64
alp has joined #nixos-aarch64
<fps> hmm, partial progress
<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`.
<srk> I just update the live one from armv7l laptop with https://github.com/pi-bouncer/pi-bouncer/blob/master/bouncer_update
<thefloweringash> I’ve been using morph for this. didn’t realize `nixos-rebuild` has it built-in now
<srk> yeah, I went from nixops to heavily patched nixops to morph to just this :)
<srk> now testing if I can do the same from x86 machine to pi
<srk> not sure if the paths are the same, probably not :(
<fps> that: "nixos-rebuild switch --build-host localhost --target-host pi" sounds seriously useful ;)
<fps> about the initialPasswordHash: should i just take it from /etc/passwd or /etc/shadow once i "passwd'd" once on the target?
<fps> sounds a little brittle :)
<srk> don't use passwords, use keys :)
<srk> I also have a devel mode option which autologins on tty https://github.com/pi-bouncer/pi-bouncer/blob/master/modules/default.nix#L46
<srk> if you really want passwords you can gen the hash using mkpasswd -m sha-512
<fps> the password is for when someone wants to actually login via tty. the point about keys for ssh is well taken though
<sphalerite> fps: you can use `mkpasswd -m sha-512` to get a password hash, as explained in the option's documentation
<fps> sphalerite: good point. i grepped through the nix manual for initialPasswordHash but didn't find anything :)
<fps> sphalerite: where are the options' documentation usually? in the nix expression that defines it?>
<srk> for me it's 'users.users.<name?>.initialHashedPassword'
<srk> you can also look in man configuration.nix
<fps> ah ok, that also explains why it takes so long to build the manpage :)
alp has quit [Remote host closed the connection]
alp has joined #nixos-aarch64
<sphalerite> fps: yep — man configuration.nix or there's an interactive search at https://nixos.org/nixos/options.html
alp has quit [Ping timeout: 246 seconds]
<fps> hmm, nixos-rebuild switch complained about there not being a nixpkgs/nixos in NIX_PATH. i wonder what i have to slap onto the image to get that
alp has joined #nixos-aarch64
<fps> ah, this in imports: <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
zupo_ has joined #nixos-aarch64
zupo has quit [Ping timeout: 240 seconds]
Darkmatter66 has quit [Ping timeout: 258 seconds]
Darkmatter66 has joined #nixos-aarch64
alp has quit [Ping timeout: 272 seconds]
alp has joined #nixos-aarch64
doda has quit [Quit: Konversation terminated!]
samrose has quit [Quit: Konversation terminated!]
alp has quit [Remote host closed the connection]
alp has joined #nixos-aarch64
bdju has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-aarch64
vika_nezrimaya has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 256 seconds]
Darkmatter66 has joined #nixos-aarch64
bdju has joined #nixos-aarch64
alp has quit [Remote host closed the connection]
alp has joined #nixos-aarch64
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
alp has quit [Quit: Leaving]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clever has quit [Ping timeout: 265 seconds]
clever has joined #nixos-aarch64
Acou_Bass has quit [Quit: ZNC 1.7.5 - https://znc.in]
Acou_Bass has joined #nixos-aarch64
bdju has quit [Ping timeout: 246 seconds]