Skip to content

Commit

Permalink
kata-image: allow remount service to manage /run
Browse files Browse the repository at this point in the history
We're configuring a tmpfs with 50% of the VMs memory capacity in
kata.nix, but this configuration is only applied by
systemd-remount-fs.service, which we thus need to enable. That service
tries to remount all filesystems, though, so we need to define them
correctly in the first place so that they can be remounted. In our case,
that meant defining the / mount as read-only.
  • Loading branch information
burgerdev committed Dec 10, 2024
1 parent 7386451 commit cf0f2f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/nixos/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"/" = {
device = "/dev/mapper/root";
fsType = "erofs";
options = [ "ro" ];
};
}
# Create tmpfs on directories that need to be writable for activation.
Expand All @@ -72,10 +73,6 @@
]
);

# We cant remount anything in the userspace, as we already
# have the rootfs mounted read-only from the initrd.
systemd.suppressedSystemUnits = [ "systemd-remount-fs.service" ];

networking.firewall.enable = false;

nixpkgs.hostPlatform.system = "x86_64-linux";
Expand Down

0 comments on commit cf0f2f7

Please sign in to comment.