@@ -17,15 +17,21 @@ lib.mkIf (cfg.guest.enable && cfg.optimize.enable) {
17
17
# The docs are pretty chonky
18
18
documentation . enable = lib . mkDefault false ;
19
19
20
- # Use systemd initrd for startup speed.
21
- # TODO: error mounting /nix/store on crosvm, kvmtool
22
- boot . initrd . systemd . enable = lib . mkDefault (
23
- builtins . elem cfg . hypervisor [
24
- "qemu"
25
- "cloud-hypervisor"
26
- "firecracker"
27
- "stratovirt"
28
- ] ) ;
20
+ boot = {
21
+ initrd . systemd = {
22
+ # Use systemd initrd for startup speed.
23
+ # TODO: error mounting /nix/store on crosvm, kvmtool
24
+ enable = lib . mkDefault (
25
+ builtins . elem cfg . hypervisor [
26
+ "qemu"
27
+ "cloud-hypervisor"
28
+ "firecracker"
29
+ "stratovirt"
30
+ ] ) ;
31
+ tpm2 . enable = lib . mkDefault false ;
32
+ } ;
33
+ swraid . enable = false ;
34
+ } ;
29
35
30
36
nixpkgs . overlays = [
31
37
( final : prev : {
@@ -36,9 +42,13 @@ lib.mkIf (cfg.guest.enable && cfg.optimize.enable) {
36
42
# networkd is used due to some strange startup time issues with nixos's
37
43
# homegrown dhcp implementation
38
44
networking . useNetworkd = lib . mkDefault true ;
39
- # Due to a bug in systemd-networkd: https://github.com/systemd/systemd/issues/29388
40
- # we cannot use systemd-networkd-wait-online.
41
- systemd . network . wait-online . enable = lib . mkDefault false ;
45
+
46
+ systemd = {
47
+ # Due to a bug in systemd-networkd: https://github.com/systemd/systemd/issues/29388
48
+ # we cannot use systemd-networkd-wait-online.
49
+ network . wait-online . enable = lib . mkDefault false ;
50
+ tpm2 . enable = lib . mkDefault false ;
51
+ } ;
42
52
43
53
# Exclude switch-to-configuration.pl from toplevel.
44
54
system = lib . optionalAttrs ( options . system ? switch && ! canSwitchViaSsh ) {
0 commit comments