mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-12 12:46:37 +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
|
let
|
||||||
inherit (nixpkgs.lib) nixosSystem;
|
inherit (nixpkgs.lib) nixosSystem;
|
||||||
inherit (nixpkgs.legacyPackages.x86_64-linux) nixpkgs-fmt callPackage;
|
inherit (nixpkgs.legacyPackages.x86_64-linux) nixpkgs-fmt callPackage;
|
||||||
@ -77,10 +77,22 @@
|
|||||||
then "aarch64-linux"
|
then "aarch64-linux"
|
||||||
else "x86_64-linux";
|
else "x86_64-linux";
|
||||||
specialArgs = attrs // { nix-config = self; };
|
specialArgs = attrs // { nix-config = self; };
|
||||||
modules = [
|
modules =
|
||||||
./${file}
|
[
|
||||||
./${directory}/${file}
|
./${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};
|
else import ./${directory}/${file};
|
||||||
})
|
})
|
||||||
|
@ -43,7 +43,7 @@ in
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
hardware = {
|
hardware = {
|
||||||
opengl.driSupport32Bit = true;
|
opengl.driSupport32Bit = mkIf (!phone) true;
|
||||||
|
|
||||||
pulseaudio = mkIf phone {
|
pulseaudio = mkIf phone {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user