Commit graph

2677 commits

Author SHA1 Message Date
Sandro
fa5abfe559
Merge pull request #317623 from jmbaur/stc-ng-followup 2024-07-18 11:33:59 +02:00
Sandro Jäckel
0e5342f48a
nixos/systemd-boot: give systemdBootBuilder a better name
Before it had twice a store hash which made nix store diff-closures
kinda ugly.
2024-07-16 19:53:57 +02:00
turtton
be20b91547 nixos/systemd-boot-builder: fix installed_match regex
Fix regular expression used to get bootloader versions from bootctl status.
This avoids problems that occur in minor environments like mine.

References:  #296563
2024-07-13 09:20:13 +02:00
Florian Klink
68767b54d3
Merge pull request #321935 from Ma27/nspawn-cgroupsv2
nixos/nspawn: cgroupsv2 by default
2024-07-12 18:06:08 +03:00
Julien Malka
6701c2c867
Merge pull request #323421 from Mic92/systemd-boot-builder 2024-07-07 19:36:09 +02:00
Mitchell Skaggs
5e1481ccc7
nixos/systemd-boot: fix invalid escape sequences
This was inadvertently introduced in https://github.com/NixOS/nixpkgs/pull/281639, but was not a loud warning until Python 3.12 made invalid escape sequences a `SyntaxWarning` instead of a `DeprecationWarning` in https://github.com/python/cpython/issues/98401.
2024-07-07 05:37:08 -05:00
Franz Pletz
aa8c9e6f2d
Merge pull request #317642 from melvyn2/systemd-networkd-network-options 2024-07-04 20:21:37 +02:00
Franz Pletz
a1ecdd6b1a
Merge pull request #276135 from nbdd0121/netdev 2024-07-04 18:35:15 +02:00
Robert Hensing
7b1af67486 nixos/journald: Link to journald manpage
This creates a link to https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html,
thanks to `doc/manpage-urls.json`.
2024-07-02 12:09:07 +02:00
r-vdp
d1e0f30cb2
Fix SSH in scripted initrd
Co-authored-by: Emily <vcs@emily.moe>
2024-07-01 15:35:55 +02:00
r-vdp
79d8116671
Fix ssh in initrd for systemd-initrd
Broken in https://github.com/NixOS/nixpkgs/pull/323753
2024-07-01 15:35:55 +02:00
Jörg Thalheim
ebfee308fc systemd-boot-builder: use type literals 2024-06-29 19:09:38 +02:00
Jörg Thalheim
6d0be2bec1 systemd-boot-builder: allow exceptions from python naming scheme 2024-06-29 19:09:28 +02:00
Jörg Thalheim
1ae4daa608 systemd-boot-builder: use safe run wrapper
we have a zoo of ways to call subprocesses.
Let's just replace this with one function that has reasonable defaults.
i.e. I catched instances where commands where run in a shell.
2024-06-29 19:09:06 +02:00
Jörg Thalheim
5cbf195292 systemd-boot-builder: use regex strings 2024-06-29 19:09:04 +02:00
Jörg Thalheim
f339bdf84c systemd-boot-builder: simplify conditions 2024-06-29 19:09:02 +02:00
Florian Klink
0ee2243bc8
Merge pull request #322980 from michaelfranzl/fix-nss-libvirt
nixos/virtualisation: increase priority for libvirt NSS modules
2024-06-28 18:15:16 +03:00
Jared Baur
560cd874a3
nixos/etc: fix using etc overlay on cross-compiled systems
We need to run tooling from the build platform when generating the EROFS.
2024-06-26 19:50:24 -07:00
nikstur
e05a365dca
Merge pull request #321991 from Mic92/etc-overlay-cross
etc.overlay: fix cross-build
2024-06-26 19:12:15 +02:00
Sandro
44b22d8d45
Merge pull request #318185 from tomfitzhenry/initrd-ssh-null-alg
nixos/initrd-ssh: set KexAlgorithms/Ciphers/MACs only if non-null
2024-06-25 23:21:33 +02:00
Michael Franzl
cae086d605
nixos/virtualisation: increase priority for libvirt NSS modules
When `services.resolved` is enabled, then `resolve [!UNAVAIL=return]`
is added to `system.nssDatabases.hosts` with priority 501,
which prevents lower-priority NSS modules from running
unless systemd-resolved is not available.

Quoting from `man nss-resolve`:

> To activate the NSS module, add "resolve [!UNAVAIL=return]" to the line
> starting with "hosts:" in /etc/nsswitch.conf. Specifically, it is
> recommended to place "resolve" early in /etc/nsswitch.conf's "hosts:"
> line. It should be before the "files" entry, since systemd-resolved
> supports /etc/hosts internally, but with caching. To the contrary, it
> should be after "mymachines", to give hostnames given to local VMs and
> containers precedence over names received over DNS. Finally, we
> recommend placing "dns" somewhere after "resolve", to fall back to
> nss-dns if systemd-resolved.service is not available.

Note that the man page (just) recommends "early" and means with this
"before the 'files' and 'dns' entries". It does not insist on being
first or excluding other modules.

For this reason, libvirt NSS modules should run before the `resolve`
module. They should come right next to `mymachines` because both are
conceptually very similar -- they resolve local VMs/containers.

Since the data source of the libvirt NSS modules are local
plain text files (see source code of the libvirt NSS module),
no performance impact is expected form this raise of priorities.

Other NSS modules in NixOS also explicitly set their priority, which is
why this change increases consistency.

Fixes #322022
2024-06-25 20:22:14 +02:00
Will Fancher
2893f56de0
Merge pull request #319359 from misuzu/clevis-zfs-fix
nixos/clevis: add support for parent encrypted zfs datasets
2024-06-24 14:47:55 -04:00
Jörg Thalheim
04efc006a4 etc.overlay: fix cross-build 2024-06-23 17:31:03 +02:00
Maximilian Bosch
749aec8444
nixos/nspawn: cgroupsv2 by default
That way you also get features like cgroup accounting for systemd units
when using systemd-nspawn w/o classic nixos containers.
2024-06-23 11:48:58 +02:00
Jared Baur
0144b6a270
nixos/switch-to-configuration: add a note for future modifications
Any future behavioral modifications to switch-to-configuration should
also be made to switch-to-configuration-ng. Leave a note at the top of
the script to ensure people don't forget.
2024-06-21 23:22:57 -07:00
Philip Taron
faa579e444
nixos/systemd-boot: guard assertion messages against eval failures
These messages should be able to be printed in all cases. In particular, trying to coerce a `null` to a string is an error unless passed through `toString`.
2024-06-18 11:30:16 -07:00
nikstur
2d15501141
Merge pull request #314579 from ivan770/etc-direct-symlinks
nixos/etc: support direct symlinks with etc overlay
2024-06-13 17:01:35 +02:00
Florian Klink
eabd9c36d9
Merge pull request #318604 from jmbaur/pref64-networkd
nixos/systemd-networkd: add PREF64 related options
2024-06-12 22:09:54 +03:00
misuzu
4df3c4c17b nixos/clevis: add support for parent encrypted zfs datasets 2024-06-12 21:21:50 +03:00
Ming-Chuan
9f488f27d7 nixos/initrd-ssh: Fix ignoreEmptyHostKeys description 2024-06-11 19:31:21 +10:00
Jared Baur
b867cc215f
nixos/systemd-networkd: add PREF64 related options 2024-06-09 20:41:32 -07:00
Tom Fitzhenry
54332f47ce nixos/initrd-ssh: set KexAlgorithms/Ciphers/MACs only if non-null
Prior to this commit, if services.openssh.settings.Macs is null, then
initrd-ssh.nix would fail to build.

Same for KexAlgorithms and Ciphers.

Noticed by @SuperSandro2000: https://github.com/NixOS/nixpkgs/pull/316934#issuecomment-2149659873
2024-06-08 15:14:26 +10:00
Pol Dellaiera
f2318b9d58
nixos/boot: use --replace-fail 2024-06-06 18:33:30 +02:00
melvyn
d4f459fa89
nixos/networkd: add new Network section options
Adds IPv4LLStartAddress, IPv4ReversePathFilter, IPv4ReversePathFilter, IPv4RouteLocalnet, and IPv4RouteLocalnet
2024-06-05 21:45:03 -07:00
Florian Klink
40066ba0d8
Merge pull request #316168 from dawidd6/systemd-user-generators
nixos/systemd: link user-generators
2024-06-05 09:59:29 +02:00
Dawid Dziurla
fbbc41f7da
nixos/systemd: simplify hooks function 2024-06-03 11:15:59 +02:00
Guillaume Girol
6ca2cfd75b
Merge pull request #313485 from tpwrules/copytoram-notif
nixos/stage-1-init: notify during copytoram
2024-06-01 21:06:33 +02:00
Dawid Dziurla
25ad0cdbfc
nixos/systemd: link user-generators 2024-05-30 19:52:22 +02:00
Dawid Dziurla
156757eaf7
nixos/systemd-user: add generators option 2024-05-30 19:51:42 +02:00
Franz Pletz
4e1b4397d9
Merge pull request #312472 from Ma27/networkd-option-rename
nixos/networkd: get rid of *Config attributes in lists
2024-05-30 04:06:01 +02:00
Jade Lovelace
e60c7e080d nixos/systemd-boot-builder: remove workaround for 10 year old Nix bug
This was originally introduced in 9245516b46,
which reveals it is a workaround for a Nix bug from 10 years ago that
was *fixed* 10 years ago.

References:
https://github.com/NixOS/nix/pull/425
https://github.com/NixOS/nixpkgs/issues/5494
2024-05-29 02:52:47 -07:00
Will Fancher
0415aec200
Merge pull request #297250 from NickCao/sysuser
nixos/systemd-sysusers: make uid/gid allocation stable
2024-05-26 20:17:06 -04:00
ivan770
1b288bca00
nixos/etc: support direct symlinks with etc overlay 2024-05-25 08:41:24 -04:00
Thomas Watson
5aa9fc9273 nixos/stage-1-init: notify during copytoram
Demystifies a long pause at an unrelated message, particularly if the
source media is slow.
2024-05-22 18:43:18 -05:00
Will Fancher
072054ccb5 nixos/systemd-stage-1: Support systemd-resolved 2024-05-21 20:55:37 -04:00
Will Fancher
154459858f nixos/systemd-resolved: Should be wanted by sysinit.target
As per its [Install] section upstream
2024-05-21 02:41:22 -04:00
Will Fancher
146bffe5aa nixos/systemd-resolved: Re-indent 2024-05-21 02:41:22 -04:00
Maximilian Bosch
c4fd7cf16d
nixos/networkd: get rid of *Config attributes in lists
This patch is about removing `wireguardPeerConfig`,
`dhcpServerStaticLeaseConfig` - a.k.a. the
AbstractSingletonProxyFactoryBean of nixpkgs - and friends.

As a former colleague said

> worst abstraction ever

I second that. I've written enough networkd config for NixOS systems so
far to have a strong dislike. In fact, these don't even make sense:
`netdevs.wireguardPeers._.wireguardPeerConfig` will be rendered into
the key `[WireGuardPeer]` and every key from `wireguardPeerConfig` is in
there. Since it's INI, there's no place where sections on the same level
as wireguardPeerConfig fit into. Hence, get rid of it all.

For the transition, using the old way is still allowed, but gives a
warning. I think we could drop this after one release.

The tests of rosenpass and systemd-networkd-dhcpserver-static-leases
were broken on the rev before, hence they were updated, but are still
not building.
2024-05-20 17:26:42 +02:00
Pol Dellaiera
aa5d9c30f8
Merge pull request #309236 from ElvishJerricco/sd-s1-fix-xfs-fsck
nixos/systemd-stage-1: Fix fsck.xfs needing bash's sh symlink
2024-05-18 23:57:04 +02:00
Fabian Möller
da68f358bc
treewide: Remove usage of pkgs.{system,hostPlatform} aliases
These aliases should not be used inside nixpkgs and are only there for backward
compatibility.
2024-05-16 11:48:32 +02:00