pxeboot with nixos host configured and tested

This commit is contained in:
bogale 2026-10-28 00:27:53 +09:00
commit 2d4cf0b147
9 changed files with 268 additions and 89 deletions

View file

@ -1,7 +1,21 @@
{ config, pkgs, ... }: {
{ pkgs, ... }: {
boot = {
initrd = {
availableKernelModules = [ "nfsv4" ];
network.enable = true;
systemd.initrdBin = [ pkgs.nfs-utils ];
};
kernelParams = [ "ip=dhcp" ];
};
fileSystems."/" = {
device = "10.2.0.1:/";
fsType = "nfs4";
};
hardware.enableAllHardware = true;
imports = [
../common.nix
./hardware.nix
./ethernet.nix
];
networking.hostName = "nixos-pxeboot";
services.getty.autologinUser = "root";
}

198
pxeboot/ethernet.nix Normal file
View file

@ -0,0 +1,198 @@
{
boot.initrd.availableKernelModules = [
"3c59x"
"8139cp"
"8139too"
"8390"
"adin1110"
"adin1140"
"altera_tse"
"alx"
"amd8111e"
"amd-xgbe"
"atl1"
"atl1c"
"atl1e"
"atl2"
"atlantic"
"ax88796c"
"b44"
"bcmsysport"
"be2net"
"bna"
"bng_en"
"bnx2"
"bnx2x"
"bnxt_en"
"cassini"
"cavium_ptp"
"ch_ipsec"
"ch_ktls"
"cnic"
"cxgb"
"cxgb3"
"cxgb4"
"cxgb4vf"
"de2104x"
"dinghai10e"
"dl2k"
"dmfe"
"dwc-xlgmac"
"dwmac-dwc-qos-eth"
"dwmac-generic"
"dwmac-intel"
"dwmac-intel-plat"
"dwmac-motorcomm"
"e100"
"e1000"
"e1000e"
"ec_bhf"
"eea"
"ena"
"enc28j60"
"encx24j600"
"encx24j600-regmap"
"enic"
"epic100"
"et131x"
"ethoc"
"fbnic"
"fealnx"
"fm10k"
"forcedeth"
"funcore"
"funeth"
"gemini"
"genet"
"gve"
"hibmcge"
"hinic"
"hinic3"
"i40e"
"iavf"
"ice"
"idpf"
"igb"
"igbvf"
"igc"
"ionic"
"ixd"
"ixgbe"
"ixgbevf"
"jme"
"ks8842"
"ks8851_common"
"ks8851_par"
"ks8851_spi"
"ksz884x"
"lan743x"
"lan865x"
"lan966x-switch"
"libcxgb"
"libeth"
"libeth_xdp"
"libie"
"libie_adminq"
"libie_cp"
"libie_fwlog"
"libie_pci"
"libwx"
"liquidio"
"liquidio-core"
"liquidio_vf"
"litex_liteeth"
"ll_temac"
"macb"
"macb_pci"
"mana"
"mlx4_core"
"mlx4_en"
"mlx5_core"
"mlx5_dpll"
"mlxfw"
"mlxsw_core"
"mlxsw_i2c"
"mlxsw_minimal"
"mlxsw_pci"
"mlxsw_spectrum"
"mscc_ocelot"
"mscc_ocelot_switch_lib"
"mse102x"
"mvmdio"
"myri10ge"
"natsemi"
"ne2k-pci"
"netxen_nic"
"nfp"
"ngbe"
"ngbevf"
"nicpf"
"nicvf"
"niu"
"nixge"
"nps_enet"
"ns83820"
"oa_tc6"
"octeon_ep"
"octeon_ep_vf"
"pcnet32"
"pcnet_cs"
"pds_core"
"prestera"
"prestera_pci"
"qca_7k_common"
"qcaspi"
"qcauart"
"qcom-emac"
"qed"
"qede"
"qla3xxx"
"qlcnic"
"r6040"
"r8169"
"rmnet"
"rnpgbe"
"rocker"
"rtase"
"samsung-sxgbe"
"sc92031"
"sfc"
"sfc-falcon"
"sfc-siena"
"sis190"
"sis900"
"skge"
"sky2"
"slicoss"
"smsc911x"
"smsc9420"
"starfire"
"stmmac"
"stmmac_libpci"
"stmmac-pci"
"stmmac-platform"
"sundance"
"sungem"
"sunhme"
"tehuti"
"tg3"
"thunder_bgx"
"thunder_xcv"
"tlan"
"tn40xx"
"tsnep"
"tulip"
"txgbe"
"txgbevf"
"typhoon"
"uli526x"
"via-rhine"
"via-velocity"
"w5100"
"w5100-spi"
"winbond-840"
"xilinx_emac"
"xilinx_emaclite"
"xirc2ps_cs"
];
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
modulesPath,
...
}:
{
boot.initrd.network.enable = true;
fileSystems."/" = {
device = "";
fsType = "nfs";
};
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}