Add debug module

This commit is contained in:
Jakob Lechner 2025-04-04 18:38:13 +02:00
parent eabbabc417
commit 49c95ffc6a
2 changed files with 17 additions and 0 deletions

16
modules/debug.nix Normal file
View file

@ -0,0 +1,16 @@
{ config, lib, ... }:
let
cfg = config.jalr.debug;
in
{
options.jalr.debug = {
enable = lib.mkEnableOption "debugging helpers, DO NOT USE IN PRODUCTION!";
};
config = lib.mkIf cfg.enable {
services.getty.autologinUser = "root";
boot.initrd.systemd.emergencyAccess = true;
systemd.enableEmergencyMode = true;
boot.kernelParams = [ "systemd.setenv=SYSTEMD_SULOGIN_FORCE=1" ];
};
}

View file

@ -21,6 +21,7 @@
./aws.nix ./aws.nix
./bluetooth.nix ./bluetooth.nix
./bootloader ./bootloader
./debug.nix
./dji-goggles.nix ./dji-goggles.nix
./dns.nix ./dns.nix
./fish.nix ./fish.nix