mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-22 00:00:03 +03:00
flake.nix: add netboot-bcachefs nixosSystem definition
define example bcachefs enabled nixos installer allows netboot to nixos installer with bcachefs kernel and -tools installed Signed-off-by: Kayla Firestack <dev@kaylafire.me>
This commit is contained in:
parent
fa27037e70
commit
c229fa7075
25
flake.nix
25
flake.nix
@ -27,6 +27,31 @@
|
||||
boot.initrd.supportedFilesystems = [ "bcachefs" ];
|
||||
boot.supportedFilesystems = [ "bcachefs" ];
|
||||
});
|
||||
|
||||
nixosConfigurations.netboot-bcachefs = self.systems.netboot-bcachefs "x86_64-linux";
|
||||
systems.netboot-bcachefs = system: (nixpkgs.lib.nixosSystem {
|
||||
inherit system; modules = [
|
||||
self.nixosModule
|
||||
self.nixosModules.bcachefs-enable-boot
|
||||
("${nixpkgs}/nixos/modules/installer/netboot/netboot-minimal.nix")
|
||||
({ lib, pkgs, config, ... }: {
|
||||
# installation disk autologin
|
||||
services.getty.autologinUser = lib.mkForce "root";
|
||||
users.users.root.initialPassword = "toor";
|
||||
|
||||
# Symlink everything together
|
||||
system.build.netboot = pkgs.symlinkJoin {
|
||||
name = "netboot";
|
||||
paths = with config.system.build; [
|
||||
netbootRamdisk
|
||||
kernel
|
||||
netbootIpxeScript
|
||||
];
|
||||
preferLocalBuild = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
});
|
||||
}
|
||||
// utils.lib.eachSystem supportedSystems (system:
|
||||
let pkgs = import nixpkgs {
|
||||
|
Loading…
Reference in New Issue
Block a user