Commit Graph

3278 Commits

Author SHA1 Message Date
K900
fb73ccd10d Merge remote-tracking branch 'origin/staging-next' into staging 2025-10-07 08:19:36 +03:00
Sizhe Zhao
3fbc40c0ac nixos/limine: forceMbr -> force 2025-10-06 21:48:31 +08:00
Wolfgang Walther
5e1f5b623b Merge branch 'staging-next' into staging 2025-10-05 11:40:56 +02:00
K900
e93c560b79 Merge remote-tracking branch 'origin/master' into staging-next 2025-10-05 12:17:08 +03:00
Wolfgang Walther
91a8fee3aa treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.
2025-10-05 10:52:03 +02:00
Wolfgang Walther
c283f32d29 treewide: remove unused with
Auto-fixed by nixf-diagnose.
2025-10-05 10:50:41 +02:00
Will Fancher
6160af2a36 nixos/systemd-oomd: Drop swap ordering
This ordering is present in the upstream unit in 258
2025-10-03 01:35:52 -04:00
Ali Rizvi
107893c8f3 nixos/systemd-oomd: drop old After= dependency 2025-10-03 01:35:22 -04:00
Will Fancher
5da25f9301 systemd: Patch journald's Audit setting
https://github.com/systemd/systemd/pull/39069
2025-10-02 19:53:08 -04:00
nixpkgs-ci[bot]
02bde57e9a Merge master into staging-next 2025-09-24 18:05:53 +00:00
Luj
85f5bb8e46 nixos/systemd-boot: atomically update copied destination files (#444960) 2025-09-24 16:12:02 +02:00
sternenseemann
85c7452e80 nixos/systemd-boot: fsync() copied files
Since mkstemp() gives us a file descriptor, we may as well call fsync().
2025-09-24 01:35:51 +02:00
sternenseemann
94c190a55c nixos/systemd-boot: atomically update copied destination files
We absolutely do not want to leave an incomplete file behind in /boot
since an incomplete initrd would render the machine unbootable. Errors
while writing are relatively common, mostly due to full /boot
partitions.

systemd-boot-builder does never attempt to re-write already existing
files which means that such situations are not fixable by re-running
nixos-rebuild etc. Instead the user needs to know about internals of the
systemd-boot and manually delete the correct file to recover from a
partially written kernel or (more commonly) initrd in /boot.

Note that this used to be a non issue since systemd-boot-builder used to
always delete all kernels and initrds before copying kernels and
initrds, so dest.exist() would always return False. This was fixed in
f2ca990558, revealing the underlying bad
assumption (that copyfile() always succeeds or fails without writing
anything).

The solution is to write to a temporary file first and move it to the
destination path only after this has succeeded. This way, if an error
occurs during copying, only a file distinct from dest is left behind
which would be cleaned up by subsequent runs of remove_old_entries().

Resolves #444066.
2025-09-24 01:00:44 +02:00
K900
83dfcbb306 Merge remote-tracking branch 'origin/master' into staging-next 2025-09-23 21:15:13 +03:00
misuzu
e7fa9ff16c nixos-init: init at 0.1.0 (#433154) 2025-09-23 12:48:56 +00:00
nikstur
3c24952c6d chroot-realpath: drop in favour of nixos-init 2025-09-23 00:21:34 +02:00
nikstur
d9e6299acc nixos/etc: use nixos-init to find etc 2025-09-23 00:21:33 +02:00
nikstur
d0c03e4c5a nixos-init: init at 0.1.0 2025-09-23 00:21:33 +02:00
nixpkgs-ci[bot]
f08a85f704 Merge master into staging-next 2025-09-22 12:07:05 +00:00
h7x4
4ba3f60b8a various: use mkPackageOption 2025-09-22 02:46:54 +02:00
K900
be0b9e1bff Merge remote-tracking branch 'origin/staging-next' into staging 2025-09-19 07:49:55 +03:00
Val Packett
313fa9dc99 nixos/top-level: fix cutoffPackages without initialRamdisk
In systems without initrd (e.g. containers) that also use system.replaceDependencies, we'd get:

error: attribute 'initialRamdisk' missing
at /nix/store/8vfhnwmmzqqzy97q9c5m4bzyaqqf63zy-source/nixos/modules/system/activation/top-level.nix:286:21:
   285|       cutoffPackages = mkOption {
   286|         default = [ config.system.build.initialRamdisk ];
      |                     ^

Make that initialRamdisk reference conditional on the initrd being enabled.
2025-09-18 18:59:45 -03:00
Franz Pletz
6e3bccdd2d nixos/systemd: add units for capsule support 2025-09-17 21:41:43 +02:00
nixpkgs-ci[bot]
94ce9acecb Merge staging-next into staging 2025-09-15 18:06:28 +00:00
misuzu
72f6935afb nixos/plymouth-tpm2-totp: init (#424861) 2025-09-15 16:27:55 +00:00
Majiir Paktu
b5bbf6f901 nixos/plymouth-tpm2-totp: init 2025-09-15 12:22:54 -04:00
nixpkgs-ci[bot]
85b587287b Merge staging-next into staging 2025-09-15 12:07:44 +00:00
r-vdp
c4753ff331 nixos/systemd-boot-builder: make sure to print informational messages to stderr
Otherwise this gets printed to stdout when running things like
nixos-rebuild, while people rely on the toplevel store path being the only
output of such commands.
2025-09-15 10:19:15 +02:00
Will Fancher
f1f9ee2028 nixos/systemd: introduce settingsToSections util, migrate existing rfc42 options to use settingsToSections, migrate oomd to rfc42 (#437477) 2025-09-12 03:41:59 +00:00
Will Fancher
af1b121a0d nixos/top-level: Install 'bootStage2' as 'init' in all non-initrd configs (#441777) 2025-09-10 14:39:32 +00:00
Will Fancher
6b5020dc9c nixos/top-level: Install 'bootStage2' as 'init' in all non-initrd configs
Eventually we'd like to change our posture on this, and somehow ensure
that 'init' is always our systemd binary, but for now containers
require us to do it this way.
2025-09-10 09:45:48 -04:00
Rane
77448445c1 nixos/limine: fix install script when using Xen with EFI (#441473) 2025-09-10 08:55:40 +10:00
John Titor
5d9e8f43d7 nixos/refind: allow use only on UEFI platforms 2025-09-06 12:29:15 +05:30
Tristan Ross
062b58f36f nixos/refind: init 2025-09-06 12:29:15 +05:30
Jared Baur
231bf43f72 nixos/systemd-boot-builder: remove old devicetree files (#439585) 2025-09-03 15:33:13 +01:00
Jeremy Fleischman
683d9e3b54 nixos/systemd-boot-builder: remove old devicetree files
I just stumbled across this during code inspection. I haven't tested
this at all.
2025-09-03 13:35:57 +01:00
Acid Bong
68dacf00f4 nixos/limine: use SBctl from the option 2025-09-03 01:12:09 +05:30
Paul Haerle
160448060e Add Xen multiboot kernel to bootspec and package, refactor boot options, add xen bootspec support to Limine (#393287) 2025-09-02 13:07:11 +02:00
Will Fancher
1782471af1 nixos/plymouth: Fix emergency / rescue mode. (#439447) 2025-09-02 07:57:39 +00:00
Will Fancher
73c52fbf7b nixos/plymouth: Pull ask-password in sysinit
This mirrors 'systemd-ask-password-console.path'
2025-09-02 03:40:03 -04:00
Will Fancher
825442f5cd nixos/plymouth: Fix rescue / emergency mode not quitting plymouth 2025-09-02 02:50:43 -04:00
Ali Rizvi
c372a3fbe9 nixos/systemd-oomd: add After=swap.target to fix swap detection issues
This should be removed after systemd 258 releases, as it is a temporary drop-in fix to circumvent the issue of systemd-oomd failing to detect a valid swap (noticeable in cases of users using `zram` as swap).

I've taken the liberty to clarify which `After=` override should be dropped when, based on the systemd version on Nixpkgs.
2025-08-31 16:19:35 -04:00
yunfachi
ae0f69acb9 nixos/plymouth: use system.nixos.distroName in nixosBreezePlymouth 2025-08-30 14:33:56 +03:00
Rane
647c04f2e9 nixos/limine: Add support for booting Xen 2025-08-30 14:43:43 +10:00
Sandro Jäckel
e9e0a0984f nixos/plymouth: dedupe theme check 2025-08-30 02:01:35 +02:00
Sandro Jäckel
c7c502a5fc nixos/plymouth: list available themes if the current one does not exist 2025-08-30 00:25:41 +02:00
Sandro Jäckel
7dbd50832a nixos/plymouth: fix theme == "breeze" breakage after removing Plasma 5 2025-08-30 00:25:38 +02:00
Philip Taron
54a65ab16f nixos/systemd-initrd: silence various warnings (#432704) 2025-08-28 15:53:59 -07:00
Alyssa Ross
bcd38e11bf nixos/systemd: fix enabling non-existent service
This service doesn't exist when withBootLoader is false.

Fixes: 2c98ea1e33 ("nixos/systemd: add upstream units for boot counting")
2025-08-28 12:29:48 +02:00
Grimmauld
1dfd249772 nixos/systemd-oomd: align DefaultMemoryPressureDurationSec with upstream systemd 2025-08-27 12:55:53 +02:00