Commit graph

1181 commits

Author SHA1 Message Date
nixpkgs-ci[bot]
d4a1995529
Merge master into staging-next 2025-01-16 00:14:11 +00:00
Gavin John
fc43d75245
nixos/lib/eval-config: fix minor typo 2025-01-15 12:40:11 -08:00
github-actions[bot]
9129b13110
Merge master into staging-next 2025-01-15 00:14:20 +00:00
Robert Hensing
bfefff9651
nixos-render-docs: Support explicit anchors in markdown for optional compatibility with the HTML renderer (#370352) 2025-01-14 23:10:41 +01:00
K900
bc9b250c6c Merge remote-tracking branch 'origin/master' into staging-next 2025-01-10 15:35:29 +03:00
Gaetan Lepage
8711bcf71a nixos-test-driver: reformat with latest ruff 2025-01-09 15:43:10 +01:00
Anton Mosich
9d2d70bea2
nixos/docs: fix typo
If that string wasn't a raw string, the "\n" in the second line won't
get rendered as such, but as a space instead.
2025-01-09 15:42:14 +01:00
github-actions[bot]
a58f8abed0
Merge staging-next into staging 2025-01-06 00:15:41 +00:00
Robert Hensing
04a5fd4b4f
nixos/eval-config: Deprecate NIXOS_EXTRA_MODULE_PATH (#349549) 2025-01-05 20:51:20 +01:00
K900
1d9d206c4e Merge remote-tracking branch 'origin/staging-next' into staging 2025-01-05 00:25:30 +03:00
Will Fancher
15be453e9a
switch-to-configuration: Better handling of socket-activated units (#359724) 2025-01-04 11:51:21 -05:00
Robert Hensing
e2078ef31e tests.nixosOptionsDoc: init 2025-01-02 22:42:05 +01:00
Robert Hensing
925dc2fe30 nixosOptionsDoc/optionsCommonMark: Add extraFlags attr 2025-01-02 21:08:48 +01:00
github-actions[bot]
5d88e3a361
Merge staging-next into staging 2025-01-02 18:04:58 +00:00
Robert Hensing
039cbd8e93
nixos/lib/eval-config: Add warning when masking pkgs (#349453) 2025-01-02 17:41:14 +01:00
K900
936f4e016d Merge remote-tracking branch 'origin/staging-next' into staging 2025-01-02 19:21:56 +03:00
Julien Malka
fa99ba3c13
nixos/systemd-boot: Don't write to /etc/machine-id (#347493) 2025-01-02 11:47:20 +01:00
K900
ca300e32f7 Merge remote-tracking branch 'origin/staging-next' into staging 2025-01-01 10:07:33 +03:00
Emily
f6ce575a03 nixos/test-driver: avoid lib.fileset 2024-12-31 02:30:18 +00:00
Wolfgang Walther
cf127c9dc3
treewide: load structured attributes in all bash builders consistently
It's hard to put the sourcing of ./.attrs.sh into all builder
consistently - mistakes will happen. Thus, load structured attrs once in
make-derivation and then source the remaining builder on top.

This should fix quite a few builders with structured attributes in
principle. Most importantly it helps substitute / substituteAll, which
are required for bootstrap on some platforms.
2024-12-29 18:36:47 +01:00
Jared Baur
bae7a7ac67
nixos/make-disk-image: fix hybrid and legacy+gpt image generation
Prevent GNU parted from complaining about misaligned partitions for
partitions that aren't supposed to be aligned.
2024-12-20 12:58:31 -08:00
Jared Baur
324189bc82
nixos/make-disk-image: ensure partitions are aligned to sector size
This ensures that GNU parted doesn't complain that partitions are
unaligned.
2024-12-19 19:58:26 -08:00
Jared Baur
95587053f7
nixos/make-disk-image: nixfmt 2024-12-19 19:58:25 -08:00
Andreas Fuchs
bc1cfec920 Address review feedback: It's "configuration switch" 2024-12-18 08:18:27 -05:00
Andreas Fuchs
878be9c20b Address review feedback: Attempt to fix wonky indentation 2024-12-18 08:17:04 -05:00
Gavin John
b0a3a9a52f nixos/lib/eval-config: Add warning when masking pkgs 2024-12-13 21:52:21 -08:00
DavHau
2ec06a51a0 make-ext4-fs: enable parallel compression for zstd
... as done in a couple of other image builders already
2024-12-13 00:39:12 +07:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Adam C. Stephens
da18b9bc79
nixos/lib/make-squashfs: set root mode to 0755
default is 0777 which is likely undesirable in all situations
2024-12-08 10:05:04 -05:00
Arne Keller
b6aa3932ce
nixos/lib/qemu-common: fix cross to x86_64 (#327349) 2024-12-06 14:44:08 +01:00
Jan Tojnar
8fe87559a9 nixos/lib: Add disablePackageByName
We do this in multiple DE modules and the behaviour was not consistent.
2024-12-04 22:31:35 +01:00
misuzu
6eac218f2d
Count hard links separately when sizing virtual disks (#330055) 2024-12-04 21:44:45 +02:00
Emily
8221c09ff5
nixos/lib/test-driver: fix linting after compatibility clean‐up
The previous commit removed the handling of `dict` arguments, but
didn’t adjust the type, leading to the following type-checking error:

    test_driver/driver.py:216: error: Argument 1 to "NixStartScript" has incompatible type "str | dict[Any, Any]"; expected "str"  [arg-type]

It also left an unused import that Ruff is unhappy about:

    build/lib/test_driver/driver.py:11:22: F401 [*] `colorama.Fore` imported but unused
    …
    build/lib/test_driver/driver.py:11:28: F401 [*] `colorama.Style` imported but unused

Fixes: 71306e6b36
(cherry picked from commit d490680530)
(cherry picked from commit ff31b814b6)
2024-11-30 15:11:39 +01:00
Wolfgang Walther
a92ea1ff26
nixos/lib/test-driver: remove legacy args handling
Scheduled for removal in 24.11, so let's follow through.

Added in #291544.

(cherry picked from commit 71306e6b36)
(cherry picked from commit 8427b6f640)
2024-11-30 15:11:38 +01:00
Andreas Fuchs
bf9c6c9861 switch-to-configuration-ng: Better handling of socket-activated units
Previously, if any unit had a socket associated with it, stc-ng
counted it as "socket-activated", meaning that the unit would get
stopped and the socket get restarted. That can wreak havoc on units
like systemd-udevd and systemd-networkd.

Instead, let units set the new flag notSocketActivated, which sets a
boolean on the unit indicating to stc-ng that the unit wants to be
treated like any other non-socket-activated unit instead. That will
stop/start or restart these units on upgrades, without unnecessarily
tearing down any machinery that the system needs to run.
2024-11-27 21:36:09 -05:00
Wolfgang Walther
d232880c20
various: remove left-over rtc_cmos rootModule
This is not needed anymore after
65a50ea453.
2024-11-26 22:02:46 +01:00
phaer
bb6586c4e6 make-disk-image: Allow passing of image baseName
It's currently alsways "nixos", which leads to various schemes of
renaming the resulting files in virtualisation/*-image.nix files as
well as further downstream, outside of nixpkgs.
2024-11-26 17:19:18 +01:00
Wolfgang Walther
de69ff528b
nixos/lib/make-options-doc: remove optionsDocBook
Follow through on #296384.
2024-11-22 18:30:11 +01:00
Wolfgang Walther
73df63f8ef
lib/options: remove mdDoc
Following through on message itself.
2024-11-22 18:30:11 +01:00
Nick Cao
172a35f8ce
nixos/test-driver: target python 3.12 2024-11-22 10:49:32 -05:00
Nick Cao
e23f1733c6
nixos/test-driver: use ruff format in place of black 2024-11-22 10:49:31 -05:00
Nick Cao
ef2d3c542a
nixos/test-driver: modernize 2024-11-22 10:49:31 -05:00
Nick Cao
42d4046e94
nixos/test-driver: format with nixfmt 2024-11-22 10:49:30 -05:00
Nick Cao
b25360a7e5
nixos/test-driver: apply ruff check suggestions 2024-11-22 10:49:30 -05:00
Masum Reza
e13831335f
treewide: stdenv.is -> stdenv.hostPlatform.is (#356363)
* treewide: stdenv.is -> stdenv.hostPlatform.is

* treewide: nixfmt due to ci error
2024-11-17 16:11:54 +05:30
Jack Wilsdon
2223312e3d nixos/networkd: allow byte values to be integers 2024-11-03 18:26:20 +00:00
Will Fancher
37ee6ba681 Revert "NixOS apply script"
Reverts #344407

This has broken nixos-rebuild switch so that it no longer updates the profile, which has bad consequences including not updating the systemd-boot menu with new generations.
2024-11-01 20:18:09 -04:00
Robert Hensing
7902cea1de nixos: Update documentation to refer to bin/apply 2024-10-30 00:21:21 +01:00
Sandro Jäckel
729a6f3bd7
nixos/lib/testing: remove alias usage 2024-10-26 14:30:45 +02:00
Robert Hensing
5f197bf5d0 nixos/eval-config: Deprecate NIXOS_EXTRA_MODULE_PATH
This gets rid of a potentially confusing behavior that doesn't need to
be in NixOS, and nobody ever bothered to add a test for it.
Let's keep things simple!
The suggested snippet is better than this feature ever was, and will be
in the user's face, where it belongs, kindly.

Tested with

    nix-instantiate nixos/lib/eval-config.nix --arg modules '[{fileSystems."/".device="x";boot.loader.grub.enable=false;}]' -A config.system.build.toplevel
    NIXOS_EXTRA_MODULE_PATH=$HOME/whatever.nix nix-instantiate nixos/lib/eval-config.nix --arg modules '[{fileSystems."/".device="x";boot.loader.grub.enable=false;}]' -A config.system.build.toplevel
2024-10-18 17:04:35 +02:00