phone: Add initial configuration

This is an initial configuration of the PinePhone with a nixpkgs build
from 2023-11-15. Notably the installer uses uuids by default, so it's up
to the user to specify their own hardware-configuration.nix.
This commit is contained in:
Donovan Glover 2024-06-13 05:57:38 -04:00
parent fc69d7980f
commit 494f40e691
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 83 additions and 0 deletions

64
phone/configuration.nix Normal file
View File

@ -0,0 +1,64 @@
{ config, lib, pkgs, ... }:
{
imports = [
(import <mobile-nixos/lib/configuration.nix> { device = "pine64-pinephone"; })
./hardware-configuration.nix
<mobile-nixos/examples/phosh/phosh.nix>
];
networking.hostName = "mobile-nixos";
#
# Opinionated defaults
#
# Use Network Manager
networking.wireless.enable = false;
networking.networkmanager.enable = true;
# Use PulseAudio
hardware.pulseaudio.enable = true;
# Enable Bluetooth
hardware.bluetooth.enable = true;
# Bluetooth audio
hardware.pulseaudio.package = pkgs.pulseaudioFull;
# Enable power management options
powerManagement.enable = true;
# It's recommended to keep enabled on these constrained devices
zramSwap.enable = true;
# Auto-login for phosh
services.xserver.desktopManager.phosh = {
user = "user";
};
#
# User configuration
#
users.users."user" = {
isNormalUser = true;
description = "User";
password = "user";
extraGroups = [
"dialout"
"feedbackd"
"networkmanager"
"video"
"wheel"
];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -0,0 +1,19 @@
# NOTE: this file was generated by the Mobile NixOS installer.
{ config, lib, pkgs, ... }:
{
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/63546625-e99c-4aa4-ba11-ff193ad13047";
fsType = "ext4";
};
};
boot.initrd.luks.devices = {
"LUKS-MOBILE-NIXOS-ROOTFS" = {
device = "/dev/disk/by-uuid/28e0bd73-e4fb-4002-9b17-a494823e6999";
};
};
nix.settings.max-jobs = lib.mkDefault 2;
}