New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/pxe: init (WIP, do not merge) #83443
Conversation
# system = ...; | ||
}; | ||
in | ||
pkgs.symlinkJoin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the symlinkJoin here:
This is what I am using:
services.pixiecore = let
nixos = import <nixpkgs/nixos> {
configuration = { config, pkgs, lib, ... }: with lib; {
imports = [
<nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>
];
# Some useful options for setting up a new system
services.mingetty.autologinUser = mkForce "root";
# Enable sshd which gets disabled by netboot-minimal.nix
systemd.services.sshd.wantedBy = mkOverride 0 [ "multi-user.target" ];
# users.users.root.openssh.authorizedKeys.keys = [ ... ];
# i18n.consoleKeyMap = "de";
};
};
build = nixos.config.system.build;
in {
enable = true;
openFirewall = true;
mode = "boot";
kernel = "${build.kernel}/bzImage";
initrd = "${toString build.netbootRamdisk}/initrd";
cmdLine = "init=${build.netbootIpxeScript} ${lib.concatStringsSep " " nixos.config.boot.kernelParams} debug";
dhcpNoBind = true;
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also people want likely pass there own NixOS configuration to the netboot instance as well. You can have a look at containers.<name>.config
in nixpkgs/nixos/modules/virtualisation/containers.nix
would be interested in testing but there are several issues on nixos-unstable. |
There was a bug in the pixiecore module by the way: #87664 booting should work now. |
This pr has a merge conflict now. |
I did a rebase 3 days ago. I'll try to find some time to address the issues this week. |
(pkgs.path + "/nixos/modules/installer/netboot/netboot-minimal.nix") | ||
]; | ||
## Some useful options for setting up a new system | ||
services.mingetty.autologinUser = mkForce "root"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a reasonable default, but some users might want to disable it. Is there a way to apply it without mkForce
?
# users.users.root.openssh.authorizedKeys.keys = [ ... ]; | ||
# i18n.consoleKeyMap = "de"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be better in documentation.
I marked this as stale due to inactivity. → More info |
I'll try to find time for this soon. |
Ignore the first commit. It's from another PR not yet merged.
Can someone tell me why I can call
nix-build -E 'with import <nixpkgs> {}; callPackage ./netboot.nix {}'
fine but if I try to build the module withnixos-rebuild build
I get: