parent
da5bdb3d47
commit
cca2a0ed75
38 changed files with 1095 additions and 3272 deletions
modules/config
19
modules/config/minimal-modules.nix
Normal file
19
modules/config/minimal-modules.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, ... }: {
|
||||
|
||||
options.boot.kernel.minimalModules = lib.mkEnableOption "minimal kernel modules";
|
||||
|
||||
config = lib.mkIf config.boot.kernel.minimalModules {
|
||||
|
||||
# Don't include kernel or its modules in rootfs
|
||||
boot.kernel.enable = false;
|
||||
boot.modprobeConfig.enable = false;
|
||||
boot.bootspec.enable = false;
|
||||
system.build = { inherit (config.boot.kernelPackages) kernel; };
|
||||
system.modulesTree = [ config.boot.kernelPackages.kernel ] ++ config.boot.extraModulePackages;
|
||||
|
||||
# Modules must be loaded by initrd
|
||||
boot.initrd.kernelModules = config.boot.kernelModules;
|
||||
|
||||
};
|
||||
|
||||
}
|
17
modules/config/minimal-system.nix
Normal file
17
modules/config/minimal-system.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
nixpkgs.overlays = [(self: super: {
|
||||
|
||||
systemdUkify = self.callPackage ../../pkgs/systemd-ukify.nix { inherit super; };
|
||||
|
||||
qemu_tiny = self.callPackage ../../pkgs/qemu.nix { inherit super; };
|
||||
|
||||
composefs = self.callPackage ../../pkgs/composefs.nix { inherit super; };
|
||||
|
||||
# dbus = super.dbus.override {
|
||||
# enableSystemd = false;
|
||||
# };
|
||||
|
||||
})];
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue