From 64e4c9c1b222e7f30bd1b902468ec5491b007ae4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 8 Oct 2024 20:22:11 -0500 Subject: [PATCH] Started building at least...? --- flake.nix | 54 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index c04d387..f668d30 100644 --- a/flake.nix +++ b/flake.nix @@ -656,24 +656,48 @@ # .outputs # .disk-image; - pinephone = nixpkgs-unstable.lib.nixosSystem { + pinephone = let system = "aarch64-linux"; - modules = with nixosModules; [ - # TODO: how do I build this image? - linux - home-manager-defaults + inherit (nixpkgs-unstable) lib; + in + lib.nixosSystem { + inherit system; + modules = with nixosModules; [ + # TODO: how do I build this as a .img to flash to an SD card? - # outputs.diskoConfigurations.unencrypted # can I even disko with an image-based installation? - common - wifi + # for testing, this seems to work `nixos-rebuild build --impure --flake .#pinephone` - { - imports = [ - (import "${mobile-nixos}/lib/configuration.nix" {device = "pine64-pinephone";}) - ]; - } - ]; - }; + { + # enable cross-compiling with impure + nixpkgs.buildPlatform = builtins.currentSystem; + nixpkgs.hostPlatform = system; + } + + linux + home-manager-unstable-defaults + + # outputs.diskoConfigurations.unencrypted # can I even disko with an image-based installation? + common + wifi + + { + system.stateVersion = "24.11"; + } + + { + imports = [ + (import "${mobile-nixos}/lib/configuration.nix" {device = "pine64-pinephone";}) + ]; + + # TODO: quirk: since the pinephone kernel doesn't seem to have "rpfilter" support, firewall ain't working + networking.firewall.enable = lib.mkForce false; + + # TODO: quirk: since git send-email requires perl support, which we don't seem to have on the pinephone, we're just disabling git for now + # TODO: would likely be easier/better to somehow ignore the assertion? probably a way to do that... + programs.git.enable = lib.mkForce false; + } + ]; + }; }; homeConfigurations = {