mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-11 04:06:39 +02:00
flake: Properly handle mobile-nixos module import
This was necessary to avoid issues with conditional imports.
This commit is contained in:
parent
2bb4847198
commit
8ceb1bf511
22
flake.nix
22
flake.nix
@ -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};
|
||||
})
|
||||
|
@ -43,7 +43,7 @@ in
|
||||
|
||||
config = {
|
||||
hardware = {
|
||||
opengl.driSupport32Bit = true;
|
||||
opengl.driSupport32Bit = mkIf (!phone) true;
|
||||
|
||||
pulseaudio = mkIf phone {
|
||||
enable = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user