forked from mirrors_public/oddlama_nix-config
fix: only set boot.initrd.systemd.enable = true for non containers
This commit is contained in:
parent
f2db8d3d22
commit
054103a004
2 changed files with 16 additions and 14 deletions
|
@ -4,20 +4,22 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot = {
|
||||
initrd.systemd = {
|
||||
enable = true;
|
||||
emergencyAccess = config.repo.secrets.global.root.hashedPassword;
|
||||
# TODO good idea? targets.emergency.wants = ["network.target" "sshd.service"];
|
||||
extraBin.ip = "${pkgs.iproute2}/bin/ip";
|
||||
config = lib.mkIf (!config.boot.isContainer) {
|
||||
boot = {
|
||||
initrd.systemd = {
|
||||
enable = true;
|
||||
emergencyAccess = config.repo.secrets.global.root.hashedPassword;
|
||||
# TODO good idea? targets.emergency.wants = ["network.target" "sshd.service"];
|
||||
extraBin.ip = "${pkgs.iproute2}/bin/ip";
|
||||
};
|
||||
|
||||
# NOTE: Add "rd.systemd.unit=rescue.target" to debug initrd
|
||||
kernelParams = ["log_buf_len=10M"];
|
||||
tmp.useTmpfs = true;
|
||||
|
||||
loader.timeout = lib.mkDefault 2;
|
||||
};
|
||||
|
||||
# NOTE: Add "rd.systemd.unit=rescue.target" to debug initrd
|
||||
kernelParams = ["log_buf_len=10M"];
|
||||
tmp.useTmpfs = true;
|
||||
|
||||
loader.timeout = lib.mkDefault 2;
|
||||
console.earlySetup = true;
|
||||
};
|
||||
|
||||
console.earlySetup = true;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ guestName: guestCfg: {
|
|||
substring
|
||||
;
|
||||
|
||||
initialLinkName = "mv-${(substring 0 13 (builtins.hashString "sha256" guestName))}";
|
||||
initialLinkName = "mv-${(substring 0 12 (builtins.hashString "sha256" guestName))}";
|
||||
in {
|
||||
autoStart = guestCfg.autostart;
|
||||
macvlans = ["${guestCfg.container.macvlan}:${initialLinkName}"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue