summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock17
-rw-r--r--flake.nix10
-rw-r--r--hosts/default.nix9
-rw-r--r--hosts/muspell/default.nix60
4 files changed, 91 insertions, 5 deletions
diff --git a/flake.lock b/flake.lock
index 283709a..b085342 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,21 @@
{
"nodes": {
+ "mobile-nixos": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1743812405,
+ "narHash": "sha256-BedQ9Z3+nqtp9BRjHjJNPUeLIMVbTsP3Udbz0b1cUn0=",
+ "owner": "mobile-nixos",
+ "repo": "mobile-nixos",
+ "rev": "6679fd7a8dd4ccf4aa538b82216723861cfe61a2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "mobile-nixos",
+ "repo": "mobile-nixos",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1746557022,
@@ -18,6 +34,7 @@
},
"root": {
"inputs": {
+ "mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs"
}
}
diff --git a/flake.nix b/flake.nix
index 329ddfc..09e96ee 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,10 +3,16 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
+ mobile-nixos = {
+ url = "github:mobile-nixos/mobile-nixos";
+ flake = false;
+ };
};
- outputs = { self, nixpkgs }: {
+ outputs = { self, nixpkgs, mobile-nixos }: {
nixosConfigurations =
- import ./hosts { inherit nixpkgs; };
+ import ./hosts {
+ inherit nixpkgs mobile-nixos;
+ };
};
}
diff --git a/hosts/default.nix b/hosts/default.nix
index deba17c..015e307 100644
--- a/hosts/default.nix
+++ b/hosts/default.nix
@@ -1,4 +1,4 @@
-{ nixpkgs }:
+{ nixpkgs, mobile-nixos }:
let
mkHost = system: hostname: modules: {
@@ -6,7 +6,7 @@ let
inherit system;
modules = [ ../modules ../users ] ++ modules;
specialArgs = {
- inherit hostname nixpkgs;
+ inherit hostname nixpkgs mobile-nixos;
};
};
};
@@ -27,7 +27,7 @@ let
(system: hostnames:
map (h: mkHost system h [./${h}]) hostnames)
systemsHosts)));
-
+
hostsImport = file:
import file {
inherit nixpkgs mkHost hosts;
@@ -37,5 +37,8 @@ hosts {
"x86_64-linux" = [
"thyme"
];
+ "aarch64-linux" = [
+ "muspell"
+ ];
} //
hostsImport ./ades
diff --git a/hosts/muspell/default.nix b/hosts/muspell/default.nix
new file mode 100644
index 0000000..ec3572c
--- /dev/null
+++ b/hosts/muspell/default.nix
@@ -0,0 +1,60 @@
+{ mobile-nixos, lib, pkgs, ... }:
+
+{
+ imports = [
+ (import "${mobile-nixos}/lib/configuration.nix" {
+ device = "pine64-pinephone";
+ })
+ ];
+
+ this.locales.default = "us";
+
+ time.timeZone = "America/Chicago";
+
+ this.pc.enable = true;
+ this.overlays.emacs.enable = lib.mkForce false;
+
+ this.users.enabled = ["simon"];
+
+ this.sets = {
+ cli.tools.full = true;
+ de.utils = true;
+ media.tools = true;
+ net.tools.minimal = true;
+ script.utils = true;
+ sound.tools = true;
+ sys.tools = true;
+ };
+
+ services.xserver = {
+ enable = true;
+ desktopManager.plasma5.mobile.enable = true;
+ displayManager.lightdm = {
+ enable = true;
+ # Workaround for autologin only working at first launch.
+ # A logout or session crashing will show the login screen otherwise.
+ extraSeatDefaults = ''
+ session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
+ '';
+ };
+ };
+ programs.firefox = {
+ enable = true;
+ package = pkgs.firefox-esr;
+ };
+
+ hardware.bluetooth.enable = true;
+ powerManagement.enable = true;
+ services.libinput.enable = true;
+ services.displayManager.defaultSession = "plasma-mobile";
+ services.displayManager.autoLogin.enable = true;
+
+ # Ensures any rndis config from stage-1 is not clobbered by NetworkManager
+ networking.networkmanager.unmanaged = [ "rndis0" "usb0" ];
+
+ # Setup USB gadget networking in initrd...
+ mobile.boot.stage-1.networking.enable = true;
+
+ nixpkgs.hostPlatform = "aarch64-linux";
+ system.stateVersion = "24.11";
+}