lol

kbd module: don't setup vconsoles if we are in a container

+27 -18
+27 -18
nixos/modules/tasks/kbd.nix
··· 12 FONT=${config.i18n.consoleFont} 13 ${colors} 14 ''; 15 in 16 17 { ··· 41 42 ###### implementation 43 44 - config = { 45 46 - environment.systemPackages = [ pkgs.kbd ]; 47 48 - # Let systemd-vconsole-setup.service do the work of setting up the 49 - # virtual consoles. FIXME: trigger a restart of 50 - # systemd-vconsole-setup.service if /etc/vconsole.conf changes. 51 - environment.etc."vconsole.conf".source = vconsoleConf; 52 53 - # This is identical to the systemd-vconsole-setup.service unit 54 - # shipped with systemd, except that it uses /dev/tty1 instead of 55 - # /dev/tty0 to prevent putting the X server in non-raw mode, and 56 - # it has a restart trigger. 57 - systemd.services."systemd-vconsole-setup" = 58 - { wantedBy = [ "multi-user.target" ]; 59 - before = [ "display-manager.service" ]; 60 - after = [ "systemd-udev-settle.service" ]; 61 - restartTriggers = [ vconsoleConf ]; 62 - }; 63 - 64 - }; 65 66 }
··· 12 FONT=${config.i18n.consoleFont} 13 ${colors} 14 ''; 15 + 16 + setVconsole = !config.boot.isContainer; 17 in 18 19 { ··· 43 44 ###### implementation 45 46 + config = mkMerge [ 47 + (mkIf (!setVconsole) { 48 + systemd.services."systemd-vconsole-setup".enable = false; 49 + }) 50 51 + (mkIf setVconsole { 52 + environment.systemPackages = [ pkgs.kbd ]; 53 54 + # Let systemd-vconsole-setup.service do the work of setting up the 55 + # virtual consoles. FIXME: trigger a restart of 56 + # systemd-vconsole-setup.service if /etc/vconsole.conf changes. 57 + environment.etc = [ { 58 + target = "vconsole.conf"; 59 + source = vconsoleConf; 60 + } ]; 61 62 + # This is identical to the systemd-vconsole-setup.service unit 63 + # shipped with systemd, except that it uses /dev/tty1 instead of 64 + # /dev/tty0 to prevent putting the X server in non-raw mode, and 65 + # it has a restart trigger. 66 + systemd.services."systemd-vconsole-setup" = 67 + { wantedBy = [ "multi-user.target" ]; 68 + before = [ "display-manager.service" ]; 69 + after = [ "systemd-udev-settle.service" ]; 70 + restartTriggers = [ vconsoleConf ]; 71 + }; 72 + }) 73 + ]; 74 75 }