1 { pkgs, lib, config, inputs, modulesPath, ... }:
4 pixiecore = config.services.pixiecore;
5 pxeHostName = "nixos-pxe";
6 nixos = import (modulesPath + "/../lib/eval-config.nix") {
9 # Required to avoid infinite recursion
10 # when `inputs` is used in `imports`.
14 ({ config, pkgs, lib, ... }: {
16 (modulesPath + "/installer/netboot/netboot-minimal.nix")
17 ../../nixos/default.nix
20 nixpkgs.hostPlatform = {
21 system = "x86_64-linux";
22 config = "x86_64-unknown-linux-gnu";
24 ## Some useful options for setting up a new system
25 services.getty.autologinUser = lib.mkForce "root";
26 users.users.root.openssh.authorizedKeys.keys =
27 hostConfig.users.users.julm.openssh.authorizedKeys.keys;
28 console.keyMap = "de";
29 # hardware.video.hidpi.enable = true;
31 system.stateVersion = config.system.nixos.release;
34 hostName = pxeHostName;
35 #hosts = nixosConfigurations;
36 #host = nixosConfigurations.${hostName}._module.args;
38 nixpkgs.overlays = import ../../nixpkgs/overlays.nix;
45 inputs.home-manager.nixosModules.home-manager
47 home-manager.useGlobalPkgs = true;
48 home-manager.useUserPackages = true;
49 home-manager.verbose = true;
50 #home-manager.force = true;
51 home-manager.backupFileExtension = "old";
52 home-manager.extraSpecialArgs = {
53 hostName = pxeHostName;
59 build = nixos.config.system.build;
62 services.pixiecore = {
69 kernel = "${build.kernel}/bzImage";
70 initrd = "${build.netbootRamdisk}/initrd";
71 cmdLine = "init=${build.toplevel}/init loglevel=4";
74 networking.nftables.ruleset = ''
77 udp dport 67 counter accept comment "Pixiecore/DHCP"
78 udp dport 69 counter accept comment "Pixiecore/TFTP"
79 udp dport 4011 counter accept comment "Pixiecore/ProxyDHCP"
80 tcp dport ${toString pixiecore.port} counter accept comment "Pixiecore"
81 tcp dport ${toString pixiecore.statusPort} counter accept comment "Pixiecore/status"