nix-files/machines/moby/default.nix

82 lines
3.1 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, mobile-nixos, ... }:
{
imports = [
2022-08-06 22:48:05 +00:00
# (import "${mobile-nixos}/lib/configuration.nix" {
# device = "pine64-pinephone";
# })
./firmware.nix
./fs.nix
./kernel.nix
];
2022-05-23 10:06:29 +00:00
# XXX colin: phosh doesn't work well with passwordless login
users.users.colin.initialPassword = "147147";
services.getty.autologinUser = "root"; # allows for emergency maintenance?
2022-05-23 10:06:29 +00:00
2022-08-04 21:05:24 +00:00
# usability compromises
sane.impermanence.home-dirs = [
".librewolf"
];
# sane.home-manager.extraPackages = [
# # for web browsers see: https://forum.pine64.org/showthread.php?tid=13669
# pkgs.angelfish # plasma mobile web browser; broken on phosh (poor wayland support)
# # pkgs.plasma5Packages.index # file browser
# pkgs.plasma5Packages.konsole # terminal
# # pkgs.plasma5Packages.pix # picture viewer
# pkgs.plasma5Packages.kalk # calculator; broken on phosh
# # pkgs.plasma5Packages.buho # (plasma mobile?) note application
# pkgs.plasma5Packages.kasts # podcast app; works on phosh after setting QT envar
# pkgs.plasma5Packages.koko # image gallery; broken on phosh
# pkgs.plasma5Packages.kwave # media player.
# # pkgs.plasma5Packages.neochat # matrix client. needs qcoro => no aarch64 support
# # pkgs.plasma5Packages.plasma-dialer # phone dialer
# # pkgs.plasma5Packages.plasma-mobile # the whole shebang?
# # pkgs.plasma5Packages.plasma-settings
# pkgs.plasma5Packages.bomber # arcade game; broken on phosh
# pkgs.plasma5Packages.kapman # pacman
# pkgs.st # suckless terminal; broken on phosh
# # pkgs.alacritty # terminal; crashes phosh
# ];
# sane.home-packages.enableGuiPkgs = false; # XXX faster builds/imaging for debugging
2022-08-01 07:23:49 +00:00
sane.home-manager.extraPackages = [
pkgs.plasma5Packages.konsole # terminal
];
2022-08-01 07:23:49 +00:00
sane.nixcache.enable = true;
2022-08-04 21:05:24 +00:00
sane.impermanence.enable = true;
2022-08-01 07:23:49 +00:00
sane.gui.phosh.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
2022-09-21 10:25:23 +00:00
# /boot space is at a premium. default was 20.
boot.loader.generic-extlinux-compatible.configurationLimit = 10;
2022-08-06 22:48:05 +00:00
# mobile.bootloader.enable = false;
# mobile.boot.stage-1.enable = false;
# boot.initrd.systemd.enable = false;
# boot.initrd.services.swraid.enable = false; # attempt to fix dm_mod stuff
# mobile-nixos' /lib/firmware includes:
# rtl_bt (bluetooth)
# anx7688-fw.bin (USB-C -> HDMI bridge)
# ov5640_af.bin (camera module)
2022-08-06 22:48:05 +00:00
# hardware.firmware = [ config.mobile.device.firmware ];
hardware.firmware = [ pkgs.rtl8723cs-firmware ];
2022-06-07 00:39:40 +00:00
system.stateVersion = "21.11";
2022-05-30 21:56:31 +00:00
# defined: https://www.freedesktop.org/software/systemd/man/machine-info.html
# XXX colin: not sure which, if any, software makes use of this
environment.etc."machine-info".text = ''
CHASSIS="handset"
'';
2022-05-31 23:12:29 +00:00
# enable rotation sensor
hardware.sensor.iio.enable = true;
# from https://gitlab.manjaro.org/manjaro-arm/packages/community/phosh/alsa-ucm-pinephone
# mobile-nixos does this same thing
environment.variables.ALSA_CONFIG_UCM2 = "${./ucm2}";
systemd.services.pulseaudio.environment.ALSA_CONFIG_UCM2 = "${./ucm2}";
2022-08-01 07:23:49 +00:00
users.groups.feedbackd.gid = config.sane.allocations.feedbackd-gid;
}