mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
neededForBoot, supportedFilesystems
This commit is contained in:
parent
ff87aaa6c9
commit
89220def41
2 changed files with 47 additions and 10 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"rw"
|
"rw"
|
||||||
"nfsroot=${config.netImage.nfsRoot},v3"
|
"nfsroot=${config.netImage.nfsRoot},v3"
|
||||||
"ip=dhcp"
|
# "ip=dhcp"
|
||||||
"root=/dev/nfs"
|
"root=/dev/nfs"
|
||||||
"rootwait"
|
"rootwait"
|
||||||
"elevator=deadline"
|
"elevator=deadline"
|
||||||
|
|
|
||||||
|
|
@ -127,24 +127,61 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
boot.initrd.network.enable = true;
|
# net
|
||||||
# boot.initrd.postDeviceCommands = ''
|
networking.useDHCP = lib.mkForce true;
|
||||||
# mkdir -p $out/mnt-root
|
networking.interfaces.eth0.useDHCP = lib.mkForce true;
|
||||||
# '';
|
networking.interfaces.wlan0.useDHCP = lib.mkForce false;
|
||||||
boot.initrd.extraUtilsCommands = ''
|
|
||||||
mkdir -p $out/mnt-root
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
# boot
|
||||||
|
boot.initrd.network.enable = lib.mkForce true;
|
||||||
|
boot.initrd.network.flushBeforeStage2 = lib.mkForce false;
|
||||||
|
boot.initrd.supportedFilesystems = [
|
||||||
|
# Network File System (NFS) support for mounting root over the network
|
||||||
|
"nfs"
|
||||||
|
# Overlay filesystem for layering file systems
|
||||||
|
"overlay"
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
# Network File System (NFS) module
|
||||||
|
"nfs"
|
||||||
|
# Overlay filesystem module
|
||||||
|
"overlay"
|
||||||
|
# Broadcom PHY library for Ethernet device support
|
||||||
|
"bcm_phy_lib"
|
||||||
|
# Broadcom-specific driver module
|
||||||
|
"broadcom"
|
||||||
|
# Broadcom GENET Ethernet controller driver
|
||||||
|
"genet"
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.kernelModules = [
|
||||||
|
# Network File System (NFS) module
|
||||||
|
"nfs"
|
||||||
|
# Overlay filesystem module
|
||||||
|
"overlay"
|
||||||
|
# Broadcom PHY library for Ethernet device support
|
||||||
|
"bcm_phy_lib"
|
||||||
|
# Broadcom-specific driver module
|
||||||
|
"broadcom"
|
||||||
|
# Broadcom GENET Ethernet controller driver
|
||||||
|
"genet"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
# fileSystems
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/boot/firmware" = {
|
"/boot/firmware" = {
|
||||||
device = "${config.netImage.nfsRoot}/boot/firmware";
|
device = "${config.netImage.nfsRoot}/boot/firmware";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = config.netImage.nfsOptions;
|
# options = config.netImage.nfsOptions;
|
||||||
|
neededForBoot = lib.mkForce true;
|
||||||
};
|
};
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "${config.netImage.nfsRoot}";
|
device = "${config.netImage.nfsRoot}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = config.netImage.nfsOptions;
|
# options = config.netImage.nfsOptions;
|
||||||
|
neededForBoot = lib.mkForce true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue