profiles/minimal: reduce size#173661
Conversation
|
What does it take for this PR to be merged? |
70e6a1e to
c6f28bd
Compare
|
Rebased PR. |
There was a problem hiding this comment.
nixos/modules/profiles/minimal.nix is also used for containers, right? Then I don't think we should disable man pages there. Also we should think about removing environment.noXlibs as it can cause quite weird problems when building certain packages and you didn't think about it while debugging.
|
@SuperSandro2000 |
|
Didn't not found mysself any problems with |
nspawn/nixos containers, not oci containers. The last case is https://discourse.nixos.org/t/unable-to-install-paperless-ngx/19962 |
|
This should have a release notes entry, since it may require changes to people's configurations. |
Added release notes. |
There was a problem hiding this comment.
That could be really dangerous and fill up your disk when logs in containers get no longer rotated. Also many people don't even know that the container uses this profile.
There was a problem hiding this comment.
This module is used only in tests and in minimal ISO image. Should not affect working to containers. And it was enabled by default recently.
There was a problem hiding this comment.
This module is used only in tests and in minimal ISO image.
No, it is also included for nixos-containers because otherwise the stupid environment.noXlibs option wouldn't mess with some software builds.
There was a problem hiding this comment.
I tested with this configuration:
containers.test-man = {
autoStart = true;
privateNetwork = true;
hostBridge = "br0";
localAddress = "10.11.0.1/24";
config = { pkgs, config, ... }: {
system.extraDependencies = [ pkgs.hello ];
services.openssh = {
enable = true;
};
};
};
Changes to nixos/modules/profiles/minimal.nix did not affect the container
There was a problem hiding this comment.
🤔 maybe I was doing something wonky but lxc container imports minimal profile which I was using for the container https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/lxc-container.nix#L54
There was a problem hiding this comment.
@SuperSandro2000 add this patch?
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
index 6a7032e1963..392f79cb51e 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
@@ -368,6 +368,11 @@
<literal>nixos/modules/profiles/minimal.nix</literal> profile.
</para>
</listitem>
+ <listitem>
+ <para>
+ Now lxc containers don't use minimal profile.
+ </para>
+ </listitem>
<listitem>
<para>
There is a new module for the <literal>xfconf</literal>
diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md
index b56be16127b..817262affd8 100644
--- a/nixos/doc/manual/release-notes/rl-2211.section.md
+++ b/nixos/doc/manual/release-notes/rl-2211.section.md
@@ -134,6 +134,8 @@ Use `configure.packages` instead.
- The minimal ISO image now use `nixos/modules/profiles/minimal.nix` profile.
+- Now lxc containers don't use minimal profile.
+
- There is a new module for the `xfconf` program (the Xfce configuration storage system), which has a dbus service.
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
diff --git a/nixos/modules/virtualisation/lxc-container.nix b/nixos/modules/virtualisation/lxc-container.nix
index d3a2e0ed151..b6b744dfbca 100644
--- a/nixos/modules/virtualisation/lxc-container.nix
+++ b/nixos/modules/virtualisation/lxc-container.nix
@@ -51,7 +51,6 @@ in
{
imports = [
../installer/cd-dvd/channel.nix
- ../profiles/minimal.nix
../profiles/clone-config.nix
];
There was a problem hiding this comment.
Or this variant:
diff --git a/nixos/modules/virtualisation/lxc-container.nix b/nixos/modules/virtualisation/lxc-container.nix
index d3a2e0ed151..b6b4dcff1d0 100644
--- a/nixos/modules/virtualisation/lxc-container.nix
+++ b/nixos/modules/virtualisation/lxc-container.nix
@@ -55,6 +55,8 @@ in
../profiles/clone-config.nix
];
+ environment.noXlibs = lib.mkOverride 500 false;
+
options = {
virtualisation.lxc = {
templates = mkOption {
There was a problem hiding this comment.
@SuperSandro2000 Is there a consensus on this remark?
There was a problem hiding this comment.
noXlibs should not be enabled by default. It is an advanced setting that required multiple overrides to build on all my machines, which is not acceptable for normal users.
logrotation should not be disabled in lxc otherwise your disk can completely fill up which should be avoided with good defaults.
b1ea960 to
e0379ec
Compare
e0379ec to
cf4602c
Compare
|
Rebased PR. |
|
rebased the pr on master( and built the iso ( but the size seems to be larger? now before |
cf4602c to
11ce0d6
Compare
|
Fix conflicts. |
|
Can you move the release notes to 23.05 ? Think it's good to merge now. |
11ce0d6 to
3729d07
Compare
Updated. |
Will fix it |
3729d07 to
7dc27ca
Compare
|
Resolve conflicts. |
7dc27ca to
731d496
Compare
|
Resolve conflicts. |
|
Thanks! |
|
Note that the discussion about disabling logrotate in LXC containers is still open. |
I will try to test the lxc containers a little later. |
We should fix this regression ASAP because it could fill up the disk completely if things go really south. |
Created PR - #205346 |
Description of changes
Minimize size netboot and iso images.
Splitted this PR - #170460
cc @SuperSandro2000
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes