about summary refs log tree commit diff
path: root/nixos/modules/system
AgeCommit message (Collapse)AuthorFilesLines
2024-05-16treewide: Remove usage of pkgs.{system,hostPlatform} aliasesFabian Möller1-1/+1
These aliases should not be used inside nixpkgs and are only there for backward compatibility.
2024-05-15Merge pull request #275485 from Ex-32/binfmt-emulatedsystems-fixPol Dellaiera1-1/+1
nixos/binfmt: added assertion to prevent emulation of current system
2024-05-10nixos/switch-to-configuration: add new implementationJared Baur1-34/+75
This adds an implementation of switch-to-configuration that allows for closer interaction with the lifecycle of systemd units by using DBus APIs directly instead of using systemctl. It is disabled by default, but can be enabled by specifying `{ system.switch = { enable = false; enableNg = true; }; }`.
2024-05-08Merge pull request #306926 from tie/networkd-global-ipv6-privacy-extensionsFlorian Klink1-0/+2
nixos/networkd: allow IPv6PrivacyExtensions in networkd.conf
2024-05-06Merge pull request #301827 from kampka/forbiddenDependenciesRegexArtturin2-14/+13
nixos/top-level: Turn `system.forbiddenDependenciesRegex` into a list
2024-05-04nixos/dbus: fix switching from dbus-broker to dbusSandro Jäckel1-0/+3
2024-05-02nixos/top-level: Rename `system.forbiddenDependenciesRegex` to ↵Christian Kampka2-14/+13
`system.forbiddenDependenciesRegexes` and turn it in to a list. The current setting of system.forbiddenDependenciesRegex is a string, meaning only one such regex as any additional setting would result in conflicts. As maintainers have already started using this setting eg. in profiles, it would be good if this setting would accept a list of regex to allow the end user to make use of it in addition to package maintainers.
2024-05-02nixos/grub: fix documentation for `boot.loader.grub.theme` (#305663)Anomalocaridid1-3/+2
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-04-30nixos/systemd-boot: Avoid remote mypy executions (#263397)nicoo1-1/+3
2024-04-26nixos/networkd: allow IPv6PrivacyExtensions in networkd.confIvan Trubach1-0/+2
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-23nixos/systemd-boot: avoid expensive mypy builds on configuration changesJörg Thalheim1-12/+14
* Mypy dependencies pull in quite a few packages, which makes it harder to create offline installers.
2024-04-23Merge pull request #297726 from r-vdp/systemd-unit-namesFlorian Klink3-26/+25
systemd: add a name option to all systemd units
2024-04-15systemd: add a name option to all systemd unitsr-vdp3-26/+25
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-14nixos/networkd: add [Bridge] section to netdev confAstrid Yu1-0/+42
This setting was missing from netdev. This commit additionally adds a test using the new section, ensuring that STP can be enabled.
2024-04-13nixos: remove all uses of lib.mdDocstuebinm57-510/+504
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-09Merge pull request #154952 from colemickens/extlinuxpennae1-1/+7
extlinux-conf-builder: specialisations entries
2024-04-08systemd-lib: include GPTMaxLabelLength constantnikstur1-3/+3
2024-04-01Merge pull request #299717 from ElvishJerricco/systemd-debug-shellFlorian Klink2-2/+9
nixos/systemd: Enable debug-shell.service.
2024-03-29nixos/systemd: Enable debug-shell.service.Will Fancher2-2/+9
2024-03-29Merge pull request #277759 from onny/initrd-keyfilesWill Fancher1-4/+26
nixos/initrd-ssh: Add authorizedKeyFiles option
2024-03-28treewide: Fix all Nix ASTs in all markdown filesJanne Heß1-2/+6
This allows for correct highlighting and maybe future automatic formatting. The AST was verified to work with nixfmt only.
2024-03-28treewide: Mark Nix blocks in markdown as NixJanne Heß1-2/+2
This should help us with highlighting and future formatting.
2024-03-26Merge pull request #298201 from philiptaron/fix-initrd-activation-with-gpt-autoWill Fancher1-1/+4
nixos/systemd/initrd: make systemd mount root as `rw` when using gpt-auto to find it
2024-03-24Merge pull request #283240 from Aleksanaa/nixos/plymouthSandro1-3/+3
nixos/plymouth: improving documentation of logo option
2024-03-22nixos/systemd/initrd: make systemd mount root as rw if gpt-auto is setPhilip Taron1-1/+4
2024-03-22Merge #284149: nixos/kernel: add hid_corsair to initrd modulesVladimír Čunát1-0/+1
2024-03-20Merge pull request #297227 from WilliButz/uki/expose-rendered-confignikstur1-3/+12
nixos/uki: add configFile option
2024-03-19Merge pull request #290061 from SuperSandro2000/kernel-modules-package-nameWill Fancher3-11/+7
nixos/boot: move name overwrite to pkgs.aggregateModules to option
2024-03-19nixos/uki: add configFile optionWilliButz1-3/+12
This option makes it easier to reuse a system's ukify.conf without the need for manually calling the generator on `settings` again to receive a rendered configuration file. Theoretically, a complete configuration file could now be provided by users.
2024-03-18Merge pull request #293591 from lf-/jade/fix-luksroot-assertWill Fancher1-2/+4
nixos.luksroot: fix assertion message to name correct option
2024-03-18nixos.luksroot: fix assertion message to name correct optionJade Lovelace1-2/+4
2024-03-18Merge pull request #209964 from Majiir/fix-initrd-systemd-closureWill Fancher1-1/+8
nixos/systemd/initrd: follow init param symlinks
2024-03-18Merge pull request #296924 from flokli/document-servers-empty-fallbackFlorian Klink1-0/+3
nixos/timesyncd: further document services.timesyncd.servers
2024-03-18nixos/timesyncd: further document services.timesyncd.serversFlorian Klink1-0/+3
Running systemd-timesyncd with an empty list of timeservers to sync from does not work. In case an empty list is configured here, systemd will fall back to its compiled-in defaults, which NixOS sets to `{0..4}.nixos.pool.ntp.org`, as per https://github.com/systemd/systemd/blob/main/docs/DISTRO_PORTING.md#ntp-pool This has caused some confusion. Explicitly document this, and describe how to disable timesyncd.
2024-03-18nixos/initrd-ssh: Add authorizedKeyFiles optionJonas Heinrich1-4/+26
2024-03-18Merge pull request #282022 from ElvishJerricco/gpt-auto-rootnikstur2-5/+26
nixos: Support systemd-gpt-auto-root
2024-03-17Merge pull request #293710 from B4dM4n/networkd-policy-rule-port-rangeWill Fancher1-2/+2
nixos/networkd: allow RoutingPolicyRule port ranges
2024-03-15nixos: Support systemd-gpt-auto-rootWill Fancher2-5/+26
2024-03-12nixos/binfmt: fix race condition between systemd-tmpfiles and systemd-binfmtArian van Putten1-0/+1
We need to make sure systemd-tmpfiles-setup.service ran before we start systemd-binft.service. Otherwise it might fail to start due to non-existant files Fixes #295365
2024-03-11nixos/uki: add ".dtb" section if devicetree is usedJared Baur1-0/+2
This ensures a ".dtb" PE section makes it into the UKI so systemd-stub can install the correct devicetree for use by the Linux kernel. This is often needed on systems that boot with u-boot since the devicetree used by u-boot is often a paired down version of what the Linux kernel needs. On those kinds of boards, the lack of this PE section means that u-boot will end up installing its internal devicetree into the UEFI configuration table, which is what the Linux kernel ends up using.
2024-03-09Merge pull request #293720 from vkleen/fix/systemd-boot-random-seedWill Fancher1-1/+1
nixos/systemd: Only include systemd-boot-random-seed if the unit exists
2024-03-08nixos/networkd: add missing UseGateway key in the DHCPv4 sectionr-vdp1-0/+2
2024-03-08nixos/systemd: Only include systemd-boot-random-seed if the unit existsViktor Kleen1-1/+1
The unit file is only present if systemd was built with bootloader support.
2024-03-06nixos/networkd: allow RoutingPolicyRule port rangesFabian Möller1-2/+2
Linux and Systemd allow port ranges to be used in routing policy rules. https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#SourcePort=
2024-03-02systemd-boot: introduce options to set a sort-key for systemd-boot entriesr-vdp2-12/+72
Without sort-keys specified on entries, the entries are sorted only by file name (in decreasing order, so starting at the end of the alphabet!), without taking any other fields into account (see [the boot loader specification reference][1]). Moreover, entries without a sort-key are always ordered after all entries with a sort-key, so by not adding a sort-key to the NixOS ones, we cannot add a sort-key to any other entry while keeping it below the NixOS entries. So currently we have options to set the file names for additional entries like memtest and netbootxyz. However, as mentioned above, the sorting by file name is not very intuitive and actually sorts in the opposite order of what is currently mentioned in the option descriptions. With this commit, we set a configurable sort-key on all NixOS entries, and add options for setting the sort-keys for the memtest and netbootxyz entries. The sorting by sort-key is more intuitive (it starts at the start of the alphabet) and also takes into account the machine-id and version for entries with identical sort-keys. We use a bootspec extension to store the sort keys, which allows us to redefine the sort key for individual specialisations without needing any special casing. [1]: https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting
2024-03-01Merge pull request #292061 from nikstur/systemd-random-seednikstur1-1/+1
nixos/systemd: include systemd-boot-random-seed.service
2024-02-29substitute: Deprecate `replacements`, introduce `replacementsList`Silvan Mosberger1-1/+1
Also: - Add tests - Treewide update - Improve docs
2024-02-28nixos/systemd: include systemd-boot-random-seed.servicenikstur1-0/+1
This is necessary to properly refresh the boot loader random seed. See https://www.freedesktop.org/software/systemd/man/latest/systemd-boot-random-seed.service.html#
2024-02-28nixos/systemd: remove a superfluous overridenikstur1-1/+0
This is already the upstream default.
2024-02-27Merge pull request #291825 from WilliButz/repart/max-label-lengthWill Fancher1-1/+15
nixos/systemd-repart: add assertion for partition label length