summary refs log tree commit diff
path: root/nixos/modules/system/boot
Commit message (Collapse)AuthorAge
* Add configurationLimit to systemd-boot to prevent running out of disk spaceDomen Kožar2019-06-22
| | | | Refs #23926
* Merge pull request #63090 from NixOS/nomodesetMatthew Bauer2019-06-20
|\ | | | | kernel.nix: boot.vesa implies nomodeset
| * kernel.nix: boot.vesa implies nomodesetWout Mertens2019-06-13
| | | | | | Without nomodeset the console is reset to 80x25 after Grub
* | treewide: remove unused variables (#63177)volth2019-06-16
| | | | | | | | | | | | * treewide: remove unused variables * making ofborg happy
* | Merge master into staging-nextFrederik Rietdijk2019-06-15
|\ \
| * \ nixos/systemd: enable systemd-tmpfiles-setup and -clean for user sessions ↵Florian Klink2019-06-14
| |\ \ | | |/ | |/| | | | | | | (#62813) nixos/systemd: enable systemd-tmpfiles-setup and -clean for user sessions
| | * nixos/systemd: enable systemd-tmpfiles-setup and -clean for user sessionsPeter Hoeg2019-06-07
| | |
* | | Merge master into staging-nextFrederik Rietdijk2019-06-12
|\| |
| * | Merge pull request #62838 from mayflower/fix/cryptsetup-kernel-cryptoFranz Pletz2019-06-12
| |\ \ | | | | | | | | cryptsetup: enable kernel crypto api support again
| | * | cryptsetup: enable kernel crypto api support againFranz Pletz2019-06-07
| | |/ | | | | | | | | | | | | | | | | | | | | | This is needed for tcrypt and the benchmark subcommand. If enabled, it is also used to unlock LUKS2 volumes and therefore the kernel modules providing this feature need to be available in our initrd. Fixes #42163. #54019.
* | | Merge master into staging-nextFrederik Rietdijk2019-06-10
|\| |
| * | systemd-networkd: Only generate [Match] if presentRoman Volosatovs2019-06-09
| |/
* | Merge master into staging-nextFrederik Rietdijk2019-06-09
|\|
| * Merge pull request #62333 from kampka/buildPackages-for-config-buildersMatthew Bauer2019-06-05
| |\ | | | | | | Build packages for config builders
| | * Revert "treewide: use buildPackages for config builders"Christian Kampka2019-05-31
| | | | | | | | | | | | This reverts commit 35af6e36057cafbb30df684326803e9e54bb377e.
| | * Revert "extlinux-conf: fix cross compilation"Christian Kampka2019-05-31
| | | | | | | | | | | | This reverts commit f17dd04f12a6eccdf613968efca38cfd0edfd2c0.
* | | Merge branch 'staging-next' into stagingVladimír Čunát2019-06-05
|\| |
| * | Merge pull request #62606 from Shados/fix-62602Matthew Bauer2019-06-04
| |\ \ | | | | | | | | nixos/grub: Add defaultText for font option
| | * | nixos/grub: Add defaultText for font optionAlexei Robyn2019-06-03
| | |/ | | | | | | | | | Fixes #62602.
| * / nixos/systemd-boot: don't remove directories from EFI dirNikolay Amiantov2019-06-03
| |/ | | | | | | This will only result in an error. These directories might be created by, for example, fwupdmgr.
* | nixos/systemd: migrate systemd-timesync state when requiredAndreas Rammhold2019-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somewhen between systemd v239 and v242 upstream decided to no longer run a few system services with `DyanmicUser=1` but failed to provide a migration path for all the state those services left behind. For the case of systemd-timesync the state has to be moved from /var/lib/private/systemd/timesync to /var/lib/systemd/timesync if /var/lib/systemd/timesync is currently a symlink. We only do this if the stateVersion is still below 19.09 to avoid starting to have an ever growing activation script for (then) ancient systemd migrations that are no longer required. See https://github.com/systemd/systemd/issues/12131 for details about the missing migration path and related discussion.
* | nixos/networkd: rename GatewayOnlink to GatewayOnLinkAndreas Rammhold2019-06-03
|/ | | | | | This follows upstreams renaming of the option [1]. [1] https://github.com/systemd/systemd/commit/9cb8c5593443d24c19e40bfd4fc06d672f8c554c
* Merge pull request #61036 from cdepillabout/nixos-memtest-loaderMatthew Bauer2019-05-20
|\ | | | | nixos/systemd-boot: add support for memtest86 EFI app
| * Change non-open-source to unfree in description.(cdep)illabout2019-05-21
| |
| * nixos/systemd-boot: add support for memtest86 EFI app(cdep)illabout2019-05-06
| | | | | | | | | | This commit adds support for installing the memtest86 EFI app and adding a boot entry for it with systemd-boot.
* | FIx some malformed XML in option descriptionsEelco Dolstra2019-05-13
| | | | | | | | | | E.g. these were using "<para>" at the *end* of a description. The real WTF is that this is possible at all...
* | Merge pull request #61257 from matthewbauer/add-binfmt-emulated-systemsJohn Ericson2019-05-12
|\ \ | | | | | | nixos/binfmt: handle emulatedSystems
| * | nixos/binfmt: fixupMatthew Bauer2019-05-10
| | |
| * | binfmt: add more magics and masksMatthew Bauer2019-05-10
| | | | | | | | | | | | | | | | | | New ones taken from this script: https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh
| * | nixos/binfmt: handle emulatedSystemsMatthew Bauer2019-05-10
| |/ | | | | | | Fixes #61248
* | nixos/luksroot: GPG Smartcard support for luks encrypted volumesMarkus Schmidl2019-05-12
| |
* | Merge pull request #60237 from mayflower/kexec-no-clobberLinus Heckemann2019-05-06
|\ \ | |/ |/| nixos/kexec: don't clobber existing kexec-loaded kernel
| * nixos/kexec: log what's happeningLinus Heckemann2019-04-29
| |
| * nixos/kexec: don't clobber existing kexec-loaded kernelLinus Heckemann2019-04-26
| |
* | nixos/luksroot: create /run/cryptsetup (#60235)Edmund Wu2019-04-28
|/ | | | Needed since 2.0.0 Changed to /run/cryptsetup from /run/lock/cryptsetup in 2.0.1
* Merge pull request #49537 from mayflower/stage1-symlink-fixLinus Heckemann2019-04-18
|\ | | | | nixos stage-1: fix init existence test
| * nixos stage-1: fix init existence testLinus Heckemann2018-10-31
| | | | | | | | | | | | | | | | | | | | | | The previous version contained a false positive case, where boot would continue when the stage 2 init did not exist at all, and a false negative case, where boot would stop if the stage 2 init was a symlink which cannot be resolved in the initramfs root. Fixes #49519. Thanks @michas2 for finding and reporting the issue!
* | nixos/stage-1: "find-libs" shell script is for the hostPierre Bourdon2019-04-18
| |
* | Merge pull request #53826 from delroth/randstruct-custom-seedJoachim F2019-04-16
|\ \ | | | | | | nixos: allow customizing the kernel RANDSTRUCT seed
| * | nixos kernel.nix: add an option to customize the kernel RANDSTRUCT seedPierre Bourdon2019-01-24
| | |
* | | stage-1: provide meaningful names to initrd and module treeLinus Heckemann2019-04-13
| | |
* | | Merge pull request #58027 from DanielFabian/gfxpayloadSamuel Dionne-Riel2019-04-08
|\ \ \ | | | | | | | | grub: Add gfxpayload
| * | | grub: Add support for gfxpayload in grub. Needed for NVIDIA drivers before ↵Daniel Fabian2019-04-08
| | | | | | | | | | | | | | | | KMS, afaik
* | | | Merge pull request #57519 (systemd-confinement)aszlig2019-03-29
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if you want to properly chroot a systemd service, you could do it using BindReadOnlyPaths=/nix/store or use a separate derivation which gathers the runtime closure of the service you want to chroot. The former is the easier method and there is also a method directly offered by systemd, called ProtectSystem, which still leaves the whole store accessible. The latter however is a bit more involved, because you need to bind-mount each store path of the runtime closure of the service you want to chroot. This can be achieved using pkgs.closureInfo and a small derivation that packs everything into a systemd unit, which later can be added to systemd.packages. However, this process is a bit tedious, so the changes here implement this in a more generic way. Now if you want to chroot a systemd service, all you need to do is: { systemd.services.myservice = { description = "My Shiny Service"; wantedBy = [ "multi-user.target" ]; confinement.enable = true; serviceConfig.ExecStart = "${pkgs.myservice}/bin/myservice"; }; } If more than the dependencies for the ExecStart* and ExecStop* (which btw. also includes script and {pre,post}Start) need to be in the chroot, it can be specified using the confinement.packages option. By default (which uses the full-apivfs confinement mode), a user namespace is set up as well and /proc, /sys and /dev are mounted appropriately. In addition - and by default - a /bin/sh executable is provided, which is useful for most programs that use the system() C library call to execute commands via shell. Unfortunately, there are a few limitations at the moment. The first being that DynamicUser doesn't work in conjunction with tmpfs, because systemd seems to ignore the TemporaryFileSystem option if DynamicUser is enabled. I started implementing a workaround to do this, but I decided to not include it as part of this pull request, because it needs a lot more testing to ensure it's consistent with the behaviour without DynamicUser. The second limitation/issue is that RootDirectoryStartOnly doesn't work right now, because it only affects the RootDirectory option and doesn't include/exclude the individual bind mounts or the tmpfs. A quirk we do have right now is that systemd tries to create a /usr directory within the chroot, which subsequently fails. Fortunately, this is just an ugly error and not a hard failure. The changes also come with a changelog entry for NixOS 19.03, which is why I asked for a vote of the NixOS 19.03 stable maintainers whether to include it (I admit it's a bit late a few days before official release, sorry for that): @samueldr: Via pull request comment[1]: +1 for backporting as this only enhances the feature set of nixos, and does not (at a glance) change existing behaviours. Via IRC: new feature: -1, tests +1, we're at zero, self-contained, with no global effects without actively using it, +1, I think it's good @lheckemann: Via pull request comment[2]: I'm neutral on backporting. On the one hand, as @samueldr says, this doesn't change any existing functionality. On the other hand, it's a new feature and we're well past the feature freeze, which AFAIU is intended so that new, potentially buggy features aren't introduced in the "stabilisation period". It is a cool feature though? :) A few other people on IRC didn't have opposition either against late inclusion into NixOS 19.03: @edolstra: "I'm not against it" @Infinisil: "+1 from me as well" @grahamc: "IMO its up to the RMs" So that makes +1 from @samueldr, 0 from @lheckemann, 0 from @edolstra and +1 from @Infinisil (even though he's not a release manager) and no opposition from anyone, which is the reason why I'm merging this right now. I also would like to thank @Infinisil, @edolstra and @danbst for their reviews. [1]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-477322127 [2]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-477548395
| * | | nixos: Add 'chroot' options to systemd.servicesaszlig2019-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if you want to properly chroot a systemd service, you could do it using BindReadOnlyPaths=/nix/store (which is not what I'd call "properly", because the whole store is still accessible) or use a separate derivation that gathers the runtime closure of the service you want to chroot. The former is the easier method and there is also a method directly offered by systemd, called ProtectSystem, which still leaves the whole store accessible. The latter however is a bit more involved, because you need to bind-mount each store path of the runtime closure of the service you want to chroot. This can be achieved using pkgs.closureInfo and a small derivation that packs everything into a systemd unit, which later can be added to systemd.packages. That's also what I did several times[1][2] in the past. However, this process got a bit tedious, so I decided that it would be generally useful for NixOS, so this very implementation was born. Now if you want to chroot a systemd service, all you need to do is: { systemd.services.yourservice = { description = "My Shiny Service"; wantedBy = [ "multi-user.target" ]; chroot.enable = true; serviceConfig.ExecStart = "${pkgs.myservice}/bin/myservice"; }; } If more than the dependencies for the ExecStart* and ExecStop* (which btw. also includes "script" and {pre,post}Start) need to be in the chroot, it can be specified using the chroot.packages option. By default (which uses the "full-apivfs"[3] confinement mode), a user namespace is set up as well and /proc, /sys and /dev are mounted appropriately. In addition - and by default - a /bin/sh executable is provided as well, which is useful for most programs that use the system() C library call to execute commands via shell. The shell providing /bin/sh is dash instead of the default in NixOS (which is bash), because it's way more lightweight and after all we're chrooting because we want to lower the attack surface and it should be only used for "/bin/sh -c something". Prior to submitting this here, I did a first implementation of this outside[4] of nixpkgs, which duplicated the "pathSafeName" functionality from systemd-lib.nix, just because it's only a single line. However, I decided to just re-use the one from systemd here and subsequently made it available when importing systemd-lib.nix, so that the systemd-chroot implementation also benefits from fixes to that functionality (which is now a proper function). Unfortunately, we do have a few limitations as well. The first being that DynamicUser doesn't work in conjunction with tmpfs, because it already sets up a tmpfs in a different path and simply ignores the one we define. We could probably solve this by detecting it and try to bind-mount our paths to that different path whenever DynamicUser is enabled. The second limitation/issue is that RootDirectoryStartOnly doesn't work right now, because it only affects the RootDirectory option and not the individual bind mounts or our tmpfs. It would be helpful if systemd would have a way to disable specific bind mounts as well or at least have some way to ignore failures for the bind mounts/tmpfs setup. Another quirk we do have right now is that systemd tries to create a /usr directory within the chroot, which subsequently fails. Fortunately, this is just an ugly error and not a hard failure. [1]: https://github.com/headcounter/shabitica/blob/3bb01728a0237ad5e7/default.nix#L43-L62 [2]: https://github.com/aszlig/avonc/blob/dedf29e092481a33dc/nextcloud.nix#L103-L124 [3]: The reason this is called "full-apivfs" instead of just "full" is to make room for a *real* "full" confinement mode, which is more restrictive even. [4]: https://github.com/aszlig/avonc/blob/92a20bece4df54625e/systemd-chroot.nix Signed-off-by: aszlig <aszlig@nix.build>
* | | | Merge pull request #54625 from FlorianFranzen/efi32Matthew Bauer2019-03-21
|\ \ \ \ | |/ / / |/| | | grub: Support 32bit EFI on 64bit platforms
| * | | grub: Support 32bit EFI on 64bit x86 platformsFlorian Franzen2019-03-18
| |/ /
* | | Merge pull request #56012 from matix2267/logind-lid-switch-external-powerSilvan Mosberger2019-02-22
|\ \ \ | | | | | | | | nixos/logind: Add defaultText to config option since it's not static value.
| * | | nixos/logind: Add defaultText to config option since it's not static value.Mateusz Gołębiewski2019-02-18
| | | |
* | | | nixos: add preferLocalBuild=true; on derivations for config filesSymphorien Gibol2019-02-22
|/ / /