From a8b23e0189c6f7bf7100aafe3a2d24bb69efe924 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 08:40:08 +0000 Subject: [PATCH] scarab init --- flake.nix | 11 +++++++ hosts/scarab/default.nix | 64 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 hosts/scarab/default.nix diff --git a/flake.nix b/flake.nix index d0b592b..82621cd 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,17 @@ } ]; }; + scarab = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + { _module.args = { inherit inputs; }; } + (import "${inputs.mobile-nixos}/lib/configuration.nix" { + device = "oneplus-enchilada"; + }) + ./packages/default.nix + ./hosts/scarab/default.nix + ]; + }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix new file mode 100644 index 0000000..f63b472 --- /dev/null +++ b/hosts/scarab/default.nix @@ -0,0 +1,64 @@ +{ config, lib, pkgs, ... }: +let + + defaultUserName = "nixos"; + +in +{ + imports = [ ../default.nix ]; + + users.users."${defaultUserName}" = { + isNormalUser = true; + password = "1234"; + extraGroups = [ + "dialout" + "feedbackd" + "networkmanager" + "video" + "wheel" + ]; + }; + + mobile = { + beautification = { + silentBoot = lib.mkDefault true; + splash = lib.mkDefault true; + }; + boot.stage-1 = { + kernel.useStrictKernelConfig = true; + networking.enable = true; + }; + }; + + services.openssh.enable = true; + #services.pipewire = { + # enable = true; + # pulse.enable = true; + #}; + services.xserver.desktopManager.phosh = { + enable = true; + user = defaultUserName; + group = "users"; + }; + + #services.xserver.desktopManager.plasma5 = { + # enable = true; + # mobile.enable = true; + #}; + + programs.firefox.enable = true; + programs.calls.enable = true; + + hardware = { + bluetooth.enable = true; + sensor.iio.enable = true; + }; + + networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "oneplus-sdm845-firmware" + "oneplus-sdm845-firmware-xz" + ]; + system.stateVersion = "23.11"; +}