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

fix: remove boot.isContainer #145

Merged
merged 3 commits into from
Oct 25, 2022
Merged

fix: remove boot.isContainer #145

merged 3 commits into from
Oct 25, 2022

Conversation

nzbr
Copy link
Member

@nzbr nzbr commented Oct 17, 2022

Do not set boot.isContainer to true, but set the required options directly. This gets around some quirks isContainer introduces in other modules (especially one in PAM that is related to solving #138). This might introduce issues related to udev, audit and modprobe, which get activated by removing that option; though i have not encountered any so far

@nzbr nzbr added the bug Something isn't working label Oct 17, 2022
mkdir $out
touch $out/${config.system.boot.loader.initrdFile}
'';
system.build.initialRamdiskSecretAppender = pkgs.writeShellScriptBin "append-initrd-secrets" "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use true here, too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't, because the binary needs to be named append-initrd-secrets. We could in theory put a symlink to true there, but I don't think that would make any difference while being a longer nix expression

@nzbr nzbr added the hacktoberfest-accepted This labes is used to supply people with free t-shirts label Oct 18, 2022
@nzbr
Copy link
Member Author

nzbr commented Oct 25, 2022

I haven't encountered any problems so far, so I'm just merging it

@nzbr nzbr merged commit 7bfb8f5 into nix-community:main Oct 25, 2022
@nzbr nzbr deleted the is-container branch October 25, 2022 17:52
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Oct 26, 2022

Now we also activated console, linux firmware and kernel which is not working in WSL.

PRs to make this better:

so we now should set:

hardware.console = false;
services.udev.enable = false;

The following units can be removed by setting powerManagement.enable = false;:

+ unit-post-resume.service
+ unit-post-resume.target
+ unit-pre-sleep.service

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Oct 26, 2022

and to add:

sshd.pam changed:

-session optional pam_loginuid.so
+session required pam_loginuid.so

only changed left (I will probably revisit this in the next days to remove the kernel.):

nix store diff-closures --new /nix/var/nix/profiles/system-166-link/ /nix/var/nix/profiles/system-179-link/
etc-timesyncd.conf: ∅ → ε
unit-systemd-timesyncd.service: ∅ → ε

Now the only change left is timesyncd and we can also remove the fake inirtd and so on again. Going to prepare the PR when my 5 PRs are merged.


I've created #149 to keep track of this.

psvo added a commit to psvo/NixOS-WSL that referenced this pull request Nov 21, 2022
* upstream/main:
  Fix syschdemd exit code (nix-community#140)
  update remaining references to wsl.automountPath (nix-community#158)
  Update flakes (nix-community#124)
  wsl.conf: proper option types (nix-community#153)
  Fix eval by disabling module completely when wsl.enable = false (nix-community#151)
  NixOS users.users.<user> attribute name and .name can differ (nix-community#147)
  switch nixpkgs.overlays to inline overlay (nix-community#150)
  feat: native systemd support (nix-community#134)
  remove boot.isContainer (nix-community#145)
  Do not import minimal profile by default (nix-community#144)
@nzbr nzbr changed the title remove boot.isContainer fix: remove boot.isContainer Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest-accepted This labes is used to supply people with free t-shirts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants