feat: maoam pinephone

This commit is contained in:
Benjamin Bädorf 2023-09-12 20:11:29 +02:00
parent 7be9e41657
commit 3fcb1e3c4e
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
6 changed files with 102 additions and 0 deletions

View file

@ -138,6 +138,10 @@
system = "aarch64-linux"; system = "aarch64-linux";
modules = [nixos-hardware.nixosModules.raspberry-pi-4]; modules = [nixos-hardware.nixosModules.raspberry-pi-4];
}; };
maoam = {
system = "aarch64-linux";
};
}; };
importables = rec { importables = rec {
profiles = profiles =
@ -198,6 +202,10 @@
pie = { pie = {
sshUser = "yule"; sshUser = "yule";
}; };
maoam = {
sshUser = "b12f";
};
#example = { #example = {
# hostname = "example.com:22"; # hostname = "example.com:22";
# sshUser = "bartender"; # sshUser = "bartender";

View file

@ -0,0 +1,53 @@
{ config, lib, pkgs, ... }:
let
mobile-nixos = pkgs.fetchFromGithub {
owner = "NixOS";
repo = "mobile-nixos";
rev = "d22c60e8d4d21f0197c1cac88c34dcc366b7a16c";
sha256 = "";
};
in {
imports = [
(import <mobile-nixos/lib/configuration.nix> { device = "pine64-pinephone"; })
./hardware-configuration.nix
<mobile-nixos/examples/phosh/phosh.nix>
];
# 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 = "b12f";
};
mobile.boot.stage-1.firmware = [
config.mobile.device.firmware
];
services.openssh.enable = true;
# 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?
}

7
hosts/maoam/default.nix Normal file
View file

@ -0,0 +1,7 @@
{suites, ...}: {
imports =
[
./maoam.nix
]
++ suites.maoam;
}

View file

@ -0,0 +1,18 @@
# NOTE: this file was generated by the Mobile NixOS installer.
{ config, lib, pkgs, ... }:
{
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/51a668b8-fa2e-4d3e-ac3f-73ca002d0004";
fsType = "ext4";
};
};
boot.initrd.luks.devices = {
"LUKS-MAOAM-ROOTFS" = {
device = "/dev/disk/by-uuid/5dd0cc1e-abfa-4192-94da-ac43622116fb";
};
};
nix.settings.max-jobs = lib.mkDefault 2;
}

15
hosts/maoam/maoam.nix Normal file
View file

@ -0,0 +1,15 @@
{
config,
pkgs,
lib,
self,
...
}:
with lib; let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in {
imports = [
./configuration.nix
];
}

View file

@ -26,6 +26,7 @@ in {
"networkmanager" "networkmanager"
"scanner" "scanner"
"video" "video"
"dialout"
"wheel" "wheel"
]; ];
shell = pkgs.bash; shell = pkgs.bash;