about summary refs log tree commit diff
path: root/nixos/modules/system
AgeCommit message (Collapse)AuthorFilesLines
2023-09-10nixos/networkd: Fix incorrectly treating attrset as listAndrew Marshall1-3/+2
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-09Merge pull request #254166 from Artturin/fixthingy1Artturi1-1/+1
2023-09-09Merge pull request #249643 from amarshall/networkd-reloadJanne Heß1-2/+9
nixos/networkd: Reload (not restart) when only .network units change
2023-09-09Merge pull request #254027 from luochen1990/feature-better-binfmtJanne Heß1-1/+1
nixos/binfmt: improve type annotations
2023-09-09nixos/stage-2-init: dont use install to create /etc/nixos if it's a symlinkArtturin1-1/+1
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-08nixos/binfmt: improve type annotationsLuoChen1-1/+1
2023-09-07nixos/systemd-initrd: disable tpm-crb if on armv7l-linuxJared Baur1-1/+1
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-06Merge pull request #253498 from elohmeier/tpmfixFlorian Klink1-4/+12
boot.initrd.systemd: make TPM2 modules optional
2023-09-02Merge pull request #247153 from Artturin/fixwarning1Artturi1-1/+4
2023-09-01Merge pull request #251684 from jmbaur/user-activation-tmpfilesFlorian Klink1-0/+4
nixos/systemd-user: call systemd-tmpfiles during activation
2023-08-31nixos/networkd: Reload (not restart) when only .network units changeAndrew Marshall1-2/+9
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-29nixos/systemd-user: call systemd-tmpfiles during activationJared Baur1-0/+4
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-28Merge pull request #246487 from amjoseph-nixpkgs/pr/binfmt-mipsArtturi1-6/+14
2023-08-28Merge pull request #250316 from helsinki-systems/feat/stc-improve-mount-unitsJanne Heß1-5/+19
nixos/switch-to-configuration: Improve mount unit handling
2023-08-23nixos/binfmt: use PE magic to detect Wine executablesK9001-8/+2
Otherwise we break every Meson build because it creates native executables named foo.exe
2023-08-21nixos/grub: Add submenu for each generation with specialisationdev-null-undefined1-22/+37
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-21nixos/stc: Improve mount unit handlingJanne Heß1-5/+19
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-16Merge pull request #226821 from enc0urage/memtestMaciej Krüger2-51/+19
2023-08-16Merge pull request #232230 from ↵Janne Heß1-23/+35
oddlama/fix-activation-template-unit-specializations Fix detection of changed template unit specializations in switch-to-configuration.pl
2023-08-14boot.initrd.systemd: make TPM2 modules optionalEnno Richter1-4/+12
2023-08-14nixos/systemd-boot: Replace proprietary memtest86 with free memtest86+ in UEFIenc0urage1-13/+8
2023-08-13nixos/switch-to-configuration: Fix unit location in toplevelJanne Heß1-1/+1
2023-08-13nixos/grub: Replace proprietary memtest86 with free memtest86+ in UEFI modeenc0urage1-38/+11
2023-08-12Merge pull request #220263 from samueldr/feature/misc-grub-fixesSamuel Dionne-Riel2-8/+82
nixos/grub: Fixes to allow flicker-free boot, themes and bug fixes
2023-08-04nixos/stage-2-init: Change permission of /etc/nixos only if it existsArtturin1-1/+4
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 56b465390449926626d3378e05b8e507061cd828
2023-08-04nixos/toplevel: move systemBuilder for `boot.kernel.enable`Vincent Haupert2-31/+33
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-01nixos/grub: Remove `with` with broad scopes.Samuel Dionne-Riel1-3/+27
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-01nixos/grub: Insert required image modules for themesSamuel Dionne-Riel1-0/+25
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-01nixos/grub: Add support for timeoutStyleSamuel Dionne-Riel2-1/+27
2023-08-01nixos/grub: Fix extraFiles in subdirectoriesSamuel Dionne-Riel1-1/+1
This directly copies the systemd-boot logic, which works. `install` with `-D` will create all leading directory components.
2023-08-01nixos/grub: Always install with bootloader idSamuel Dionne-Riel1-3/+2
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-07-31nixos/modules/system/boot/binfmt.nix: update mips patternsAdam Joseph1-6/+14
This commit updates the binfmt magic-patterns using https://github.com/qemu/qemu/blob/f5e6786de4815751b0a3d2235c760361f228ea48/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-31nixos/boot/initrd-network: add option to enable udhcpc (#240406)digital1-5/+16
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-30Merge pull request #246082 from ElvishJerricco/exitrd-fix-shutdown-loopFlorian Klink1-1/+5
systemd shutdownRamfs: Fix infinite shutdown loop
2023-07-29nixos/systemd: Add util-linux to systemd-mkswap's pathWill Fancher1-0/+5
2023-07-29systemd shutdownRamfs: Fix infinite shutdown loopWill Fancher1-1/+5
2023-07-28Merge pull request #236027 from iliana/grub-dont-diePol Dellaiera1-1/+4
nixos/grub: don't die on EFI-only systems if devices != ["nodev"]
2023-07-26nixos/lib: systemd definition files functionnikstur2-30/+11
Add a re-usable function that converts an attrset to a directory containing systemd definition files.
2023-07-26nixos/systemd-sysupdate: initnikstur1-0/+142
2023-07-25Merge pull request #236368 from SuperSandro2000/etc-dir-namesPol Dellaiera1-1/+1
nixos/etc: keep directories in derivation name
2023-07-23nixos/switch-to-configuration: fix ignoring of template unit specialization ↵oddlama1-23/+35
dropins
2023-07-22Merge pull request #239624 from Stunkymonkey/use-optionalString-thenFelix Bühler3-7/+6
treewide: use optionalString instead of 'then ""'
2023-07-21Merge pull request #244449 from Artturin/fixsrip1Artturi1-1/+1
2023-07-20util-linux: Fix build on non-LinuxAndrew Marshall1-1/+1
Build logs show: > configure: WARNING: non-linux system; not building mount > configure: WARNING: non-linux system; not building swapon So skip these on non-Linux Using getOutput prevents eval failures on other platforms. Things should stay eval'able with NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 Co-authored-by: Artturin <Artturin@artturin.com>
2023-07-20nixos/stage-1: fix strippingArtturin1-1/+1
got broken in 6ea1a2a1be4e93f938ff084863eab1bd13292f65 which changed runCommandCC to runCommand but was not noticed because it was failing silently runCommand doesn't include CC or bintools
2023-07-20Merge pull request #244033 from SuperSandro2000/issue-243820Will Fancher1-1/+1
nixos/stage-1: fix mount replacement in extra-utils
2023-07-20Revert "nixos/boot/stage-1: chase symlinks when copying binaries"Will Fancher1-1/+1
2023-07-19Merge pull request #241370 from RaitoBezarius/vxlan-independentFlorian Klink1-0/+2
nixos/networkd: support `Independent` flag for VXLAN netdevs
2023-07-19Merge pull request #241365 from RaitoBezarius/macaddrs-netdevsFlorian Klink1-1/+1
nixos/networkd: support netdev MAC addresses
2023-07-17nixos/boot/stage-1: chase symlinks when copying binariesLinus Heckemann1-1/+1
The split of util-linux into further outputs (#236463) resulted in ${util-linux.bin}/bin/mount becoming a symlink. This broke zfs in some cases.