refactor: try to support cross compile nixos config

This commit is contained in:
xinyangli 2024-08-28 11:39:43 +08:00
parent 6e5b5e8c98
commit a341473f6c
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
6 changed files with 46 additions and 40 deletions

View file

@ -16,6 +16,7 @@ in
};
config = lib.mkIf cfg {
nixpkgs.hostPlatform = "x86_64-linux";
boot.initrd.availableKernelModules = [
"ata_piix"
"xhci_pci"

View file

@ -25,6 +25,8 @@ in
};
config = mkIf config.isLightsail {
nixpkgs.hostPlatform = "x86_64-linux";
boot.loader.grub.device = "/dev/nvme0n1";
# from nixpkgs amazon-image.nix

View file

@ -19,5 +19,5 @@
device = "/dev/sda1";
fsType = "ext4";
};
nixpkgs.hostPlatform = "aarch64-linux";
}

View file

@ -17,6 +17,8 @@
})
];
nixpkgs.hostPlatform = "aarch64-linux";
environment.systemPackages = with pkgs; [
git
libraspberrypi