at 25.11-pre 751 B view raw
1{ config, lib, ... }: 2{ 3 4 ###### interface 5 6 options = { 7 8 systemd.enableEmergencyMode = lib.mkOption { 9 default = true; 10 type = lib.types.bool; 11 description = '' 12 Whether to enable emergency mode, which is an 13 {command}`sulogin` shell started on the console if 14 mounting a filesystem fails. Since some machines (like EC2 15 instances) have no console of any kind, emergency mode doesn't 16 make sense, and it's better to continue with the boot insofar 17 as possible. 18 ''; 19 }; 20 21 }; 22 23 ###### implementation 24 25 config = { 26 27 systemd.additionalUpstreamSystemUnits = lib.optionals config.systemd.enableEmergencyMode [ 28 "emergency.target" 29 "emergency.service" 30 ]; 31 32 }; 33 34}