Commit Graph

2342 Commits

Author SHA1 Message Date
Artturi
73d552ecb7
Merge pull request #254918 from RaitoBezarius/dnssec-resolved 2023-09-19 06:45:07 +03:00
Erno Hopearuoho
7d112f7da3 luksroot: fix issue when yubikey is detached during boot process
Fixes #228141, which describes an issue where detaching Yubikey during the boot process
causes cryptsetup to write empty passphrase instead of the challenge-response salt stored
on the boot drive.
2023-09-18 23:10:06 -03:00
Jörg Thalheim
fd6901755d stage1: use correct zfs package
This in particular broke zfsUnstable because it added symbols not present in zfsStable
2023-09-17 21:11:29 +02:00
Raito Bezarius
4f461f7b77 nixos/modules/system/resolved: disable DNSSEC validation by default
Historically, we allowed downgrade of DNSSEC, but some folks argue
this may decrease actually the security posture to do opportunistic DNSSEC.

In addition, the current implementation of (opportunistic) DNSSEC validation
is broken against "in the wild" servers which are usually slightly non-compliant.

systemd upstream recommended to me (in personal communication surrounding
the All Systems Go 2023 conference) to disable DNSSEC validation until
they work on it in a significant capacity, ideally, by next year.
2023-09-13 11:49:16 +02:00
Artturi
48a57a9884
Merge pull request #254480 from andersk/memtest86plus-name 2023-09-12 18:19:50 +03:00
Maciej Krüger
78e149fba3
Merge pull request #244722 from mdlayher/mdl-dhcp 2023-09-11 21:12:56 +02:00
Anders Kaseorg
191dee486f nixos/systemd-boot: Fix Memtest86+ name.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-09-10 18:44:20 -07:00
Florian Klink
688d95b6e6
Merge pull request #254056 from n8henrie/master
Include note about systemd default watchdog reboot time
2023-09-10 16:07:44 +02:00
Andrew Marshall
3f9cc71228 nixos/networkd: Fix incorrectly treating attrset as list
This reverses a [change made during PR review][1] that I did not sufficiently
test, causing [this error][2].

[1]: https://github.com/NixOS/nixpkgs/pull/249643#discussion_r1309151135
[2]: https://github.com/NixOS/nixpkgs/pull/249643#issuecomment-1712707336
2023-09-10 00:54:42 -04:00
Artturi
b3e16d6e10
Merge pull request #254166 from Artturin/fixthingy1 2023-09-09 19:56:02 +03:00
Janne Heß
6b8306c21c
Merge pull request #249643 from amarshall/networkd-reload
nixos/networkd: Reload (not restart) when only .network units change
2023-09-09 17:31:09 +02:00
Janne Heß
a71936c70f
Merge pull request #254027 from luochen1990/feature-better-binfmt
nixos/binfmt: improve type annotations
2023-09-09 17:24:53 +02:00
Artturin
f25f2a4209 nixos/stage-2-init: dont use install to create /etc/nixos if it's a symlink
it should be checking that it is not a broken symlink but bash
conditionals are difficult

-d was causing the directory to not be created if it does not exist

```
$ install -m 0755 -d $PWD/hello
$ ls
hello/
$ ln -s something notexist
'notexist' -> 'something'
$ ls -l
lrwxrwxrwx artturin artturin 9 B Sat Sep  9 06:59:44 2023 notexist@ ⇒ something
drwxr-xr-x artturin artturin 2 B Sat Sep  9 06:59:36 2023 hello/
$ install -m 0755 -d $PWD/notexist
install: cannot change permissions of ‘/home/artturin/nixgits/my-nixpkgs/test/notexist’: No such file or directory
```
2023-09-09 07:22:05 +03:00
Nathan Henrie
5061d9daf0 systemd.watchdog: (docs): include note about systemd default watchdog reboot time
I found it very confusing to get an error message on reboot about `10min` when that didn't seem to be the NixOS default.
2023-09-08 09:12:29 -06:00
LuoChen
9c5afb2f9a
nixos/binfmt: improve type annotations 2023-09-08 19:40:42 +08:00
Jared Baur
c47f423a9d
nixos/systemd-initrd: disable tpm-crb if on armv7l-linux
In addition to the existing riscv64 exception, also disable adding the
tpm-crb module to the initrd if the host platform is armv7.
2023-09-07 00:38:55 +02:00
Florian Klink
0a49365db9
Merge pull request #253498 from elohmeier/tpmfix
boot.initrd.systemd: make TPM2 modules optional
2023-09-06 11:49:47 +03:00
Artturi
26b11c54d8
Merge pull request #247153 from Artturin/fixwarning1 2023-09-02 03:13:30 +03:00
Florian Klink
90204f058c
Merge pull request #251684 from jmbaur/user-activation-tmpfiles
nixos/systemd-user: call systemd-tmpfiles during activation
2023-09-01 21:52:19 +03:00
Andrew Marshall
189b14246a nixos/networkd: Reload (not restart) when only .network units change
Underneath, systemd-networkd’s reload is just `networkctl reload`. Per
`man networkctl`, calling `reload` is expected to fully handle new,
modified, and removed .network files, but it only handles *new* .netdev
files. For simplicity, assume .network -> reload and .netdev -> restart.

It’s desirable to perform reload instead of restart, as restart has the
potential to bring down interfaces, resulting in a loss of network
connectivity.
2023-08-31 12:24:17 -04:00
Jared Baur
e39c9f13bc
nixos/systemd-user: call systemd-tmpfiles during activation
Just like with system-wide tmpfiles, call `systemd-tmpfiles --create
--remove` for users during activation. This fixes an issue where new
entries in a user's tmpfiles are not reflected after activation, only at
boot when the user service systemd-tmpfiles-setup.service runs or only
after running systemd-tmpfiles manually.
2023-08-29 10:46:44 -07:00
Artturi
206ca4bef4
Merge pull request #246487 from amjoseph-nixpkgs/pr/binfmt-mips 2023-08-28 22:40:30 +03:00
Janne Heß
fd454fe4b6
Merge pull request #250316 from helsinki-systems/feat/stc-improve-mount-units
nixos/switch-to-configuration: Improve mount unit handling
2023-08-28 09:18:44 +02:00
K900
c6cf85b0d5 nixos/binfmt: use PE magic to detect Wine executables
Otherwise we break every Meson build because it creates native executables named foo.exe
2023-08-23 16:20:57 +03:00
dev-null-undefined
a39526b3ef
nixos/grub: Add submenu for each generation with specialisation
Before this commit there was no way to access (boot into) specialisation of previous generations from grub,even tho they are there.

This commit will add grub submenu for each generation if the generation has any specialisation.
Which will allow you to boot into them.

Co-authored-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
2023-08-21 21:44:42 +02:00
Janne Heß
eb831f759b
nixos/stc: Improve mount unit handling
We should sometimes restart the units rather than reloading them so the
changes are actually applied. / and /nix are explicitly excluded because
there was some very old issue where these were unmounted. I don't think
this will affect many people since most people use fstab mounts instead
but I plan to adapt this behavior for fstab mounts as well in the future
(once I wrote a test for the fstab thingies).
2023-08-21 09:07:14 +02:00
Maciej Krüger
56700d64b1
Merge pull request #226821 from enc0urage/memtest 2023-08-16 15:31:32 +02:00
Janne Heß
bc9b484db8
Merge pull request #232230 from oddlama/fix-activation-template-unit-specializations
Fix detection of changed template unit specializations in switch-to-configuration.pl
2023-08-16 13:46:45 +02:00
Enno Richter
3f52185de8 boot.initrd.systemd: make TPM2 modules optional 2023-08-14 09:34:29 +02:00
enc0urage
00d7065913 nixos/systemd-boot: Replace proprietary memtest86 with free memtest86+ in UEFI 2023-08-14 03:05:24 +00:00
Janne Heß
d995da11d8
nixos/switch-to-configuration: Fix unit location in toplevel 2023-08-13 14:26:30 +02:00
enc0urage
1488a2bc1a nixos/grub: Replace proprietary memtest86 with free memtest86+ in UEFI mode 2023-08-13 12:04:34 +00:00
Samuel Dionne-Riel
f064a5bcc2
Merge pull request #220263 from samueldr/feature/misc-grub-fixes
nixos/grub: Fixes to allow flicker-free boot, themes and bug fixes
2023-08-12 20:32:51 -04:00
Artturin
103bb49f84 nixos/stage-2-init: Change permission of /etc/nixos only if it exists
When I boot there's a warning `stage-2-init: install: cannot change permissions of '/etc/nixos': No such file or directory`
because my /etc/nixos is a symlink to $HOME/dotfiles.

```
/etc/nixos -> /home/artturin/dotfiles
```

These lines were added in 56b4653904
2023-08-04 20:54:18 +03:00
Vincent Haupert
fbebce610f nixos/toplevel: move systemBuilder for boot.kernel.enable
This avoids creating a build-time reference on `boot.kernelParams` if
the configuration does not use a kernel, i.e., `boot.kernel.enable` is
set to `false`.
2023-08-04 12:46:03 +02:00
Samuel Dionne-Riel
1d416595ad nixos/grub: Remove with with broad scopes.
There is only other `with` with a somewhat broad scope, `with pkgs`, but
it's used in a place where it would become awkward to change out. And
anyway its scope is rather limited still.
2023-08-01 19:18:48 -04:00
Samuel Dionne-Riel
c867c6d172 nixos/grub: Insert required image modules for themes
With a limited testing of all packaged GRUB 2 themes (pkgs.nixos-grub2-theme)
this is tested to work.

Without this change, the theme loading will error out (waiting for a key press).

With this change, the theme loads and works as expected.
2023-08-01 18:56:03 -04:00
Samuel Dionne-Riel
50063bf9d6 nixos/grub: Add support for timeoutStyle 2023-08-01 18:56:03 -04:00
Samuel Dionne-Riel
f12b216574 nixos/grub: Fix extraFiles in subdirectories
This directly copies the systemd-boot logic, which works.

`install` with `-D` will create all leading directory components.
2023-08-01 18:54:27 -04:00
Samuel Dionne-Riel
894d47f989 nixos/grub: Always install with bootloader id
The intent was to not pass the flag when installing as removable. In
reality there is a third case, where you may not want to touch EFI
variables, and not want to install as removable.

In that case, it would install to the generic \EFI\grub\grubx64.efi,
which is not a good choice in any cases. The operating system should
"own" their path under \EFI\ to be a good citizen [citation needed].

With this change, there can be only two paths GRUB can be installed to:

 - \EFI\NixOS-boot\grubx64.efi
 - \EFI\BOOT\bootx64.efi

This removes the surprising behaviour where GRUB may be installed to a
different location only because we configured NixOS not to touch EFI
variables.

It may be necessary under some configurations to install GRUB without
touching EFI variables, but to the NixOS-owned location.
2023-08-01 18:54:27 -04:00
Adam Joseph
957541ad69 nixos/modules/system/boot/binfmt.nix: update mips patterns
This commit updates the binfmt magic-patterns using

  f5e6786de4/scripts/qemu-binfmt-conf.sh

The patterns prior to this commit did not understand the difference
between mips32-*-* (32-bit void*,int) and mips64-*-*abin32 (32-bit
void*, 64-bit int).  This commit corrects that.
2023-07-31 21:24:26 -07:00
digital
9d78971007
nixos/boot/initrd-network: add option to enable udhcpc (#240406)
In some setups, and especially with sytemd-networkd becoming more widely
used, networking.useDHCP is set to false. Despite this, it may be useful
to have dhcp in the initramfs.
2023-07-31 16:08:56 +02:00
Florian Klink
a2a7096157
Merge pull request #246082 from ElvishJerricco/exitrd-fix-shutdown-loop
systemd shutdownRamfs: Fix infinite shutdown loop
2023-07-30 00:11:55 +02:00
Will Fancher
7a3730f901 nixos/systemd: Add util-linux to systemd-mkswap's path 2023-07-29 14:02:06 -04:00
Will Fancher
4ecd0c119a systemd shutdownRamfs: Fix infinite shutdown loop 2023-07-29 13:52:52 -04:00
Pol Dellaiera
fd304ecc8a
Merge pull request #236027 from iliana/grub-dont-die
nixos/grub: don't die on EFI-only systems if devices != ["nodev"]
2023-07-28 17:26:24 +02:00
nikstur
a662dc8b73 nixos/lib: systemd definition files function
Add a re-usable function that converts an attrset to a directory
containing systemd definition files.
2023-07-26 23:30:08 +02:00
nikstur
9b4d3b840e nixos/systemd-sysupdate: init 2023-07-26 20:33:31 +02:00
Pol Dellaiera
07fd6694b5
Merge pull request #236368 from SuperSandro2000/etc-dir-names
nixos/etc: keep directories in derivation name
2023-07-25 03:02:47 +02:00
oddlama
d073105d6b
nixos/switch-to-configuration: fix ignoring of template unit specialization dropins 2023-07-23 13:16:58 +02:00