Created
October 30, 2022 11:35
-
-
Save pshirshov/40e0a9548c2baf031b3bef6ef341fa1e to your computer and use it in GitHub Desktop.
pxe/nixos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: | |
{ | |
#... | |
services.pixiecore = let | |
nixos = (import "${lib.cleanSource pkgs.path}/nixos/lib/eval-config.nix" { | |
system = "x86_64-linux"; | |
modules = [ ./pxe.nix ]; | |
}); | |
build = nixos.config.system.build; | |
in { | |
enable = true; | |
openFirewall = true; | |
kernel = "${build.kernel}/bzImage"; | |
initrd = "${toString build.netbootRamdisk}/initrd"; | |
cmdLine = "init=.${build.toplevel}/init ${ | |
lib.concatStringsSep " " nixos.config.boot.kernelParams | |
} boot.shell_on_fail"; | |
dhcpNoBind = true; | |
}; | |
#... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, pkgs, config, modulesPath, ... }: | |
{ | |
services.getty.autologinUser = lib.mkForce "root"; | |
users.users.root.openssh.authorizedKeys.keys = [ config.sshkeys.pavel ]; | |
users.users.root.password = "nixos"; | |
boot.supportedFilesystems = [ "zfs" ]; | |
boot.kernelPackages = config.currentKernel; | |
imports = [ | |
(modulesPath + "/installer/netboot/netboot.nix") | |
(modulesPath + "/installer/cd-dvd/channel.nix") | |
../../shared-configs/consts.nix | |
../../shared-configs/generic/any.nix | |
]; | |
networking = { | |
hostName = "nixtmp"; | |
hostId = "00000000"; | |
}; | |
nixpkgs = { | |
overlays = [ | |
(self: super: { | |
nix-quick-install = pkgs.callPackage | |
"${config.localPkgs}/nix-quick-install/nix-quick-install.nix" { }; | |
}) | |
]; | |
}; | |
hardware = { | |
cpu.intel.updateMicrocode = true; | |
cpu.amd.updateMicrocode = true; | |
video.hidpi.enable = true; | |
}; | |
environment.systemPackages = with pkgs; [ nix-quick-install ]; | |
system.stateVersion = config.systemStateVersion; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like just
fixes the issue