forked from mirrors_public/oddlama_nix-config
refactor: split "real" modules and "config" modules
This commit is contained in:
parent
045f15239a
commit
cceae6c63c
60 changed files with 126 additions and 113 deletions
30
config/boot.nix
Normal file
30
config/boot.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
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";
|
||||
extraBin.ping = "${pkgs.iputils}/bin/ping";
|
||||
extraBin.cryptsetup = "${pkgs.cryptsetup}/bin/cryptsetup";
|
||||
# Give me a usable shell please
|
||||
users.root.shell = "${pkgs.bashInteractive}/bin/bash";
|
||||
storePaths = ["${pkgs.bashInteractive}/bin/bash"];
|
||||
};
|
||||
|
||||
# NOTE: Add "rd.systemd.unit=rescue.target" to debug initrd
|
||||
kernelParams = ["log_buf_len=16M"]; # must be {power of two}[KMG]
|
||||
tmp.useTmpfs = true;
|
||||
|
||||
loader.timeout = lib.mkDefault 2;
|
||||
};
|
||||
|
||||
console.earlySetup = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue