Commit Graph

2133 Commits

Author SHA1 Message Date
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
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