Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled users.mutableUsers conflicts with mutable overlay-based /etc #311665

Closed
ivan770 opened this issue May 14, 2024 · 1 comment · Fixed by #332516
Closed

Disabled users.mutableUsers conflicts with mutable overlay-based /etc #311665

ivan770 opened this issue May 14, 2024 · 1 comment · Fixed by #332516
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@ivan770
Copy link
Member

ivan770 commented May 14, 2024

Describe the bug

The following assertion triggers in a configuration where users.mutableUsers = false; and system.etc.overlay.mutable = true;:

{
assertion = config.systemd.sysusers.enable -> (config.users.mutableUsers == config.system.etc.overlay.mutable);
message = ''
When using systemd-sysusers and mounting `/etc` via an overlay, users
can only be mutable when `/etc` is mutable and vice versa.
'';
}

It should be possible to have a mutable /etc while using static systemd-sysusers configuration at the same time.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Set users.mutableUsers to false
  2. Set system.etc.overlay.mutable to true
  3. Build the system

Expected behavior

The build succeeds.

Notify maintainers

From git blame: @nikstur

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.9, NixOS, 24.05 (Uakari), 24.05.20240513.cbd6db0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.22.0`
 - nixpkgs: `/etc/nix/inputs/nixpkgs`

Add a 👍 reaction to issues you find important.

@ivan770 ivan770 added 0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels May 14, 2024
@ivan770 ivan770 changed the title Disabled users.mutableUsers conflicts with immutable overlay-based /etc Disabled users.mutableUsers conflicts with mutable overlay-based /etc May 14, 2024
@nikstur
Copy link
Contributor

nikstur commented May 27, 2024

This cannot be done with the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
2 participants