Commit graph

2338 commits

Author SHA1 Message Date
Sandro c817b58614
Merge pull request #220278 from bdd/fix-binfmt-x86_64-windows-extension
nixos/binfmt: fix extension for Windows binaries
2023-03-15 16:15:47 +01:00
Martin Weinelt 1c52b361a8
Merge remote-tracking branch 'origin/master' into staging-next 2023-03-15 14:36:40 +01:00
Robert Hensing c3b245d540
Merge pull request #195511 from DeterminateSystems/include-build-deps
nixos/top-level: add includeBuildDependencies option
2023-03-15 13:33:24 +01:00
Linus Heckemann eb45cd5108 nixos/top-level: add includeBuildDependencies option
This option allows adding the build closure of the system to its
runtime closure, enabling fully-offline rebuilds (as long as no new
packages are added).
2023-03-14 11:55:13 +01:00
Florian Klink 504d66bae9
Merge pull request #216826 from gdamjan/systemd-253
systemd: 252.5 -> 253
2023-03-13 17:37:39 +01:00
Martin Weinelt d03d74aa67
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/aiopulse/default.nix
- pkgs/development/python-modules/identify/default.nix
- pkgs/development/python-modules/spur/default.nix
2023-03-12 23:28:23 +01:00
Guillaume Girol db901673ea
Merge pull request #209156 from pwaller/issue-114594
nixos/grub: Name initrd-secrets by system, not by initrd
2023-03-12 18:50:33 +00:00
Vladimír Čunát 1dd94ad62f
Merge branch 'master' into staging-next 2023-03-12 09:06:28 +01:00
Ryan Lahfa ac93edb3ac
Merge pull request #209829 from notgne2/fix/systemd-boot-always-profile-path
nixos/systemd-boot: always use profile_path() for system closure paths
2023-03-11 22:08:18 +01:00
github-actions[bot] 39f6788067
Merge master into staging-next 2023-03-09 12:01:27 +00:00
Berk D. Demir 147186a95b nixos/binfmt: fix extension for Windows binaries
Extension based matching for Windows targets define it '.exe' but kernel
documentation explicitly states it should be passed "without the .".

From https://docs.kernel.org/admin-guide/binfmt-misc.html
> * magic:
>   [...] If you chose filename extension matching, this is the
>   extension to be recognised (without the ., the \x0a specials are not
>   allowed).
2023-03-08 21:07:31 -08:00
Aaron Andersen 374fc068ec nixos/systemd-oomd: disable systemd-oomd when enableUnifiedCgroupHierarchy is false
fixup for https://github.com/NixOS/nixpkgs/pull/203596
2023-03-08 18:39:18 -05:00
Дамјан Георгиевски 83f65146ab nixos/systemd: systemd-growfs* units are real files now
`systemd-growfs@.service` and `systemd-growfs-root.service` became real units since:
50072ccf1b

we need to add them to the nixos module so growfs works again
2023-03-05 20:05:00 +01:00
notgne2 ca9f0682fd
nixos/systemd-boot: always use profile_path() for system closure paths 2023-03-05 06:13:45 -07:00
Дамјан Георгиевски d2837a9cb3 nixos/systemd-initrd: create the /tmp mount point in the initrd
systemd now requires the /tmp mount point in the initrd cpio archive
since https://github.com/systemd/systemd/pull/25723

setting `"/tmp/.keep".text` will create the directory.

this fixes a boot failure:
```
(sd-gens): Failed to overmount /tmp/: No such file or directory
```
2023-03-05 04:41:08 +01:00
github-actions[bot] 8480c21d06
Merge master into staging-next 2023-03-04 12:01:17 +00:00
Naïm Favier 45e44c56f1
Merge pull request #217342 from pennae/nrd-html-manual
nixos-render-docs: add manual html renderer, use it for the nixos manual
2023-03-04 12:58:38 +01:00
github-actions[bot] 387a5e220d
Merge staging-next into staging 2023-02-28 00:03:08 +00:00
Will Fancher ace4d26ccc
Merge pull request #217887 from lilyinstarlight/fix/allow-overriding-systemd-initrd-bins
nixos/systemd-initrd: allow overriding initrdBin with extraBin
2023-02-27 17:43:30 -05:00
github-actions[bot] de3f71e277
Merge staging-next into staging 2023-02-26 06:02:30 +00:00
Winter 15f1369b95 Revert "nixos/systemd-coredump: guard static gid for systemd-coredump behind state version"
This reverts commits f5483464d5 and
6b9583e5e1.

Ideally, we shouldn't cause friction for users that bump `stateVersion`,
and I'd consider having to switch and/or manually hardcode a UID/GID
to supress the warning friction. I think it'd be more beneficial to, in
this rare case of an ID being missed, just let it be until more
discussion happens surrounding this overall issue.

See https://github.com/NixOS/nixpkgs/pull/217785 for more context.
2023-02-25 22:31:56 -05:00
Lily Foster 5210ddc701
nixos/systemd-initrd: allow overriding initrdBin with extraBin
Being able to override `boot.initrd.systemd.initrdBin` with `boot.initrd.systemd.extraBin` is a desirable behavior, so this PR changes the `ln -s` command to `ln -sf` to force link even if the file already exists.
2023-02-23 13:23:15 -05:00
Nick Cao f5483464d5
nixos/systemd-coredump: guard static gid for systemd-coredump behind state version 2023-02-23 17:07:50 +08:00
pennae 3794c04d79 nixos/manual: fix manpage links
{manpage} already exapnds to a link but akkoma wants to link to
a specific setting. split the mention for clarity.

networkd just straight up duplicated what {manpage} generates anyway, so
that link can go away completely.
2023-02-21 18:26:39 +01:00
github-actions[bot] fc3641aa1e
Merge staging-next into staging 2023-02-21 00:03:04 +00:00
Will Fancher bb7cd63150
Merge pull request #215381 from lilyinstarlight/fix/make-initrd-ng-wrapped-executables
make-initrd-ng: support wrapped executables
2023-02-20 14:11:48 -05:00
Lily Foster 1fa1b58c25
nixos/console,nixos/systemd-initrd: remove now-unnecessary wrapped bin inclusions 2023-02-20 07:02:55 -05:00
github-actions[bot] 0e856cc7de
Merge staging-next into staging 2023-02-18 18:01:58 +00:00
Florian Klink 4bfb6411e3
Merge pull request #215188 from ElvishJerricco/binfmt-bad-setting-fix
binfmt: Don't create invalid service with no registrations
2023-02-18 15:39:46 +01:00
github-actions[bot] 3b5c06282d
Merge staging-next into staging 2023-02-17 12:01:58 +00:00
Arian van Putten 98042fc6d3
Merge pull request #216357 from nikstur/systemd-repart-after-activation
nixos/systemd-repart: enable running after initrd
2023-02-17 12:56:24 +01:00
Florian Klink ab566b8656
Merge pull request #208269 from ElvishJerricco/systemd-stage-1-fsck
Systemd stage 1 fsck
2023-02-17 10:06:39 +02:00
nikstur b1ff1e1658 nixos/systemd-repart: enable running after initrd 2023-02-14 19:42:32 +01:00
K900 2bbd450b8b
Merge pull request #210505 from notgne2/fix/systemd-initrd-allow-symlink
nixos/systemd-initrd: allow symlink into when checking for `/prepare-root`
2023-02-14 21:10:31 +03:00
Arian van Putten 5b23d0e51c
Merge pull request #214396 from nikstur/systemd-repart
systemd-repart
2023-02-10 20:03:09 +01:00
nikstur 4700198654 nixos/systemd-repart: init 2023-02-10 14:05:44 +01:00
Izorkin 6b9583e5e1
nixos/systemd-coredump: fix group id 2023-02-08 20:48:13 +03:00
pennae bf4c0c1900 nixos/*: remove trailing period in mkEnableOptions
those are added by mkEnableOption, and .. is replaced to … by markdown
processing.
2023-02-08 15:23:34 +01:00
Will Fancher 14b77582da systemd-stage-1: fsck 2023-02-08 00:43:10 -05:00
Winter b2d04c1155 nixos/luksroot: build pbkdf2-sha512 binary in its own derivation
Since this feature's inception, we've compiled a binary that uses OpenSSL
to perform PBKDF-SHA512 during the extra-utils build. In addition to this
being inefficient, it broke as of 6ea1a2a1be,
which switched the extra-utils derivation to use stdenvNoCC.

For now, I think the path of least resistence is to move the pbkdf-sha512
build to its own derivation, to fix the breakage, as well as improving
the efficiency of the extra-utils build.

(I do believe that at some point, we should revisit this binary -- perhaps
rewriting it -- as Clang even just on its default settings emits more
warnings than you'd want to see in a security-related codebase when
compiling it.)
2023-02-07 23:06:11 -05:00
Will Fancher 1b39491326 systemd-stage-1: Use x-initrd.mount for better unit dependencies 2023-02-07 22:22:39 -05:00
Will Fancher 988184ca82 systemd-stage-1: managerEnvironment option 2023-02-07 22:22:39 -05:00
Will Fancher b3a27afb7c binfmt: Don't create invalid service with no registrations
We shouldn't be creating a systemd.services.systemd-binfmt value when
the upstream unit isn't being pulled in, because it results in a
service unit file with no ExecStart line
2023-02-07 17:02:26 -05:00
Will Fancher eec740325c initrd-ssh: New sshd settings names 2023-02-07 13:56:02 -05:00
Nick Cao 96339d786a
Merge pull request #213782 from SuperSandro2000/stage1-extraUtils
nixos/stage-1: build extraUtils without compiler
2023-02-03 08:59:08 +08:00
Sandro c3b1fd8ba1
Merge pull request #199784 from Majiir/fix-plymouth-start
nixos/plymouth: don't start Plymouth on config switch
2023-01-31 15:47:45 +01:00
Sandro Jäckel 6ea1a2a1be
nixos/stage-1: build extraUtils without compiler 2023-01-31 14:45:39 +01:00
Florian Klink cd47b8e423
Merge pull request #213445 from Majiir/fix-systemd-coredump-truncation
nixos/systemd/coredump: fix kernel.core_pattern truncation
2023-01-30 21:26:21 +01:00
Majiir Paktu 7f35c8b2ac nixos/systemd/coredump: fix kernel.core_pattern truncation
Fixes #213408
2023-01-29 15:49:16 -05:00
pennae 0a6e6cf7e6 nixos/manual: render module chapters with nixos-render-docs
this converts meta.doc into an md pointer, not an xml pointer. since we
no longer need xml for manual chapters we can also remove support for
manual chapters from md-to-db.sh

since pandoc converts smart quotes to docbook quote elements and our
nixos-render-docs does not we lose this distinction in the rendered
output. that's probably not that bad, our stylesheet didn't make use of
this anyway (and pre-23.05 versions of the chapters didn't use quote
elements either).

also updates the nixpkgs manual to clarify that option docs support all
extensions (although it doesn't support headings at all, so heading
anchors don't work by extension).
2023-01-27 20:07:34 +01:00
Jörg Thalheim 86d5b67260 disable tpm-crb on riscv64 2023-01-23 15:00:41 +01:00
Nick Cao a7a0d03ecc
Merge pull request #211229 from Luflosi/fix-modprobeConfig-typo
nixos/modprobe: fix typo in boot.modprobeConfig.enable documentation
2023-01-23 16:02:09 +08:00
Nick Cao b9576dd927
Merge pull request #211723 from tpwrules/fix-systemd-boot-more
nixos/systemd-boot: fix tests and upgrade issues
2023-01-23 15:55:57 +08:00
Peter Waller 678eed323f nixos/grub: Name initrd-secrets by system, not by initrd
Previously, secrets were named according to the initrd they were
associated with. This created a problem: If secrets were changed whilst
the initrd remained the same, there were two versions of the secrets
with one initrd. The result was that only one version of the secrets would
by recorded into the /boot partition and get used. AFAICT this would
only be the oldest version of the secrets for the given initrd version.

This manifests as #114594, which I found frustrating while trying to use
initrd secrets for the first time. While developing the secrets I found
I could not get new versions of the secrets to take effect.
Additionally, it's a nasty issue to run into if you had cause to change
the initrd secrets for credential rotation, etc, if you change them and
discover you cannot, or alternatively that you can't roll back as you
would expect.

Additional changes in this patch.

* Add a regression test that switching to another grub configuration
  with the alternate secrets works. This test relies on the fact that it
  is not changing the initrd. I have checked that the test fails if I
  undo my change.

* Persist the useBootLoader disk state, similarly to other boot state.
  * I had to do this, otherwise I could not find a route to testing the
    alternate boot configuration. I did attempt a few different ways of
    testing this, including directly running install-grub.pl, but what
    I've settled on is most like what a user would do and avoids
    depending on lots of internal details.
  * Making tests that test the boot are a bit tricky (see hibernate.nix
    and installer.nix for inspiration), I found that in addition to
    having to copy quite a bit of code I still couldn't get things to
    work as desired since the bootloader state was being clobbered.

My change to persist the useBootLoader state could break things,
conceptually. I need some help here discovering if that is the case,
possibly by letting this run through a staging CI if there is one.

Fix #114594.

cc potential reviewers:

@lopsided98 (original implementer) @joachifm (original reviewer),
@wkennington (numerous fixes to grub-install.pl), @lheckemann (wrote
original secrets test).
2023-01-21 17:19:26 +00:00
Jan Tojnar 5c87c72c1f nixos/init-script: fix eval
error: attribute 'nixos' missing

This was missed in d3528cdc3d
2023-01-21 13:26:47 +01:00
Luflosi 2dfc86b838
nixos/modprobe: fix typo in boot.modprobeConfig.enable documentation
This typo was introduced in f4d8e64bed.
Also remove the dot at the end of the sentence since otherwise there would be two dots in the documentation.
2023-01-20 13:58:15 +01:00
Thomas Watson 8f2babd032 nixos/systemd-boot: pass EFI variable flags during update too
On some systems, EFI variables are not supported or otherwise wonky.
bootctl attempting to access them causes failures during bootloader
installations and updates. For such systems, NixOS provides the options
`boot.loader.efi.canTouchEfiVariables` and
`boot.loader.systemd-boot.graceful` which pass flags to bootctl that
change whether and how EFI variables are accessed.

Previously, these flags were only passed to bootctl during an install
operation. However, they also apply during an update operation, which
can cause the same sorts of errors. This change passes the flags during
update operations as well to prevent those errors.

Fixes https://github.com/NixOS/nixpkgs/issues/151336
2023-01-19 23:52:57 -06:00
rnhmjoj 4ed9893770
nixos/systemd-boot: improve initrd-secrets error messages
This is the equivalent of eccc1e5b but for systemd-boot
2023-01-19 20:50:17 +01:00
Martin Weinelt 5770984a95
Merge pull request #211252 from schnusch/systemd-user-tmpfiles-rules
nixos: systemd: systemd.user.tmpfiles.users add default
2023-01-17 17:41:41 +00:00
schnusch f0f2c6bec9 nixos: systemd: systemd.user.tmpfiles.users add default 2023-01-17 16:53:45 +01:00
Florian Klink 24b4189619
Merge pull request #207468 from schnusch/systemd-user-tmpfiles-rules
nixos: systemd: add systemd.user.tmpfiles.rules, systemd.user.tmpfiles.users.<name>.rules
2023-01-17 14:39:44 +01:00
schnusch 34ad8447c3 nixos: systemd: add systemd.user.tmpfiles 2023-01-17 12:19:40 +01:00
rnhmjoj eccc1e5bf4
install-grub.pl: improve initrd-secrets error messages
The build of initrd-secrets can routinely fail for old boot entries
if the secrets have been removed or renamed in a later generation.
This always happens for generation 1, because it's built from the
NixOS installer and the paths differs by the mount point (i.e. /mnt).

The error is very confusing because it fails to mention it's about
an older generation and that it's somewhat harmless.

This commit turns the error into a warning for all generations but the
current, adds the name of the failed entry to the message and a note
explaining why it can happen.
2023-01-16 02:30:39 +01:00
Maximilian Bosch 9aa1391bdf
Merge pull request #208803 from Ma27/revert-kmod-stage-1-hack
Revert "nixos/stage-1: fix `modprobe` in initial ramdisk on systems w/glibc-2.34"
2023-01-15 19:10:10 +01:00
Ryan Lahfa b42ea74b96
Merge pull request #206655 from vlinkz/distroname
nixos/version: add system.nixos.distroName and system.nixos.distroId options
2023-01-15 17:39:55 +01:00
Victor Fuentes d3528cdc3d
nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
github-actions[bot] 49722fd14a
Merge master into staging-next 2023-01-13 18:01:34 +00:00
pennae d6e464b4c5
Merge pull request #208983 from pennae/nixos-manual-md
nixos/manual: convert module chapters to markdown
2023-01-13 13:29:01 +01:00
notgne2 fd06c8fc9f
nixos/systemd-initrd: allow symlink into when checking for /prepare-root 2023-01-13 02:18:28 -07:00
Martin Weinelt 2895576165 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 15:37:38 +01:00
K900 b2a819f15f nixos/kernel: fix docs typo 2023-01-11 10:18:28 +03:00
Martin Weinelt c1e6c6af69 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 03:51:33 +01:00
K900 cd1c574ebe nixos/kernel: better docs for boot.kernelPatches 2023-01-10 23:13:46 +03:00
pennae 53fc887582 nixos/manual: move "edit the MD file" comments to generated XML 2023-01-10 12:34:37 +01:00
pennae bf92eaebe4 nixos/manual: generate module chapters with md-to-db.sh 2023-01-10 10:32:00 +01:00
pennae dc7788efb8 nixos/manual: regenerate chapter xml files
apparently pandoc has changed behavior over the past releases, so the
files are no longer in sync. occasionally this requires edits
to the markdown source to not remove an anchor that was there
before (albeit wth a very questionable id), or where things were simply
being misrendered due to syntax errors.
2023-01-10 10:31:59 +01:00
github-actions[bot] e4fc9a910a
Merge master into staging-next 2023-01-09 12:01:24 +00:00
Naïm Favier aa3dc8b8c3
Merge pull request #208694 from ncfavier/resolvconf-nixos-enter 2023-01-09 12:58:31 +01:00
Naïm Favier bff4bb5540
Merge pull request #208762 from ncfavier/link-manpages-options-doc 2023-01-09 11:57:01 +01:00
github-actions[bot] 0c8280b1c4
Merge staging-next into staging 2023-01-05 06:01:39 +00:00
pennae 9da5f12ecf modules: add mkPackageOptionMD
another transitional option factory, like mkAliasOptionModuleMD.
2023-01-05 02:33:13 +01:00
Naïm Favier 4fb500d629
nixos/doc: fix some manpage references 2023-01-03 14:03:35 +01:00
Maximilian Bosch 865723cd53
Revert "nixos/stage-1: fix modprobe in initial ramdisk on systems w/glibc-2.34"
This reverts commit da905d4cf9.

See the commit linked above for further information on why this was
needed. Apparently this is not needed anymore because the need for
LD_LIBRARY_PATH (which is needed for `modprobe(8)` to find
`libpthread.so.0`) doesn't exist anymore.

Since d33e52b253 the library path of each
binary in extra-utils is patched correctly.
2023-01-02 21:35:35 +01:00
Jan Tojnar 5810109b42 Merge branch 'staging-next' into staging
- readline6 attribute removed from all-packages.nix in d879125d61
- readline attribute was bumped to readline82 in 50adabdd60
2023-01-02 03:04:32 +01:00
Naïm Favier 37e42d01a0
nixos/etc: skip resolv.conf in nixos-enter chroot
nixos-enter sets up /etc/resolv.conf as a bind mount from the host
system, so trying to activate a system that sets
`environment.etc."resolv.conf"` (e.g. with systemd-resolved enabled)
results in an unhelpful warning.

Skip linking /etc/resolv.conf if we're in a nixos-enter environment, as
determined by the IN_NIXOS_ENTER environment variable.

Make the warnings more helpful, indicating which file we failed to link.

Unlink temporary files in case of failure.
2023-01-02 01:41:29 +01:00
Naïm Favier fe51ed28f3
Merge pull request #208033 from ncfavier/systemd-boot-skip-regression 2022-12-30 20:45:56 +01:00
Naïm Favier 80665d606a
nixos/systemd-boot: skip EFI update to 252
That version has a regression that leaves some machines unbootable.
While we wait for the fix (252.2) to land in master, this is a workaround that
should save people some pain.
2022-12-29 14:06:40 +01:00
github-actions[bot] 351a07ba79
Merge staging-next into staging 2022-12-29 00:03:11 +00:00
Anderson Torres 5f5b7824cb
Merge pull request #132694 from arcnmx/binfmt-interp-sandbox
nixos/binfmt: add interpreter path to sandbox
2022-12-28 17:33:46 -03:00
github-actions[bot] aaaeebad7a
Merge staging-next into staging 2022-12-28 18:01:50 +00:00
Jörg Thalheim d165c5dcad
Merge pull request #204254 from raphaelr/initrd-openvpn
nixos/tests/initrd-network-openvpn: fix
2022-12-28 12:36:27 +00:00
Sergei Trofimovich 092d57c076 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
    pkgs/development/tools/language-servers/ansible-language-server/default.nix
2022-12-28 09:35:37 +00:00
Will Fancher 9a497aab1b systemd-stage-1: Improve test-instrumentation output 2022-12-24 19:36:29 -05:00
Jan Tojnar 72c37eddec Merge branch 'staging-next' into staging 2022-12-25 01:30:47 +01:00
Florian Klink 6b1a896570
Merge pull request #205121 from alaviss/homed
nixos: systemd-homed support
2022-12-23 13:09:17 +01:00
Ryan Lahfa e2e8dfcf44
Merge pull request #207163 from NixOS/rfc0125-improvements
nixos/activation/bootspec: make initrd optional, serialize system, precise extensions' type
2022-12-23 00:43:29 +01:00
Cole Helbling 21f4afd799 nixos/activation/bootspec: fix document output path
The RFC currently stipulates the document will be available at
`$out/boot.json`.
2022-12-22 07:56:09 -08:00
Raito Bezarius 5dd2e60371 nixos/activation/bootspec: make initrd optional, serialize system, precise extensions' type 2022-12-21 23:28:21 +01:00
Thomas Watson af25692214 nixos/stage-1: Examine binaries for libraries in a consistent order
To reduce size, stage 1 (the initrd) is populated by copying specific
binaries in, then copying the libraries specifically needed by those
binaries. `patchelf` is then used to make the binaries search in the
directory where these libraries are copied to instead of their original
store paths.

Some filesystems (e.g. ZFS) do not guarantee that copying the same files
in the same order into a given directory will result in `find` returning
them in any particular order (though the order appears consistent so
long as the directory is not modified).

Therefore, when the binaries are scanned for libraries to copy in, they
might be scanned in a different order each time the derivation is built.
If two binaries need two different libraries with the same name, then a
different instance of the library might be copied in first, changing the
derivation contents and breaking reproducibility.

This turns out to be the case with `libudev.so.1` from both `systemd`
(needed by e.g. `mdadm`) and `systemdMinimal` (needed by e.g.
`dmsetup`). This issue is fixed by sorting the list of binaries to be
scanned instead of relying on filesystem order so that the same instance
always gets seen and copied first.

Both before this change (at least on ext4) and after this change
(without any options that affect stage 1), this is the `libudev.so.1`
from `systemdMinimal` by way of `dmsetup`. Whether this is appropriate
and how much the two different systemd configurations and udev libraries
need to be involved is a topic left for future work.
2022-12-20 08:24:19 +01:00
Jörg Thalheim 668a2b2f33
Merge pull request #172237 from DeterminateSystems/bootspec-rfc
Support external bootloader backends (RFC-0125)
2022-12-17 08:35:53 +00:00
Artturin 05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
Leorize 05420f34cf nixos: add systemd-homed support
As a start, it's not very configurable, but works pretty well.
2022-12-09 12:10:51 -06:00
Maximilian Bosch 539954efab
Merge pull request #204780 from Ma27/kernel-maintenance-docs
nixos/manual: document kernel backporting policy and implications of it
2022-12-09 11:53:53 +01:00
Artturi 8ffe22e286
Merge pull request #203956 from Artturin/addforbiddendependenciesregex
nixos/top-level.nix: add forbiddenDependenciesRegex option
2022-12-09 07:54:00 +02:00
Cole Helbling 5af481f67f nixos/activation/bootspec: fixup improper $out substitution 2022-12-08 13:50:05 -08:00
Cole Helbling dce9add02b nixos/activation/bootspec: refactor the generator script
We separate the different steps (injecting the toplevel and injecting
the specialisations) so that it's easy to document what each snippet is
actually doing.
2022-12-08 13:50:05 -08:00
Cole Helbling 38e5089814 nixos/activation/bootspec: drop problematic comment, only generate bootspec when bootspec is enabled 2022-12-08 13:50:05 -08:00
Cole Helbling 97f657c742 nixos/activation/bootspec: DocBook -> Markdown, add description for extensions field 2022-12-08 13:50:05 -08:00
Cole Helbling cc63293b50 nixos/boot/external: fixup typo in generated docs, regenerate docs 2022-12-08 13:50:05 -08:00
Cole Helbling ad6ea546b4 nixos/boot/external: DocBook -> Markdown 2022-12-08 13:50:05 -08:00
Raito Bezarius 680369e504 nixos/activation/bootspec: add some comments to explain the delicate manipulations 2022-12-08 13:50:05 -08:00
Raito Bezarius 11dfbee0a4 nixos/activation/bootspec: add bootspec chapter in NixOS manual 2022-12-08 13:50:05 -08:00
Raito Bezarius 9832e3e9b9 nixos/activation/bootspec: remove SB extension example in Cue schema 2022-12-08 13:50:04 -08:00
Raito Bezarius 980f50124f nixos/boot/external: add @raitobezarius as maintainer and allow initrd secrets 2022-12-08 13:50:04 -08:00
Raito Bezarius 348ba1b33c nixos/activation/bootspec: module-ify
This does the following:

* turns bootspec into a NixOS module
* validates bootspecs with Cue
* exposes internal knobs
2022-12-08 13:50:04 -08:00
Raito Bezarius ee27291b34 nixos/activation/bootspec: fix slurping specialisation bootspecs 2022-12-08 13:50:04 -08:00
K900 e69c37eae9 nixos/activation: don't generate bootspec for containers 2022-12-08 13:50:04 -08:00
Graham Christensen e9c85d6d0f nixos/activation/bootspec: embed the document into a bootspec subdir 2022-12-08 13:50:04 -08:00
Graham Christensen 6c0e4e892f nixos/activation/bootspec: embed the entire contents of specialisation's bootspecs into the parent
See: https://github.com/NixOS/rfcs/pull/125#discussion_r871222614
2022-12-08 13:50:04 -08:00
Cole Helbling 83d06ce16d nixos/boot/external: init
This allows supporting external bootloader backends.
2022-12-08 13:50:04 -08:00
Cole Helbling 942dcd238b nixos/activation/bootspec: init bootspec support (RFC-0125) 2022-12-08 13:50:03 -08:00
Leorize 0cc87ab901 nixos/systemd/userdbd: add method to enable service
This is recommended to enable in conjunction with systemd-homed.
2022-12-08 10:28:41 -06:00
Maximilian Bosch fa257ecb33
nixos/kernel: link manual (with backport policies) from boot.kernelPackages
Yes I know it's dirty to link the rendered HTML, but linking
`#sec-kernel-config` breaks the manual build for me with the following
error:

    element link: validity error : IDREF attribute linkend references an unknown ID "sec-kernel-config"

This is something that should probably be fixed, but for the current
change I'd argue that this is good enough (in fact even the
`nix.settings`-option uses that hack).
2022-12-06 14:38:16 +01:00
Naïm Favier 98a5ae3e5d
Merge pull request #202956 from arcnmx/systemd-networkd-wait-online 2022-12-05 17:53:26 +01:00
Naïm Favier 170a98ba73
Merge pull request #167871 from asymmetric/doc-networkd 2022-12-04 16:24:02 +01:00
Lorenzo Manacorda 2ae17515e0 nixos/networkd: doc activation of systemd.networkd 2022-12-04 16:18:48 +01:00
phaer 3c1906b202 initrd-ssh: add ignoreEmptyHostKeys option 2022-12-03 15:10:43 +01:00
Raphael Robatsch 9f874dd95e nixos/tests/initrd-network-openvpn: fix
- The default cipher is BF-CBC, which openvpn refuses to use by default.
  Switched to AES-256-CBC.
- openvpn does not require an external "ip" executable anymore, and does
  not support the "ipconfig" option by default, so remove that option.
2022-12-03 10:32:38 +01:00
arcnmx 51b5602b45 nixos/networkd: add wait-online.enable option
When no interfaces are managed by systemd-networkd, it will
unconditionally fail. This option allows it to be disabled in those
situations where it prevents system switches from succeeding.
2022-12-02 19:00:31 -08:00
Artturin a34d7b67fd nixos/top-level.nix: add forbiddenDependenciesRegex option
useful for making sure that there's no dev outputs in the system
2022-12-02 21:15:24 +02:00
arcnmx 0e89c822af nixos/binfmt: mkDefault auto-detected interpreter 2022-12-01 14:57:59 -08:00
arcnmx 873074ac60 nixos/binfmt: add interpreter path to sandbox 2022-12-01 14:57:59 -08:00
Andrew Marshall c88944f025 nixos: nix.readOnlyStore -> boot.readOnlyNixStore
The placement of this option under `nix` was misleading, as it is not
configuration of the Nix daemon, but rather configuration of the NixOS
boot process and how it mounts the Nix store. As such, make it an option
of `boot` to clarify what it actually affects, and imply that it will
only take effect on a reboot.

Since it no longer has the context of nix, adjust the name to include
it.
2022-11-30 22:57:08 -05:00
Bjørn Forsman 19a6b85e8f nixos: disable systemd-oomd when enableUnifiedCgroupHierarchy is false
Or else systemd-oomd gets marked as failed due to
"Userspace Out-Of-Memory (OOM) Killer was skipped because of a failed condition check (ConditionControlGroupController=v2)."
and cause the system to enter degraded state.

Ref https://github.com/NixOS/nixpkgs/issues/195085
2022-11-29 20:39:05 +01:00
Sandro Jäckel f4d8e64bed
nixos/modprobe: replace boot.isContainer with boot.modprobeConfig.enable 2022-11-24 14:07:46 +01:00
Martin Weinelt c021df5792
Merge pull request #197254 from Atemu/fstab-escape-options 2022-11-19 18:08:40 +01:00
Will Fancher b28ecff1e6 nixos: Add util-linux to systemd PATH to fix fsck with systemd 251.6
This is an alternative to the reverted
d9b1bde390, which broke systemd stage 1
2022-11-15 17:54:32 -05:00
Markus Partheymueller 5bc1b01a40
boot.loader.systemd-boot: add extraInstallCommands option (#200715) 2022-11-14 14:20:58 +01:00
Sandro 9477fa1e44
Merge pull request #197917 from SuperSandro2000/kernel-enable 2022-11-12 21:12:56 +01:00
Daniel Nagy 095269c862
treewide: use types.port in nixos modules 2022-11-10 09:30:00 +01:00
Sandro Jäckel 182575a60d
nixos/kernel: replace boot.isContainer with boot.kernel.enable 2022-11-09 23:45:33 +01:00
Robert Hensing 59f6a93082
Merge pull request #199595 from hercules-ci/nixos-toplevel-maintenance
nixos/top-level: maintenance
2022-11-09 13:54:36 +01:00
Majiir Paktu ad83bff008 nixos/binfmt: restart systemd-binfmt when registrations change 2022-11-07 11:28:47 +01:00
Atemu 753f883c35 stage-1: escape mount points and options
mountFS adds these strings to fstab and then relies on `mount` parsing fstab. If
they have spaces or tabs in them, that would break fstab and therefore not mount
with the unhelpful error: No such file or directory.

Co-authored-by: Lily Foster <lily@lily.flowers>

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2022-11-06 22:15:31 +01:00
Majiir Paktu bd99b3b8ff nixos/plymouth: don't start Plymouth on config switch 2022-11-05 19:52:42 -04:00
Robert Hensing 9299483604 nixos/top-level.nix: Move configurationName to grub.nix
The configuration-name file is grub specific, so it should not be
in top-level.nix.
2022-11-05 00:25:46 +01:00
Robert Hensing 37fa46a224 nixos/top-level.nix: Remove workaround for #156533 2022-11-05 00:25:46 +01:00
Robert Hensing 0b05ed2c78 nixos/specialisation.nix: Extract module 2022-11-05 00:25:46 +01:00
Robert Hensing d3ac0938a7 nixos/top-level.nix: Make extensible
(cherry picked from commit 4ec415cff9bcbaef08e0d900406a5c7181e71881)
2022-11-05 00:05:26 +01:00
ajs124 32cf6b29ab
Merge pull request #194291 from bronson/sort-etc-clean
Sort /etc/.clean to reduce spurious file changes
2022-10-28 00:47:15 +02:00
Daniel Barter fde313902f networkd: allow setting RouteMetric in Address section of a network config file 2022-10-26 21:53:32 -07:00
lucasew d31cf8ca0c nixos/uvesafb: init
Signed-off-by: lucasew <lucas59356@gmail.com>
2022-10-23 11:47:11 -03:00
github-actions[bot] 71e4896d63
Merge master into staging-next 2022-10-22 12:01:25 +00:00
markuskowa 79638604bb
Merge pull request #189703 from ck3d/remove-incomplient-nspawn-options
nixos/nspawn: Remove not compliant options
2022-10-22 12:19:49 +02:00
Martin Weinelt 51fcbf5bb7 Merge remote-tracking branch 'origin/master' into staging-next 2022-10-16 00:18:40 +02:00
Jörg Thalheim 8324b6efd3
Merge pull request #196147 from Mic92/systemd-boot-delete-old-specialisation
Systemd boot delete old specialisation
2022-10-15 17:36:28 +02:00
Jörg Thalheim 42c9492829 nixos/systemd-boot: decrease catch scope for ValueError 2022-10-15 16:41:38 +02:00
Martin Weinelt c728598b84 Merge remote-tracking branch 'origin/staging-next' into staging 2022-10-13 23:29:04 +02:00
Florian Klink d90ffb83c2
Merge pull request #195154 from veehaitch/networkd-ipv6-pd
nixos/networkd: add/adopt IPv6 options
2022-10-13 23:00:26 +02:00
Vladimír Čunát 00a757ed3f
Merge branch 'master' into staging 2022-10-13 08:27:55 +02:00
Robert Hensing 129fd1ab27
Merge pull request #194530 from colemickens/stage-1-systemd-luksroot-toString-fix
nixos: luksroot: toString-ify keyFileSize usage
2022-10-12 00:00:35 +01:00
Vincent Haupert 4f442dde0e nixos/networkd: add new options
Systemd 250:

> DHCPv4 client support in systemd-networkd learnt a new Label= option
> for configuring the address label to apply to configure IPv4
> addresses.

> The [IPv6AcceptRA] section of .network files gained support for a new
> UseMTU= setting that may be used to control whether to apply the
> announced MTU settings to the local interface.

> The [DHCPv4] section in .network file gained a new Use6RD= boolean
> setting to control whether the DHCPv4 client request and process the
> DHCP 6RD option.

> The [DHCPv6] section in .network file gained a new setting
> UseDelegatedPrefix= to control whether the delegated prefixes will be
> propagated to the downstream interfaces.

> The [IPv6AcceptRA] section of .network files now understands two new
> settings UseGateway=/UseRoutePrefix= for explicitly configuring
> whether to use the relevant fields from the IPv6 Router Advertisement
> records.

> The [RoutingPolicyRule] section of .network file gained a new
> SuppressInterfaceGroup= setting.

> The IgnoreCarrierLoss= setting in the [Network] section of .network
> files now allows a duration to be specified, controlling how long to
> wait before reacting to carrier loss.

Systemd 246:

> systemd-networkd's [DHCPv4] section gained a new setting UseGateway=
> which may be used to turn off use of the gateway information provided
> by the DHCP lease. A new FallbackLeaseLifetimeSec= setting may be
> used to configure how to process leases that lack a lifetime option.
2022-10-09 00:54:42 +02:00
Vincent Haupert 4367b782bc nixos/networkd: deprecate IPv6Token=
> The IPv6Token= section in the [Network] section is deprecated, and
>> the [IPv6AcceptRA] section gained the Token= setting for its
>> replacement. The [IPv6Prefix] section also gained the Token= setting.
>> The Token= setting gained 'eui64' mode to explicitly configure an
>> address with the EUI64 algorithm based on the interface MAC address.
>> The 'prefixstable' mode can now optionally take a secret key. The
>> Token= setting in the [DHCPPrefixDelegation] section now supports all
>> algorithms supported by the same settings in the other sections.
2022-10-09 00:52:55 +02:00
Vincent Haupert 036489ffaa nixos/networkd: adapt dhcpV6Config
* Remove `ForceDHCPv6PDOtherInformation=`
* Add a missing `WithoutRA=` option

Systemd 250:

> The ForceDHCPv6PDOtherInformation= setting in the [DHCPv6] section
> has been removed. Please use the WithoutRA= and UseDelegatedPrefix=
> settings in the [DHCPv6] section and the DHCPv6Client= setting in the
> [IPv6AcceptRA] section to control when the DHCPv6 client is started
> and how the delegated prefixes are handled by the DHCPv6 client.
2022-10-09 00:21:05 +02:00
Vincent Haupert bc8d6d8f96 nixos/networkd: DHCPv6PrefixDelegation -> DHCPPrefixDelegation
Adapt to changes introduced in Systemd 250:

> The [DHCPv6PrefixDelegation] section in .network file is renamed to
> [DHCPPrefixDelegation], as now the prefix delegation is also
> supported with DHCPv4 protocol by enabling the Use6RD= setting.

Replaces the `dhcpV6PrefixDelegationConfig` with
`dhcpPrefixDelegationConfig` and throws an error if the old option is
used.

Also adapt the respective IPv6 prefix delegation test.
2022-10-09 00:11:52 +02:00
Lin Jian 437f73dd54
nixos/systemd-boot: fix entry match condition in remove_old_entries
Before this patch, the entry match condition always fails, causing all
entries being removed. The error is not noticed because later they are
re-generated.
2022-10-07 20:43:48 +08:00
Lin Jian 642323930e
nixos/systemd-boot: correctly find gen_number for specialisation
Before this patch, the gen_number found by regex contains
"-specialisation-foo" if specialisation is used. As a result, applying
int() to gen_number raises ValueError, causing entries containing
a specialisation part not being removed.
2022-10-07 19:28:43 +08:00
Cole Mickens 3d5d6fc78c
nixos: luksroot: toString-ify keyFileSize usage 2022-10-06 15:06:50 -07:00
Zhaofeng Li b9b454820a systemd/initrd: Add TPM modules into initrd
This improves the out-of-box experience of TPM2 unlocking at a
small (50K) overhead.
2022-10-05 08:22:53 -06:00
Zhaofeng Li 21bbef9548 nixos/luksroot: Reword message on FIDO2 support with systemd stage 1 2022-10-05 08:22:53 -06:00
Zhaofeng Li 19c34ac44b systemd/initrd: Add files required by TPM2 and FIDO2 support to the initramfs 2022-10-05 08:22:14 -06:00
Zhaofeng Li 570824e102 systemd: Wrap in LUKS2 tokens
Update pkgs/os-specific/linux/systemd/default.nix

Co-authored-by: Janne Heß <janne@hess.ooo>
Co-authored-by: Ilan Joselevich <personal@ilanjoselevich.com>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2022-10-05 08:22:14 -06:00
github-actions[bot] 855f2990f1
Merge staging-next into staging 2022-10-05 12:02:14 +00:00
Florian Klink c1c406bc87
Merge pull request #191491 from oxalica/fix/systemd-initrd-modprobe
nixos/systemd-stage-1: include modprobe confg in initrd
2022-10-05 10:39:58 +02:00
github-actions[bot] d426366b62
Merge staging-next into staging 2022-10-05 00:05:03 +00:00
Scott Bronson 4db7061162
Sort the /etc/.clean file
Without sorting, the contents of /etc/.clean are likely to change on
every nixos-rebuild due to Perl's nondeterministic hash key ordering.
2022-10-03 14:11:17 -07:00
Gabriel Arazas 292aab9822 nixos/systemd: update extraConfig description 2022-10-03 11:17:41 +08:00
phaer fcd5087046 systemd: build with portabled by default. 2022-09-30 14:53:50 +02:00
Robert Hensing d1f0a6d972 nixos/systemd/oomd: mdDoc fix 2022-09-28 16:07:42 +02:00
Bernardo Meurer 2e0cca58f0
Merge pull request #169613 from helsinki-systems/feat/systemd-oomd 2022-09-28 09:53:49 -03:00
Franz Pletz 1f41992899
Merge pull request #187073 from penglei/master 2022-09-27 05:33:22 +02:00
Sandro Jäckel 03b6d5111a
nixos/systemd: remove not required or true 2022-09-19 13:45:01 +02:00
oxalica c5c42d4fbe nixos/systemd-stage-1: include modprobe confg in initrd 2022-09-16 20:54:04 +08:00
Yureka 19686a4452 nixos/systemd: conditionally include systemd-update-utmp upstream unit 2022-09-13 10:34:28 +02:00
Christian Kögler cfbf9bd15c nixos/nspawn: Fix configuration name PrivateUsersOwnership
Fix #189046
2022-09-11 13:08:36 +02:00
Christian Kögler 0ea763fab6
Merge pull request #188009 from martiert/fido2luks
nixos/luksroot: Support adding a list of credentials to fido2luks
2022-09-11 07:42:57 +02:00
pennae d98322834b nixos/*: fix docbook deprecation notices
mostly no rendering changes except in buildkite, which used markdown
where docbook was expected without marking up its markdown.
2022-09-10 18:23:13 +02:00
Christian Kögler d44b9d665c
Merge pull request #189201 from jmbaur/ipv6-route-prefix-example
nixos/systemd.network: Fix `ipv6RoutePrefixes` example
2022-09-09 17:05:36 +02:00
Christian Kögler 7d731f3bca nixos/nspawn: Remove not compliant options
The attribute set sharedOptions pulls in not compliant unit options:
- requiredBy
- wantedBy
- aliases

see man5 systemd.nspawn
2022-09-05 17:01:23 +02:00
penglei 6393cb765e nixos/boot/stage-1-init: umount /findiso in stage-1 2022-09-05 08:59:29 +08:00
pennae 3bddcf5f90
Merge branch 'master' into option-docs-md 2022-09-01 16:10:09 +02:00
Martin Ertsås 5e4921013b nixos/luksroot: Support adding a list of credentials to fido2luks
This adds support for using multiple fido2 keys for luks decryption
2022-09-01 08:55:46 +02:00
Jared Baur 51a1c73542 nixos/systemd.network: Fix ipv6RoutePrefixes example
The example doesn't have the top-level attribute `ipv6RoutePrefixConfig`
in each attrset of the list.
2022-08-31 17:04:18 -07:00
pennae 1d41cff3dc nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00
pennae f2ea09ecbe nixos/*: convert options with listings
minor rendering changes.
2022-08-31 17:27:36 +02:00
pennae 722b99bc0e nixos/*: convert options with admonitions to MD
rendering changes only slightly, most changes are in spacing.
2022-08-31 16:36:16 +02:00
pennae bd56368848 nixos/*: md-convert hidden plaintext options
most of these are hidden because they're either part of a submodule that
doesn't have its type rendered (eg because the submodule type is used in
an either type) or because they are explicitly hidden. some of them are
merely hidden from nix-doc-munge by how their option is put together.
2022-08-31 16:32:54 +02:00
pennae 515c4727fa nixos/*: md-"convert" empty descriptions
for some reason these are not picked up properly by nix-doc-munge, so
we'll do this instead.
2022-08-31 16:32:54 +02:00
pennae 9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae c915b915b5 nixos/*: md-convert options with unordered lists
mostly no rendering changes. some lists (like simplelist) don't have an
exact translation to markdown, so we use a comma-separated list of
literals instead.
2022-08-31 16:32:53 +02:00
pennae 0cfcb5908c nixos/*: <screen> -> <programlisting>
most of the screen tags used in option docs are actually listings of
some sort. nsd had a notable exception where its screen usage was pretty
much a raw markdown block that made most sense to convert into docbook lists.
2022-08-31 16:27:24 +02:00
pennae 5841c386a0 nixos/*: remove indentation from long enable options
the way these are written they introduce lots of whitespace in each
line, which will cause those lines to render as code when converted to
markdown. override the whole description instead.
2022-08-31 16:21:14 +02:00
Janne Heß 3284f4fa19
nixos/systemd-oomd: Add a new module + test 2022-08-31 13:24:32 +02:00
Will Fancher 78e892c44d
Merge pull request #187222 from winterqt/systemd-boot-esp-path
nixos/systemd-boot: use esp-path instead of path when calling bootctl
2022-08-30 12:57:40 -04:00
Florian Klink 087fa6565d
Merge pull request #184340 from jmbaur/ipv6routeprefix
nixos/systemd.network: Add `IPv6RoutePrefix` options
2022-08-30 11:10:47 +02:00
pennae 51a11254a7 nixos/*: literalDocBook -> literalMD
no change to rendered output
2022-08-27 19:18:29 +02:00
Will Fancher 037cf37ad2
Merge pull request #185085 from ElvishJerricco/shutdown-ramfs-protection
shutdown: Protect system from make-initrd-ng
2022-08-26 13:25:31 -04:00
Martin Weinelt 2ae8a945fb
Merge pull request #188309 from Sohalt/systemd-networkd-dhcpserver-missing-options 2022-08-26 11:50:50 +02:00
sohalt 8b74b21d23 nixos/networkd: add missing options for DHCPServer and IPV6SendRA 2022-08-26 11:42:58 +02:00
Martin Weinelt e7454ee38b
Merge pull request #187444 from peigongdsd/test 2022-08-26 08:17:46 +02:00
Stig 8c4a3b279b
Merge pull request #186503 from Weathercold/patch-1
nixos/switch-to-configuration: fix units starting with dash not being able to reload
2022-08-21 17:31:52 +02:00
Will Fancher 2239c5d55f
Merge pull request #186163 from lilyinstarlight/feature/systemd-stage-1-fs-label
nixos/systemd-stage-1: unify initrd fstab generation logic with system fstab
2022-08-20 18:29:07 -04:00
pennae 6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae 7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
pennae e4ed177f82 nixos/* eliminate inner whitespace in tags that was missed earlier
nix-doc-munge won't match tags that contain newlines anywhere. most of
these have already been removed, but a few obviously made it through.
2022-08-19 22:40:58 +02:00
peigongdsd 506cb62c4e modified: nixos/modules/system/boot/networkd.nix 2022-08-19 21:00:18 +08:00
peigongdsd 90de9ee689 nixos/modules/system/boot/networkd.nix: added Group= option in sectionLink of systemd.networkd config
see also: systemd.network(5)
2022-08-19 20:53:08 +08:00
Lily Foster 69d7943101 nixos/systemd-stage-1: unify initrd fstab generation logic with system fstab 2022-08-18 13:33:43 -04:00
Winter 771ef9f738 nixos/systemd-boot: use esp-path instead of path when calling bootctl
`path` has been aliased to `esp-path` for over 3 years (see fbf45d22da).
2022-08-18 01:08:07 -04:00
Jared Baur 4f58def5e6
Merge branch 'NixOS:master' into ipv6routeprefix 2022-08-17 15:08:31 -07:00
Weathercold 8fb63401af
nixos/switch-to-configuration: fix units starting with dash
Fix units starting with `-` being recognized as options.
2022-08-12 18:36:15 -04:00
pennae 50f9b3107a
Merge pull request #185474 from pennae/option-docs-md
nixos/*: more options md conversion
2022-08-12 23:23:26 +02:00
Sergei Trofimovich 925a9bb753
Merge pull request #185530 from trofi/restore-stage-1-strip
nixos/stage-1: srestore striping of bin/ and lib/
2022-08-11 08:50:45 +01:00
Jörg Thalheim 5a436f538f
Merge pull request #179619 from Informatic/plymouth-systemd-stage1-themes
nixos/plymouth: fix theme dependency resolution in systemd stage 1
2022-08-11 08:38:33 +01:00
Janne Heß 1120326a5b
Merge pull request #185067 from stigtsp/refactor/stc-no-net-debus
nixos/switch-to-configuration: replace Net::DBus with busctl
2022-08-09 20:28:49 +02:00
Robert Hensing 661c29c806
Merge pull request #181222 from hercules-ci/module-specialArgs
`_module.specialArgs` + unit test for nixos/documentation module
2022-08-08 11:53:10 +02:00
Sergei Trofimovich fb324910bf nixos/stage-1: srestore striping of bin/ and lib/
commit 0507725061 ("setup-hooks/strip.sh: run RANLIB on static
archives after stripping") added an extra argument to `stripDirs()`
helper.

I did not realize it's used outside the strip hook itself. Restore
stripping by passing $RANLIB as a new argument.
2022-08-07 11:05:29 +01:00
pennae 087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
Bernardo Meurer 5b3a9a815d
Merge pull request #185089 from NickCao/bind
nixos/stage-1-systemd: fix initrd-fstab generation for bind mounts
2022-08-05 14:25:11 -07:00
pennae 423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae 93c57a9884
Merge pull request #185056 from pennae/option-docs-md
nixos/*: more option docs conversions
2022-08-05 17:36:49 +02:00
Christian Kögler 04d94dc8ff
Merge pull request #183897 from amarshall/networkd-fix-ipv6prefixes-example
nixos/networkd: Fix some invalid examples
2022-08-04 23:02:40 +02:00
Sandro 6c55138d9b
Merge pull request #184786 from danc86/fido2luks-discard 2022-08-04 15:08:58 +02:00
Dan Callaghan da26caad10
nixos/luksroot: allow discards with fido2luks 2022-08-04 19:32:14 +10:00
Nick Cao ce39bee9dd
nixos/stage-1-systemd: fix initrd-fstab generation for bind mounts 2022-08-04 10:26:37 +08:00
Will Fancher a454a706b5 shutdown: Protect system from make-initrd-ng 2022-08-03 22:18:47 -04:00
Stig Palmquist 4c2764c69c
nixos/switch-to-configuration: replace Net::DBus with busctl
Call dbus by using `$cur_systemd/busctl --json=...` and core modules
JSON::PP and IPC::Cmd to slim down dependencies for baseSystem.

perlPackages.NetDBus pulls in quite a few other dependencies, like
XML::Twig, LWP, and HTTP::Daemon. These are not really neccecary for
s-t-c, and some of them have caused issues particularly with cross
builds after updates to perlPackages.
2022-08-04 00:08:26 +02:00
pennae 61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae 3aebb4a2be nixos/*: normalize link format
make (almost) all links appear on only a single line, with no
unnecessary whitespace, using double quotes for attributes. this lets us
automatically convert them to markdown easily.

the few remaining links are extremely long link in a gnome module, we'll
come back to those at a later date.
2022-08-03 21:57:46 +02:00
pennae 9c8531c8a5 nixos/*: replace <replaceable>s with «thing»
we can't embed syntactic annotations of this kind in markdown code
blocks without yet another extension. replaceable is rare enough to make
this not much worth it, so we'll go with «thing» instead. the module
system already uses this format for its placeholder names in attrsOf
paths.
2022-08-03 21:08:58 +02:00
pennae 694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +02:00
K900 eabbad8af1
Merge pull request #185036 from K900/goblinization
make-initrd-ng: parse ELFs ourselves instead of shelling out to patchelf and friends
2022-08-03 19:57:55 +03:00
Janne Heß bc7ff29bdf
Merge pull request #184822 from snpschaaf/networkd-link-add-promiscious
add Promiscuous as valid value for linkConfig
2022-08-03 11:05:32 +02:00
Philippe Schaaf d5e7f6a613 add Promiscuous as valid value for linkConfig
configuring a network via
`systemd.network.networks.<name>.linkConfig`
does not allow to set the attr Promiscuous = "true";

This referes to:
https://www.freedesktop.org/software/systemd/man/systemd.network.html#Promiscuous=

Signed-off-by: Philippe Schaaf <philippe.schaaf@secunet.com>
2022-08-03 09:05:42 +02:00
Vladimír Čunát a0ebaa7431
Merge #183748: staging-next 2022-07-29 2022-08-03 09:04:16 +02:00
Florian Klink dfda3c3e04
Merge pull request #182577 from squalus/coredump
nixos: systemd-coredump: improve disabled state
2022-08-03 13:32:11 +07:00
Linus Heckemann 6fc909a1cc makeInitrdNG: make stripping fully optional
Now the tool will only strip binaries if a strip executable is passed
via the STRIP environment variable. This is exposed via the strip
option for makeInitrdNG and the NixOS option boot.initrd.systemd.strip.
2022-08-02 10:19:48 +03:00
github-actions[bot] 0f0010fda3
Merge master into staging-next 2022-08-02 06:02:34 +00:00
squalus 257db1dd4a nixos: systemd-coredump: improve disabled state
The systemd-coredump module required systemd to be built with
withCoredump=true, even if the module was disabled.

- allow systemd to be missing systemd-coredump if the module is disabled
- switch to mkDefault for the sysctl config to allow user overrides when
  the module is disabled
- add nixos tests for both the enabled and disabled cases
2022-08-01 09:52:56 -07:00