Commit Graph

2302 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Pol Dellaiera
ec2ac8ec82
Merge pull request #275485 from Ex-32/binfmt-emulatedsystems-fix
nixos/binfmt: added assertion to prevent emulation of current system
2024-05-15 08:58:12 +02:00
Florian Klink
ddf728e50b
Merge pull request #306926 from tie/networkd-global-ipv6-privacy-extensions
nixos/networkd: allow IPv6PrivacyExtensions in networkd.conf
2024-05-08 14:41:08 +03:00
Will Fancher
4871a4e0da nixos/systemd-stage-1: Fix fsck.xfs needing bash's sh symlink 2024-05-05 06:01:03 -04:00
Anomalocaridid
52ad64b548
nixos/grub: fix documentation for boot.loader.grub.theme (#305663)
Closes #233865. Currently, the documentation for `boot.loader.grub.theme` misleadingly implies that it needs a package for a grub theme instead of a path to a grub theme.
2024-05-02 17:43:24 +00:00
nicoo
d8e31f6617
nixos/systemd-boot: Avoid remote mypy executions (#263397) 2024-04-30 15:56:27 +00:00
Ivan Trubach
37a3ad0c01 nixos/networkd: allow IPv6PrivacyExtensions in networkd.conf
This change adds support for setting IPv6PrivacyExtensions= in
systemd.network.config.networkConfig.

https://www.freedesktop.org/software/systemd/man/latest/networkd.conf.html#IPv6PrivacyExtensions=

Added in systemd version 254.
2024-04-26 10:30:19 +03:00
Jörg Thalheim
a4a18f7b92 nixos/systemd-boot: avoid expensive mypy builds on configuration changes
* Mypy dependencies pull in quite a few packages, which makes it harder to create offline installers.
2024-04-23 20:05:26 +02:00
Florian Klink
5a2d4496d3
Merge pull request #297726 from r-vdp/systemd-unit-names
systemd: add a name option to all systemd units
2024-04-23 12:58:51 +03:00
r-vdp
9258f57625
systemd: add a name option to all systemd units
This allows us to set things like dependencies in a way that we can
catch typos at eval time.
So instead of
```nix
systemd.services.foo.wants = [ "bar.service" ];
```
we can write
```nix
systemd.services.foo.wants = [ config.systemd.services.bar.name ];
```
which will throw an error if no such service has been defined.

Not all cases can be done like this (eg template services), but in a lot
of cases this will allow to avoid typos.

There is a matching option on the unit option
(`systemd.units."foo.service".name`) as well.
2024-04-15 11:32:45 +02:00
Astrid Yu
ed854ed0e3 nixos/networkd: add [Bridge] section to netdev conf
This setting was missing from netdev.

This commit additionally adds a test using the new
section, ensuring that STP can be enabled.
2024-04-14 15:16:44 -07:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
pennae
4e21f361d6
Merge pull request #154952 from colemickens/extlinux
extlinux-conf-builder: specialisations entries
2024-04-09 18:49:08 +02:00
nikstur
4c397ea6de systemd-lib: include GPTMaxLabelLength constant 2024-04-08 16:42:25 +02:00
Florian Klink
fd61db7a32
Merge pull request #299717 from ElvishJerricco/systemd-debug-shell
nixos/systemd: Enable debug-shell.service.
2024-04-01 17:20:24 +02:00
Will Fancher
df32b558b5 nixos/systemd: Enable debug-shell.service. 2024-03-29 17:32:38 -04:00
Will Fancher
7fc25040e2
Merge pull request #277759 from onny/initrd-keyfiles
nixos/initrd-ssh: Add authorizedKeyFiles option
2024-03-29 00:24:00 -04:00
Janne Heß
fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Janne Heß
bc77c7a973 treewide: Mark Nix blocks in markdown as Nix
This should help us with highlighting and future formatting.
2024-03-28 09:28:12 +01:00
Will Fancher
c77e28a013
Merge pull request #298201 from philiptaron/fix-initrd-activation-with-gpt-auto
nixos/systemd/initrd: make systemd mount root as `rw` when using gpt-auto to find it
2024-03-26 18:09:33 -04:00
Sandro
c51e10cbd2
Merge pull request #283240 from Aleksanaa/nixos/plymouth
nixos/plymouth: improving documentation of logo option
2024-03-24 21:53:08 +01:00
Philip Taron
e2e43f6ce7
nixos/systemd/initrd: make systemd mount root as rw if gpt-auto is set 2024-03-22 16:08:29 -07:00
Vladimír Čunát
e90be8418d
Merge #284149: nixos/kernel: add hid_corsair to initrd modules 2024-03-22 14:59:18 +01:00
nikstur
d5d1e6a4fa
Merge pull request #297227 from WilliButz/uki/expose-rendered-config
nixos/uki: add configFile option
2024-03-20 10:41:59 +01:00