{ lib, config, pkgs, ... }: let rpmsgexport = pkgs.stdenv.mkDerivation { name = "rpmsgexport"; src = pkgs.fetchFromGitHub { repo = "rpmsgexport"; owner = "andersson"; rev = "324d88d668f36c6a5e6a9c2003a050b8a5a3cd60"; hash = "sha256-k38gj+vtEE6/s+vALzW1jiuE3HdQqaGiICdAWndu6aU="; }; makeFlags = ["prefix=${placeholder "out"}"]; }; secrets = import ./local/secrets.nix; in { imports = [ (import ../mobile-nixos/lib/configuration.nix { device = "motorola-potter"; }) ]; config = { mobile = { adbd.enable = true; }; system.stateVersion = "23.11"; hardware.firmware = [ (config.mobile.device.firmware.override { modem = ./modem; }) ]; networking = { useDHCP = true; hostName = "biscuit"; networkmanager = { enable = false; }; inherit (secrets) wireless; }; services.openssh.enable = true; # environment.systemPackages = [ qrtr tqftpserv ]; services.udev.extraRules = '' # copied from https://github.com/andersson/rpmsgexport ACTION=="add", SUBSYSTEM=="rpmsg", KERNEL=="rpmsg_ctrl[0-9]*", ATTRS{rpmsg_name}=="pronto", RUN+="${rpmsgexport}/bin/rpmsgexport /dev/$name APPS_RIVA_CTRL" SUBSYSTEM=="rpmsg", KERNEL=="rpmsg_ctrl[0-9]*", ATTRS{rpmsg_name}=="?*", SYMLINK+="rpmsg/$attr{rpmsg_name}/ctrl" SUBSYSTEM=="rpmsg", KERNEL=="rpmsg[0-9]*", ATTR{name}=="?*", ATTRS{rpmsg_name}=="?*", SYMLINK+="rpmsg/$attr{rpmsg_name}/$attr{name}" ''; users.users.dan = { isNormalUser = true; uid = 1000; extraGroups = [ "wheel" "libvirtd" "docker" "dialout" ]; openssh.authorizedKeys.keys = import ../telent-nixos-config/users/dan/authorized-keys.nix; }; fileSystems."/boot" = { device = "/dev/disk/by-partlabel/system"; fsType = "ext4"; }; }; }