Merge pull request #197867 from SuperSandro2000/vconsole-accesible

This commit is contained in:
Sandro 2022-11-13 01:29:15 +01:00 committed by GitHub
commit f0bf1796a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 5 deletions

@ -34,14 +34,16 @@ let
"/share/unimaps"
];
};
setVconsole = !config.boot.isContainer;
in
{
###### interface
options.console = {
enable = mkEnableOption (lib.mdDoc "virtual console") // {
default = true;
};
font = mkOption {
type = with types; either str path;
default = "Lat2-Terminus16";
@ -125,11 +127,17 @@ in
'');
}
(mkIf (!setVconsole) {
systemd.services.systemd-vconsole-setup.enable = false;
(mkIf (!cfg.enable) {
systemd.services = {
"serial-getty@ttyS0".enable = false;
"serial-getty@hvc0".enable = false;
"getty@tty1".enable = false;
"autovt@".enable = false;
systemd-vconsole-setup.enable = false;
};
})
(mkIf setVconsole (mkMerge [
(mkIf cfg.enable (mkMerge [
{ environment.systemPackages = [ pkgs.kbd ];
# Let systemd-vconsole-setup.service do the work of setting up the

@ -7,8 +7,11 @@ with lib;
config = mkIf config.boot.isContainer {
# Disable some features that are not useful in a container.
boot.kernel.enable = false;
console.enable = mkDefault false;
nix.optimise.automatic = mkDefault false; # the store is host managed
powerManagement.enable = mkDefault false;
documentation.nixos.enable = mkDefault false;