flake: Properly handle mobile-nixos module import

This was necessary to avoid issues with conditional imports.
This commit is contained in:
Donovan Glover 2024-06-14 13:18:42 -04:00
parent 2bb4847198
commit 8ceb1bf511
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 18 additions and 6 deletions

View File

@ -26,7 +26,7 @@
};
};
outputs = { self, nixpkgs, ... } @ attrs:
outputs = { self, nixpkgs, mobile-nixos, ... } @ attrs:
let
inherit (nixpkgs.lib) nixosSystem;
inherit (nixpkgs.legacyPackages.x86_64-linux) nixpkgs-fmt callPackage;
@ -77,10 +77,22 @@
then "aarch64-linux"
else "x86_64-linux";
specialArgs = attrs // { nix-config = self; };
modules = [
./${file}
./${directory}/${file}
];
modules =
[
./${file}
./${directory}/${file}
] ++ nixpkgs.lib.optionals (file == "phone.nix") [
(import "${mobile-nixos}/lib/configuration.nix" {
device = "pine64-pinephone";
})
{
mobile.beautification = {
silentBoot = nixpkgs.lib.mkDefault true;
splash = nixpkgs.lib.mkDefault true;
};
}
];
}
else import ./${directory}/${file};
})

View File

@ -43,7 +43,7 @@ in
config = {
hardware = {
opengl.driSupport32Bit = true;
opengl.driSupport32Bit = mkIf (!phone) true;
pulseaudio = mkIf phone {
enable = true;