Commit Graph
974484 Commits
Author SHA1 Message Date
Arian van Putten 2b1adfc10d nixos/nspawn-container: don't enable console
Serial terminals should work regardless of vconsole settings now
2026-04-04 10:28:24 +02:00
Arian van Putten 1ad99d9e4b nixos/getty: do not conditionalize on console
## What this fixes: 

Currently ; logging in to nixos containers is broken as they do not get spawned a login shell at all. This was noticed in https://github.com/NixOS/nixpkgs/pull/470248.  Also no login shell is spawned when the bashless profile is enabled. 

##  How it fixes this

It makes it so that `console.enable` really just controls whether virtual console setup is done or not.

all the tty units are just unconditionally included as before instead of masked.

Systemd already takes care of not starting them up when they're not needed through `Condition` clauses and through the `systemd-getty-generator`.   There is no reason to manually mask (what is what `enable =  false; does) getty units. systemd already does the right thing.

## How we got here:

We have `modules/config/console.nix` . This module is what sets up the **virtual console**. That is; the graphical console that Linux ships with that by default is on `/dev/tty1` (and thus on `/dev/console` on single-user instances).

This module used to disable `systemd-vconsole-setup` when `isContainer`  was `true` as  nspawn containers do not have a virtual console; instead `/dev/console`  is a PTS device that gets mounted into the container.

https://github.com/NixOS/nixpkgs/pull/197867/changes  was then merged that made it so that the entire module gets disabled in containers. This is nice because this means we don't install `kbd` package etc in container profile which reduces the footprint.

Somebody commented that they expected this module to also disable TTY services when set to disable due to the wording being `enable virtual console`.   

However, getty services and virtual console have nothing to do with eachother. This module is to configure the virtual console fonts; not to configure gettys!    

It's perfectly possible to have TTYs without having a virtual console!  Namely serial consoles and hypervisors consoles `ttyS0`, `ttyAMA0`, `hvc0` .

A comment was made by  rnhmjoj  correctly pointing this out

> > Tried out false, does not disable the getty target/services.
> 
> It's not mean to: this module solely takes care of configuring the console (keymap, font, colors, ...), not providing one. That's why I say the "enable virtual console" description is misleading.
https://github.com/NixOS/nixpkgs/pull/197867#issuecomment-1294204444 

However, instead of thus just merging as is; a change was made to start disabling _some_ getty services.  However (probably by accident); `console-getty.service` and `container-getty@.service` were *not* disabled. So nixos-containers kept working.

> Ok, that makes sense.
> 
> I think if this goes in it either needs a doc change like you asked for, or to also toggle the getty service so it does what the current docs imply.

https://github.com/NixOS/nixpkgs/pull/197867#issuecomment-1294383386

At this point; disabling the virtual console module would break setups that don't have a virtual console in the first place!  This includes: servers, containers, anything without a graphical display. However; because the tty list was incomplete and `console-getty.service` was *not* disabled; containers kept working.

A follow-up PR was then made (even though the original code was not correct) that added the remaining gettys https://github.com/NixOS/nixpkgs/pull/363533 . This meant all the use-cases where there is no virtual console and disable the virtual console are now properly broken. 

To date that is the [bashless profile](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/bashless.nix) and the [container profile](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/container-config.nix)

This then got noticed by  https://github.com/NixOS/nixpkgs/pull/470248 as it uncovered that login shells are not being spawned anymore inside nspawn containers.  

I then started looking into the PRs and backtracked how we got here.
2026-04-04 10:27:25 +02:00
lassulusandGitHub 70db4b5642 zdoom: drop (#506420) 2026-04-04 08:17:04 +00:00
Vladimír ČunátandGitHub 5ffb0d870c Revert "Make ec2 tests a channel blocker" (#506533) 2026-04-04 10:16:00 +02:00
nixpkgs-ci[bot]andGitHub bf7e4c8d51 kubectl-rook-ceph: 0.9.5 -> 0.9.6 (#506473) 2026-04-04 08:01:05 +00:00
Vladimír ČunátandGitHub 36e12b6d18 openvpn: 2.6.14 -> 2.6.19 (#489016) 2026-04-04 08:00:08 +00:00
Franz PletzandGitHub ac5df5a861 nixos/systemd-networkd: Add missing network options to type checker (#506245) 2026-04-04 07:57:39 +00:00
zowoqandGitHub 8f3e353ba1 fzf: 0.70.0 -> 0.71.0 (#506532) 2026-04-04 07:55:57 +00:00
Arian van PuttenandGitHub e878daad79 Revert "Make ec2 tests a channel blocker" 2026-04-04 09:54:35 +02:00
Gaétan LepageandGitHub 53441e4ce8 rtk: 0.33.1 -> 0.34.3 (#506472) 2026-04-04 07:45:09 +00:00
Heitor AugustoandGitHub 3ec60639c8 luau-lsp: 1.62.0 -> 1.64.1 (#498155) 2026-04-04 07:19:50 +00:00
R. Ryantm 6f8d93d378 fzf: 0.70.0 -> 0.71.0 2026-04-04 07:15:07 +00:00
Vladimír ČunátandGitHub 5572afe7b6 calibre: 9.5.0 -> 9.6.0 (#505019) 2026-04-04 07:13:09 +00:00
Vladimír ČunátandGitHub 9120ee3d46 firewalld: fix CVE-2026-4948 (#505344) 2026-04-04 07:12:30 +00:00
YtandGitHub 6d75d72ecd python3Packages.cleanlab: skip flaky test (#506346) 2026-04-04 07:12:06 +00:00
Vladimír ČunátandGitHub e36e660107 tandoor-recipes: 2.6.0 -> 2.6.4 (#505070) 2026-04-04 07:11:10 +00:00
Vladimír ČunátandGitHub df511edffe tigervnc: 1.16.1 -> 1.16.2 (#504811) 2026-04-04 07:10:16 +00:00
YtandGitHub ad7953dba9 mimir: 3.0.4 -> 3.0.5 (#506395) 2026-04-04 07:03:40 +00:00
Vladimír ČunátandGitHub 0e3f0487b2 ghidra: 12.0.2 -> 12.0.4 (#502853) 2026-04-04 06:54:04 +00:00
Franz PletzandGitHub 7f2483a8f7 sslh: 2.3.0 -> 2.3.1 (#497036) 2026-04-04 06:53:47 +00:00
Franz PletzandGitHub 03d845c053 bukubrow: use structuredAttrs instead of passAsFile (#498266) 2026-04-04 06:52:23 +00:00
Franz PletzandGitHub 3228958865 libvirt: 12.1.0 -> 12.2.0 (#505716) 2026-04-04 06:50:30 +00:00
Vladimír ČunátandGitHub b2c0242c2d staging-nixos merge for 2026-04-04 (#506518) 2026-04-04 06:44:33 +00:00
nixpkgs-ci[bot]andGitHub a22601a85e yaziPlugins: update on 2026-04-03 (#506392) 2026-04-04 06:39:04 +00:00
nixpkgs-ci[bot]andGitHub 63abf74678 feishu-cli: 1.12.0 -> 1.15.0 (#506499) 2026-04-04 06:39:03 +00:00
Franz PletzandGitHub d6b5d1ada9 xsecurelock: parameterize build (#504428) 2026-04-04 06:33:49 +00:00
Franz PletzandGitHub 3236cfd9a0 diff-so-fancy: 1.4.6 -> 1.4.8 (#504267) 2026-04-04 06:33:18 +00:00
nixpkgs-ci[bot]andGitHub 1dc3c7f673 Merge master into staging-nixos 2026-04-04 06:24:05 +00:00
Franz PletzandGitHub d3e3667cdd sslscan: 2.2.1 -> 2.2.2 (#505077) 2026-04-04 06:19:07 +00:00
Franz PletzandGitHub e7d780829d mediamtx: 1.17.0 -> 1.17.1 (#505524) 2026-04-04 06:15:41 +00:00
Franz PletzandGitHub 043fb6cff5 ntfy-alertmanager: 0.5.0 -> 1.0.0 (#505443) 2026-04-04 06:15:18 +00:00
Franz PletzandGitHub f5c9fba9a9 obs-studio: 32.1.0 -> 32.1.1 (#506141) 2026-04-04 06:12:50 +00:00
Franz PletzandGitHub 4ce6401f78 ntpd-rs: 1.7.1 -> 1.7.2 (#506400) 2026-04-04 06:10:42 +00:00
nixpkgs-ci[bot]andGitHub 27ed84ea7d sparkle: 1.26.2 -> 1.26.3 (#506423) 2026-04-04 06:09:35 +00:00
zowoqandGitHub 2734385932 terraform-providers.hashicorp_azurerm: 4.65.0 -> 4.67.0 (#506507) 2026-04-04 05:59:24 +00:00
Pol DellaieraandGitHub 697d4701ff gemini-cli-bin: 0.34.0 -> 0.36.0 (#506338) 2026-04-04 05:55:13 +00:00
nixpkgs-ci[bot]andGitHub f27940eda0 tideways-daemon: 1.15.0 -> 1.15.2 (#506371) 2026-04-04 05:41:48 +00:00
R. Ryantm 2b858a61ef terraform-providers.hashicorp_azurerm: 4.65.0 -> 4.67.0 2026-04-04 05:32:58 +00:00
PlopmenzandFranz Pletz 4ae5cb7634 nixos/systemd-networkd: Add missing network options to type checker
Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
2026-04-04 07:28:57 +02:00
0x4A6FandGitHub 719d25d6d2 stayrtr: 0.6.2 -> 0.6.4 (#501309) 2026-04-04 05:21:04 +00:00
R. Ryantm 186f10a64c luau-lsp: 1.62.0 -> 1.64.1 2026-04-04 05:18:08 +00:00
R. Ryantm 7689255c1b feishu-cli: 1.12.0 -> 1.15.0 2026-04-04 04:50:34 +00:00
Franz PletzandGitHub f7317ff87d nixos/networkd: fix typo (#506421) 2026-04-04 04:41:02 +00:00
Austin HorstmanandGitHub df81b788ca saunafs: 5.3.0 -> 5.8.0 (#505985) 2026-04-04 04:36:23 +00:00
Austin HorstmanandGitHub 5da847ad10 ente-desktop: 1.7.21 -> 1.7.22 (#505972) 2026-04-04 04:36:15 +00:00
Austin HorstmanandGitHub b67bdc8b62 eflite: fix build with gcc15 (#505876) 2026-04-04 04:16:19 +00:00
Austin HorstmanandGitHub 821e0dad0a samrewritten: 20251229.1 -> 1.2.3 (#506021) 2026-04-04 04:15:25 +00:00
Austin HorstmanandGitHub 71546f503a qidi-studio: fix 2.05.01.52 hash (#506024) 2026-04-04 04:08:12 +00:00
Austin HorstmanandGitHub 72093f6f94 gromacs: 2026.0 -> 2026.1 (#506043) 2026-04-04 04:07:59 +00:00
Austin HorstmanandGitHub f79b9f2103 museeks: 0.23.1 -> 0.23.4 (#506035) 2026-04-04 04:07:53 +00:00