diff --git a/murex.nix b/murex.nix index e2224ec..d92d38a 100644 --- a/murex.nix +++ b/murex.nix @@ -13,10 +13,9 @@ uboot.enable = true; }; - # boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; # boot.kernelPackages = pkgs.linuxPackages_4_18; - # boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelPackages = pkgs.linuxPackages_rpi; + # boot.kernelPackages = pkgs.linuxPackages_rpi; boot.kernelParams = [ "cma=32M" # for virtual console, see https://nixos.wiki/wiki/NixOS_on_ARM @@ -141,11 +140,11 @@ Type = "oneshot"; RemainAfterExit = "yes"; }; - script = '' - if echo 17 > /sys/class/gpio/export; then - echo high > /sys/class/gpio/gpio17/direction + script = let gpio = toString (458 + 17); in '' + if echo ${gpio} > /sys/class/gpio/export; then + echo high > /sys/class/gpio/gpio${gpio}/direction fi - chown octoprint:dialout /sys/class/gpio/gpio17/value + chown octoprint:dialout /sys/class/gpio/gpio${gpio}/value ''; }; users.users.${config.services.octoprint.user}.extraGroups = [