2023-07-14 06:48:02 +00:00
|
|
|
# Pinephone
|
2023-07-18 10:24:16 +00:00
|
|
|
#
|
|
|
|
# wikis, resources, ...:
|
|
|
|
# - Linux Phone Apps: <https://linuxphoneapps.org/>
|
|
|
|
# - massive mobile-friendly app database
|
|
|
|
# - Mobian wiki: <https://wiki.mobian-project.org/doku.php?id=start>
|
|
|
|
# - recommended apps, chatrooms
|
2023-07-14 06:48:02 +00:00
|
|
|
|
2023-01-02 10:00:20 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2022-05-23 02:45:54 +00:00
|
|
|
{
|
2022-06-23 22:42:20 +00:00
|
|
|
imports = [
|
|
|
|
./fs.nix
|
2023-07-25 12:02:58 +00:00
|
|
|
./gps.nix
|
2022-06-23 22:42:20 +00:00
|
|
|
];
|
2022-09-30 11:44:29 +00:00
|
|
|
|
2024-06-04 14:32:01 +00:00
|
|
|
sane.hal.pine64.enable = true;
|
2023-01-20 11:37:43 +00:00
|
|
|
sane.roles.client = true;
|
2023-11-18 22:56:53 +00:00
|
|
|
sane.roles.handheld = true;
|
2023-01-20 22:40:58 +00:00
|
|
|
sane.services.wg-home.enable = true;
|
|
|
|
sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip;
|
2024-05-26 14:31:08 +00:00
|
|
|
sane.ovpn.addrV4 = "172.24.87.255";
|
|
|
|
# sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:18cd:a72b";
|
2023-01-20 11:37:43 +00:00
|
|
|
|
2022-10-24 14:39:50 +00:00
|
|
|
# XXX colin: phosh doesn't work well with passwordless login,
|
|
|
|
# so set this more reliable default password should anything go wrong
|
2022-05-23 10:06:29 +00:00
|
|
|
users.users.colin.initialPassword = "147147";
|
2024-01-31 19:47:24 +00:00
|
|
|
# services.getty.autologinUser = "root"; # allows for emergency maintenance?
|
2022-05-23 10:06:29 +00:00
|
|
|
|
2023-05-14 09:50:01 +00:00
|
|
|
sops.secrets.colin-passwd.neededForUsers = true;
|
2022-10-24 14:39:50 +00:00
|
|
|
|
2024-03-01 07:26:26 +00:00
|
|
|
sane.programs.sway.enableFor.user.colin = true;
|
2023-09-04 11:31:07 +00:00
|
|
|
sane.programs.blueberry.enableFor.user.colin = false; # bluetooth manager: doesn't cross compile!
|
2024-03-11 07:54:49 +00:00
|
|
|
sane.programs.fcitx5.enableFor.user.colin = false; # does not cross compile
|
2023-10-12 01:59:28 +00:00
|
|
|
sane.programs.mercurial.enableFor.user.colin = false; # does not cross compile
|
2023-11-15 20:41:41 +00:00
|
|
|
sane.programs.nvme-cli.enableFor.system = false; # does not cross compile (libhugetlbfs)
|
2023-10-10 08:02:10 +00:00
|
|
|
|
|
|
|
# enabled for easier debugging
|
2023-08-28 08:03:27 +00:00
|
|
|
sane.programs.eg25-control.enableFor.user.colin = true;
|
2023-10-10 08:02:10 +00:00
|
|
|
sane.programs.rtl8723cs-wowlan.enableFor.user.colin = true;
|
2023-07-21 21:29:48 +00:00
|
|
|
|
2023-10-22 11:46:58 +00:00
|
|
|
# sane.programs.ntfy-sh.config.autostart = true;
|
2023-09-21 19:40:12 +00:00
|
|
|
sane.programs.dino.config.autostart = true;
|
2024-01-31 20:09:03 +00:00
|
|
|
# sane.programs.signal-desktop.config.autostart = true; # TODO: enable once electron stops derping.
|
2023-11-14 00:38:06 +00:00
|
|
|
# sane.programs."gnome.geary".config.autostart = true;
|
2023-09-21 19:44:11 +00:00
|
|
|
# sane.programs.calls.config.autostart = true;
|
2023-09-21 19:40:12 +00:00
|
|
|
|
2024-04-20 08:37:36 +00:00
|
|
|
sane.programs.pipewire.config = {
|
|
|
|
# tune so Dino doesn't drop audio
|
2023-10-07 08:09:50 +00:00
|
|
|
# there's seemingly two buffers for the mic (see: <https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/FAQ#pipewire-buffering-explained>)
|
2023-10-07 00:58:11 +00:00
|
|
|
# 1. Pipewire buffering out of the driver and into its own member.
|
|
|
|
# 2. Pipewire buffering into Dino.
|
|
|
|
# the latter is fixed at 10ms by Dino, difficult to override via runtime config.
|
|
|
|
# the former defaults low (e.g. 512 samples)
|
|
|
|
# this default configuration causes the mic to regularly drop out entirely for a couple seconds at a time during a call,
|
|
|
|
# presumably because the system can't keep up (pw-top shows incrementing counter in ERR column).
|
|
|
|
# `pw-metadata -n settings 0 clock.force-quantum 1024` reduces to about 1 error per second.
|
|
|
|
# `pw-metadata -n settings 0 clock.force-quantum 2048` reduces to 1 error every < 10s.
|
|
|
|
# pipewire default config includes `clock.power-of-two-quantum = true`
|
2024-04-20 08:37:36 +00:00
|
|
|
min-quantum = 2048;
|
|
|
|
max-quantum = 8192;
|
|
|
|
};
|
2023-10-07 00:58:11 +00:00
|
|
|
|
2022-09-21 10:25:23 +00:00
|
|
|
# /boot space is at a premium. default was 20.
|
2022-12-21 06:33:50 +00:00
|
|
|
# even 10 can be too much
|
|
|
|
boot.loader.generic-extlinux-compatible.configurationLimit = 8;
|
2022-05-23 02:45:54 +00:00
|
|
|
}
|