exarkun_ has joined #nixos-aarch64
pxc has quit [Ping timeout: 250 seconds]
Thra11 has joined #nixos-aarch64
sonnenbloom has joined #nixos-aarch64
<sonnenbloom> hello! i installed NixOS 18.09 on a raspberry pi 3. works ok so far, could use more RAM. ,)
<gchristensen> nice!
<sonnenbloom> problem is sshd does not start up during boot. config.services.openssh.enable evaluates to true in the repl.
<sonnenbloom> i can start it on the console with systemctl.
<sonnenbloom> i don't know much about about the nix bootstrap and systemd yet. where can i start to debug this?
<samueldr> if you're including `<nixos/modules/installer/cd-dvd/sd-image-aarch64.nix>`, it ends up including `installation-device.nix` which in turn stops ssh from starting by default
<samueldr> sonnenbloom: ^
<sonnenbloom> samueldr: ok, thanks, then it /is/ this issue: https://github.com/NixOS/nixpkgs/issues/26776
<{^_^}> #26776 (by MrSorcus, 1 year ago, open): SSHD doesn't work.
<samueldr> kind of, yeah, same root cause
<sonnenbloom> the suggested fix -- systemd.services.sshd.wantedBy = lib.mkOverride 40 [ "multi-user.target" ]; -- does not work for me, though, results in "error: undefined variable 'lib' at /root/homemate/etc/nixos/configuration.nix:13:36"
<samueldr> you would need to add lib to the parameters on top of the file, { /*...*/, lib, ... }
<samueldr> (assuming it isn't there)
<samueldr> though, in reality, you may be better served by *not* including that file, as it is used for the installation media
<samueldr> the current NixOS on ARM guide has a base configuration file sample https://nixos.wiki/wiki/NixOS_on_ARM#NixOS_installation_.26_configuration
<samueldr> (make sure NOT to add Dezgeg's cache as it is not needed on aarch64)
<samueldr> if you wanted to see what's in the file you're importing, it's this one https://github.com/NixOS/nixpkgs/blob/release-18.09/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
<samueldr> (which as you can see, imports `installation-device.nix`, which is the one disabling sshd)
<sonnenbloom> the fix with mkOverride did work. i will look into it. thanks!
<sonnenbloom> <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix> -- how can i evaluate that on the shell to the name of the currently active file?
<clever> sonnenbloom: nix-instantiate --find-file nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
<sonnenbloom> that calls for an alias! thank you, clever!
<clever> you can also just run `nix repl` and then paste in `nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix>`
<clever> oops, with the < as well
<sonnenbloom> nice.
<sonnenbloom> ok, boots fine without the import now. :)
<sonnenbloom> i want to port a number of BuildRoot packages to NixOS, for example this device tree overlay: https://github.com/jens-maus/RaspberryMatic/blob/master/buildroot-external/package/rpi-rf-mod/dts/rpi-rf-mod.dts
<sonnenbloom> is there maybe a helpful template package that i can use, that deals with device tree overlays?
<sonnenbloom> is there more documentation on package creation than https://nixos.wiki/wiki/Nixpkgs/Create_and_debug_packages ? a tutorial maybe?
<sonnenbloom> what can i do to make `echo "18" > /sys/class/gpio/export` work? (it gives "echo: write error: invalid argument")
<sonnenbloom> ok, seems to be `echo $((458 + 18)) > /sys/class/gpio/export` :)
orivej_ has quit [Ping timeout: 246 seconds]
Thra11 has quit [Ping timeout: 246 seconds]