Commit graph

383 commits

Author SHA1 Message Date
nikstur 653fd8c995 nixos/systemd/shutdown: make shutdown ramfs bashless 2025-10-14 10:14:43 +02:00
nikstur 7fe74bb833 nixos/profiles/bashless: re-enable systemd-timesyncd
systemd-timesyncd is now bashless and can thus re-enabled in the
bashless profile.
2025-10-14 10:14:42 +02:00
nikstur 0e0be1398a nixos/profiles: add bashless profile 2025-10-09 23:52:39 +02:00
K900 e93c560b79 Merge remote-tracking branch 'origin/master' into staging-next 2025-10-05 12:17:08 +03:00
Wolfgang Walther 91a8fee3aa
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.
2025-10-05 10:52:03 +02:00
Wolfgang Walther c283f32d29
treewide: remove unused with
Auto-fixed by nixf-diagnose.
2025-10-05 10:50:41 +02:00
nixpkgs-ci[bot] 1f71b1fc26
Merge master into staging-next 2025-10-04 00:15:35 +00:00
Maximilian Bosch a6b0564b7d
nixos/filesystems: fix special file-systems for systemd-nspawn (#345899) 2025-10-03 19:33:31 +00:00
nixpkgs-ci[bot] 562c842d00
Merge master into staging-next 2025-09-23 00:16:56 +00:00
h7x4 e2f6573620
nixos/profiles/nix-builder-vm: use types.port 2025-09-22 16:46:43 +02:00
Maximilian Bosch a532cb052e
nixos/containers: add boot.isNspawnContainer option
There are a bunch of components such as incus or LXC that also use
`boot.isContainer`, so we'd have to differentiate between "OS container"
and "actually nspawn".

This became necessary for the file-systems part where nspawn takes care
of setting up special filesystems like `/proc`, `/dev` etc., but others
don't.

To allow for a `boot.isContainer` being less overloaded, this introduces
`boot.isNspawnContainer` that is exclusively used for nspawn-specific
things. When `true`, `boot.isContainer = true;` is implied.
2025-09-21 13:26:23 +02:00
Emily 85b124cedd Reapply "various: fix Scudo allocator due to LLVM update"
This reverts commit 5119cafc59.
2025-09-20 16:24:40 +01:00
K900 5119cafc59
Revert "various: fix Scudo allocator due to LLVM update" 2025-09-20 17:53:06 +03:00
Lisa Gnedt 753af06dab treewide: fix Scudo options
The commit 01e8f570c6 unpinned the
LLVM version, which led to the following warnings whenever Scudo
is loaded (basically whenever a command is started when used
system-wide):

Scudo WARNING: found 3 unrecognized flag(s):
    DeleteSizeMismatch=0:DeallocationTypeMismatch=0
    DeallocationTypeMismatch=0
    ZeroContents=1

According to the current Scudo documentation [1] the options are
now spelled differently. This commit keeps all existing options
and only updates the spelling.

[1] https://llvm.org/docs/ScudoHardenedAllocator.html

Reported-by: CUB3D <callumthom11@gmail.com>
2025-09-20 13:11:04 +02:00
Robert James Hernandez 07e18d922d nixos/profiles/perlless: remove redundant lessopen default
Starting in 25.05 `programs.less.lessopen.default = null` so no need
to set this in the perlless profile:

  https://github.com/NixOS/nixpkgs/pull/316979
2025-09-17 19:20:47 +00:00
Robert James Hernandez 711dec3652 nixos/profiles/minimal: remove redundant lessopen default
Starting in 25.05 `programs.less.lessopen.default = null` so no need
to set this in the profile:

  https://github.com/NixOS/nixpkgs/pull/316979
2025-09-17 19:20:42 +00:00
Aliaksandr f16c269a8e
nixos/perlless: don't redundantly disable programs.command-not-found 2025-08-30 18:53:49 +03:00
Emily 67eb21483d nixos/treewide: don’t redundantly disable boot.enableContainers 2025-08-25 20:20:56 +01:00
Maximilian Bosch d9829523d5
nixos/profiles/hardened: fix eval with !allowAliases 2025-08-23 17:48:34 +02:00
K900 35d0bafabf nixos/treewide: clean up Plasma 5 references
Preparing to drop.
2025-08-21 22:31:56 +03:00
Vladimír Čunát 0b0c68c77d
nixos/installation-device: don’t include stdenv (#418267) 2025-08-04 08:44:35 +02:00
Emily f5f4d6e8e3 nixos/installation-device: don’t include stdenv
A basic NixOS system shouldn’t require `stdenv` to install, and
it adds something like 45 MiB of build tools to the installer
closure. This doesn’t really help much at present since
WebKitGTK(?!) has a dodgy reference to GCC, but it’s a step in the
right direction.
2025-08-04 03:48:05 +01:00
Glen Huang 80afe79ace nixos/iso-image: add jq to PATH
It's previously already in the clousure, and is actually needed by disko without deps.
2025-07-31 21:20:05 +08:00
Wolfgang Walther 5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Philip Taron 8279ffe622
treewide: specify that mebibytes are used when it's ambiguous (#424169) 2025-07-11 12:29:33 -07:00
Axel Karjalainen 7159ab6f43 treewide: specify where mebibytes are used when it's ambiguous 2025-07-11 00:44:23 +03:00
Martin Weinelt 1ef7d63228
nixos/installer: ship the minimal ISO with networkmanager
With networkmanager we can provide a much more welcoming network setup
experience in the installer and it costs us less than 10 MB with this
configuration on the minimal ISO.

By default, for new profiles it will enable DHCP and RA and allow
interactive reconfiguration through `nmtui` or `nmcli`. Especially the
TUI interface is very easy to pick up and removes the need for typing in
manual commands when setting up the WLAN connection.
2025-06-30 10:37:11 +02:00
Sizhe Zhao dbf39b7ddb
nixos/profiles/minimal: don't generate fish completions 2025-06-20 14:13:56 +08:00
Ihar Hrachyshka 6fa85aa683 Revert "linux-builder: remove DNS hack for libslirp"
Resolution still fails when on VPN with no IPv6 DNS servers. We'll need
to investigate further why the fix doesn't help in this case.

This reverts commit f90236a8f2.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-06-12 12:07:17 -04:00
Aleksana fddba767d1
libslirp, darwin.linux-builder: fix DNS resolution using libslirp on MacOS (#398952) 2025-06-11 19:33:03 +08:00
Peder Bergebakken Sundt c77ac9dfc3 treewide: fix typos 2025-06-02 16:07:07 +02:00
Winter 747c55e702 nixos/profiles/nix-builder-vm: allow the system derivation to be substituted
Consider a user wanting to set up the Linux builder for the first time,
but with a slightly more generous allocation of resources compared to
the default. They'll do something like this:

```
{
  virtualisation.cores = 3;
  virtualisation.darwin-builder = {
    diskSize = 40 * 1024;
    memorySize = 4 * 1024;
  };
}
```

This will fail with an error like this:

```
error: a 'aarch64-linux' with features {} is required to build '/nix/store/3acpgmwqwnk8g2gc5r05ar2lvmn01b8a-builder.pl.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test}
```

But why would they have to rebuild the NixOS system?! All they did was
change the arguments passed to QEMU, and nothing those options control
would affect the NixOS configuration itself... right?

`config.system.build.toplevel` is defined with `allowSubstitutes` set to
`false` by default, which makes it so that the toplevel can't be
substituted if Nix is trying to use it "directly." So because the above
example would have to rebuild the VM runner, which references toplevel
directly, Nix refuses to substitute it, unless `always-allow-substitutes
= true` is set as a Nix option. (In the case where the QEMU options
aren't changed at all, Nix just substitutes the runner, which sidesteps
this issue as the runner itself doesn't use toplevel as an input.)
2025-05-16 13:00:15 -04:00
Rebecca Turner 2263f723c1
darwin.linux-builder: split create-builder script
The current workflow for starting the `linux-builder` on macOS is to run
`nix run nixpkgs#darwin.linux-builder`, which adds keys to the store and
then starts the builder.

Adding the keys requires user input (due to `sudo`) but the actual
builder should just stay running in the background somewhere.

I'd like to automate this process, but it's currently rather complex:
the first part of the script needs user input for `sudo`, and then
there's no signal when the process has finished starting up. The user
will need to see stdout/stderr during the first part, which makes it
challenging to capture it for the second part to determine when startup
has finished.

To fix this, I've split the `create-builder` script into an `add-keys`
script (interactive) and a `run-builder` script (background). These new
scripts are exposed in the `passthru` attributes for external users. The
`create-builder` script is now a simple call of `add-keys` and then
`run-builder`.

See: https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder
2025-05-12 12:18:33 -07:00
Ihar Hrachyshka f90236a8f2 linux-builder: remove DNS hack for libslirp
libslirp DNS issues on MacOS are now fixed. The override to use 8.8.8.8
as DNS server for linux-builder is not needed anymore.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-30 12:11:50 -04:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
nixpkgs-ci[bot] 2341cd6a3a
Merge master into staging-next 2025-03-18 06:05:15 +00:00
Will Fancher 317736b155
nixos/iso-image: Consolidate ISOs Using Specialisations. (#355893) 2025-03-17 21:22:38 -04:00
nixpkgs-ci[bot] f2e2b1814d
Merge master into staging-next 2025-03-17 18:05:11 +00:00
nikstur 7872cf6917
nixos/perlless: only disable installer tools that introduce perl (#388564) 2025-03-17 14:01:20 +01:00
Will Fancher 0aad0248ce nixos/iso-image: Include latest kernel specialisation.
Now that ISOs include the latest kernel as a specialisation, separate
ISOs for the new kernel are no longer necessary.
2025-03-16 01:38:37 -04:00
Will Fancher da9a092c34 nixos/iso-image.nix: nixfmt 2025-03-16 00:23:46 -04:00
K900 7d36ee97e6 Merge remote-tracking branch 'origin/master' into staging-next 2025-03-14 09:56:27 +03:00
Michael Hoang c0e0720c74 nix-builder-vm: disable auto-optimise-store
This option is associated with corruption[1, 2] and is disabled by
default in Nix as it can cause significant slowdowns[3].

[1]: https://github.com/NixOS/nix/issues/7273
[2]: https://github.com/LnL7/nix-darwin/pull/1152
[3]: https://github.com/NixOS/nix/issues/462#issuecomment-378189808
2025-03-13 16:02:29 +09:00
Philip Taron 711bf412a3
make-initrd: use closureInfo again (#372931) 2025-03-09 18:48:12 -07:00
isabel adcdeadefd
nixos/perlless: only disable installer tools that introduce perl 2025-03-09 23:24:20 +00:00
Dominik Xaver Hörl 9270d7cbb6 nixos/installation-device: add jq.all to extraDependencies
As discovered in https://github.com/NixOS/nixpkgs/pull/372931, we need the dev output of jq for closureInfo. We opt to add the whole thing.
2025-03-09 14:20:48 +01:00
K900 b964d0d668
Revert "nixos/profiles/hardened: don't enable by default" 2025-02-19 19:53:15 +03:00
Marie Ramlow c47719a799 nixos/profiles/hardened: don't enable by default 2025-02-19 17:26:05 +01:00
Nico Felbinger 958d1fb821
nixos/profiles/hardened: replace 'with' using inherit and add disable option 2025-02-03 21:34:05 +01:00
nikstur e00357e1f3
nixos/perlless: disable NixOS documentation (#364544) 2025-02-01 17:47:03 +01:00