Commit graph

2342 commits

Author SHA1 Message Date
lewo ff24a05847
Merge pull request #206445 from nlewo/ssytemd-boot-fail
systemd-boot-builder only ignores OSError "invalid argument"
2023-04-16 22:17:28 +02:00
Sandro 603320b64f
Merge pull request #204534 from SuperSandro2000/boot-tmp 2023-04-12 21:37:47 +02:00
Will Fancher e70b42bf61 systemd-initrd: Add users and groups with static IDs. 2023-04-12 13:55:50 -04:00
Will Fancher 762b69f2ff systemd-initrd: Fix up root directory mode 2023-04-11 15:20:47 -04:00
Will Fancher fef26d88e2 systemd-initrd: Support secrets when boot loader doesn't
initrd-secrets: Fix service config with systemd-stage-1
2023-04-11 15:20:47 -04:00
Will Fancher 71983a6eb5 systemd-initrd: Don't use SYSTEMD_SULOGIN_FORCE 2023-04-11 15:20:47 -04:00
Felix Buehler 327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
Robert Hensing bcd2d49d85 nixos: Make services.resolved discoverable via "systemd-resolved" search
This query yielded no results on search.nixos.org.
I don't think I can make all options magically appear, but you can
the other options by reading the text.
2023-04-07 01:09:05 +02:00
Antoine Eiche 2638fb722e systemd-boot-builder only ignores OSError "invalid argument"
In order to fix
https://github.com/NixOS/nixpkgs/issues/114552 (profile name with
special characters), all OSError have been ignored while only the OSError
with errno 22 (invalid argument) could has been ignored.

The drawback of ignoring all OSError is that the "No space left on
device" error is also ignored. When the /boot doesn't have enough
available disk space, the switch-to-configuration script succeeds
while the boot menu has not been updated: the user thinks it's system
has been updated, but on the next reboot it is actually rollbacked.
2023-04-04 09:16:41 +02:00
K900 48b2f723f5 nixos/system: disallow system.copySystemConfiguration in pure eval mode
This is already broken, so let's give it a better error message.
2023-03-29 17:49:30 +03:00
Jörg Thalheim d9c92360a8 nixos/install-grub: stop using bare file handles for readFile/WriteFile 2023-03-27 19:25:46 +02:00
Jörg Thalheim 5a23a24ba2 nixos/grub-install: don't rely on shell to run commands
data passed to these programs might be accidentially interpreted as
shell. Discovered in https://github.com/Mic92/envfs/issues/111
2023-03-27 19:21:55 +02:00
Vladimír Čunát 12dd95fbb1
Merge branch 'master' into staging-next 2023-03-24 09:07:41 +01:00
Will Fancher 5a9b9e620d
Merge pull request #176828 from therishidesai/luks-multi-key-files
nixos/luksroot: add tryEmptyPassphrase option
2023-03-24 03:02:20 -04:00
github-actions[bot] 6a3714135d
Merge master into staging-next 2023-03-23 00:02:14 +00:00
pennae 31f422d95f
Merge pull request #218721 from apfelkuchen6/nw
nixos/networkd: add some missing options
2023-03-22 22:22:03 +01:00
Rishi Desai cccc3f8a8e nixos/luksroot: add tryEmptyPassphrase option 2023-03-22 09:17:23 -05:00
Sandro Jäckel 3a5de0e725
nixos/tmp: add a note to useTmpfs on potential issues 2023-03-20 17:27:06 +01:00
Sandro Jäckel a5d95ac5fc
nixos/tmp: move /tmp options under boot.tmp 2023-03-19 18:49:37 +01:00
apfelkuchen06 0ddfb0a5df nixos/networkd: add BridgeVLAN options 2023-03-16 03:31:04 +01:00
apfelkuchen06 cd650b3fa3 nixos/networkd: add QuickFairQueueingClass options 2023-03-16 03:31:04 +01:00
apfelkuchen06 fde806d5a5 nixos/networkd: add QuickFairQueueing options 2023-03-16 03:31:04 +01:00
apfelkuchen06 493ed75418 nixos/networkd: add HeavyHitterFilter options 2023-03-16 03:31:04 +01:00
apfelkuchen06 88d99a3630 nixos/networkd: add HierarchyTokenBucketClass options 2023-03-16 03:31:04 +01:00
apfelkuchen06 24df07c786 nixos/networkd: add HierarchyTokenBucket options 2023-03-16 03:31:03 +01:00
apfelkuchen06 29e5451963 nixos/networkd: add TrivialLinkEqualizer options 2023-03-16 03:31:03 +01:00
apfelkuchen06 cf470ebd88 nixos/networkd: add FairQueueing options 2023-03-16 03:31:03 +01:00
apfelkuchen06 dbc14e5a44 nixos/networkd: add FairQueueingControlledDelay options 2023-03-16 03:31:03 +01:00
apfelkuchen06 5b5c79c6a0 nixos/networkd: add GenericRandomEarlyDetection options 2023-03-16 03:28:23 +01:00
apfelkuchen06 ca496f8754 nixos/networkd: add EnhancedTransmissionSelection options 2023-03-16 03:28:23 +01:00
apfelkuchen06 3cde7aaa36 nixos/networkd: add DeficitRoundRobinSchedulerClass options 2023-03-16 03:28:23 +01:00
apfelkuchen06 0d06e85996 nixos/networkd: add DeficitRoundRobinScheduler options 2023-03-16 03:28:23 +01:00
apfelkuchen06 49df6bc669 nixos/networkd: add ControlledDelay options 2023-03-16 03:28:23 +01:00
apfelkuchen06 728108555e nixos/networkd: add CAKE options 2023-03-16 03:28:23 +01:00
apfelkuchen06 7a6cae0e15 nixos/networkd: add PFIFOFast options 2023-03-16 03:28:23 +01:00
apfelkuchen06 f75ec30fee nixos/networkd: add PFIFOHeadDrop options 2023-03-16 03:28:23 +01:00
apfelkuchen06 d9e1963a15 nixos/networkd: add BFIFO options 2023-03-16 03:28:22 +01:00
apfelkuchen06 f2ca28f658 nixos/networkd: add PFIFO options 2023-03-16 03:28:22 +01:00
apfelkuchen06 51689e86b9 nixos/networkd: add StochasticFairnessQueueing options 2023-03-16 03:28:22 +01:00
apfelkuchen06 736650ccf1 nixos/networkd: add StochasticFairBlue options 2023-03-16 03:28:22 +01:00
apfelkuchen06 872a4823cf nixos/networkd: add FlowQueuePIE options 2023-03-16 03:28:22 +01:00
apfelkuchen06 2784862e41 nixos/networkd: add PIE options 2023-03-16 03:28:22 +01:00
apfelkuchen06 d63035329e nixos/networkd: add TokenBucketFilter options 2023-03-16 03:28:21 +01:00
apfelkuchen06 55cd970d73 nixos/networkd: add NetworkEmulator options 2023-03-16 03:28:21 +01:00
apfelkuchen06 b08e5be98d nixos/networkd: add QDisc options 2023-03-16 03:28:21 +01:00
apfelkuchen06 09e745c784 nixos/networkd: add IPoIB options 2023-03-16 03:28:21 +01:00
apfelkuchen06 df14953724 nixos/networkd: add CAN options 2023-03-16 03:28:21 +01:00
apfelkuchen06 a7724b8f91 nixos/networkd: add LLDP options 2023-03-16 03:28:21 +01:00
apfelkuchen06 ae15b86d4d nixos/networkd: add BridgeMDB option 2023-03-16 03:28:21 +01:00
apfelkuchen06 d646f7c7f2 nixos/networkd: add BridgeFDB options 2023-03-16 03:28:21 +01:00
apfelkuchen06 28ddd570f7 nixos/networkd: add Bridge options 2023-03-16 03:28:20 +01:00
apfelkuchen06 590ccae1f8 nixos/networkd: add L2TP options 2023-03-16 03:28:20 +01:00
github-actions[bot] 795332a826
Merge staging-next into staging 2023-03-15 18:01:44 +00:00
Vladimír Čunát a86610144f
Merge #219444: staging-next 2023-03-04 2023-03-15 17:35:39 +01:00
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