fix mounting
This commit is contained in:
parent
3b4f54984e
commit
acca9fbf50
1 changed files with 10 additions and 49 deletions
|
|
@ -138,34 +138,36 @@
|
||||||
|
|
||||||
# virtiofs mount points for caches (must match qvm virtiofsd mount tags)
|
# virtiofs mount points for caches (must match qvm virtiofsd mount tags)
|
||||||
# Using virtiofs instead of 9p for better performance and hot-mount support
|
# Using virtiofs instead of 9p for better performance and hot-mount support
|
||||||
|
# Note: We use fileSystems with x-systemd options for proper ordering
|
||||||
|
# The mount waits for multi-user.target to ensure virtio-fs devices are ready
|
||||||
fileSystems."/cache/cargo" = {
|
fileSystems."/cache/cargo" = {
|
||||||
device = "cargo_home";
|
device = "cargo_home";
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
options = [ "nofail" ];
|
options = [ "nofail" "x-systemd.automount" "x-systemd.idle-timeout=60" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/cache/target" = {
|
fileSystems."/cache/target" = {
|
||||||
device = "cargo_target";
|
device = "cargo_target";
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
options = [ "nofail" ];
|
options = [ "nofail" "x-systemd.automount" "x-systemd.idle-timeout=60" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/cache/pnpm" = {
|
fileSystems."/cache/pnpm" = {
|
||||||
device = "pnpm_store";
|
device = "pnpm_store";
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
options = [ "nofail" ];
|
options = [ "nofail" "x-systemd.automount" "x-systemd.idle-timeout=60" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/cache/sccache" = {
|
fileSystems."/cache/sccache" = {
|
||||||
device = "sccache";
|
device = "sccache";
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
options = [ "nofail" ];
|
options = [ "nofail" "x-systemd.automount" "x-systemd.idle-timeout=60" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/root/.config/opencode" = {
|
fileSystems."/root/.config/opencode" = {
|
||||||
device = "opencode_config";
|
device = "opencode_config";
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
options = [ "nofail" ];
|
options = [ "nofail" "x-systemd.automount" "x-systemd.idle-timeout=60" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Environment variables for cache directories
|
# Environment variables for cache directories
|
||||||
|
|
@ -186,50 +188,9 @@
|
||||||
"d /cache/sccache 0755 root root -"
|
"d /cache/sccache 0755 root root -"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Systemd mount units for cache directories using virtiofs
|
# NOTE: Mount configuration is handled via fileSystems above with x-systemd.automount
|
||||||
# virtiofs provides better performance than 9p and supports hot-mounting
|
# This provides on-demand mounting when the directory is first accessed,
|
||||||
systemd.mounts = [
|
# avoiding timing issues with virtiofs device availability at boot
|
||||||
{
|
|
||||||
what = "cargo_home";
|
|
||||||
where = "/cache/cargo";
|
|
||||||
type = "virtiofs";
|
|
||||||
options = "nofail";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "systemd-modules-load.service" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
what = "cargo_target";
|
|
||||||
where = "/cache/target";
|
|
||||||
type = "virtiofs";
|
|
||||||
options = "nofail";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "systemd-modules-load.service" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
what = "pnpm_store";
|
|
||||||
where = "/cache/pnpm";
|
|
||||||
type = "virtiofs";
|
|
||||||
options = "nofail";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "systemd-modules-load.service" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
what = "sccache";
|
|
||||||
where = "/cache/sccache";
|
|
||||||
type = "virtiofs";
|
|
||||||
options = "nofail";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "systemd-modules-load.service" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
what = "opencode_config";
|
|
||||||
where = "/root/.config/opencode";
|
|
||||||
type = "virtiofs";
|
|
||||||
options = "nofail";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "systemd-modules-load.service" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Essential packages for development
|
# Essential packages for development
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue