Removing the 9pfs nix store.
The experiment was good for mounting directories with various overlay patterns from the host to the guest, but using it specifically for /nix/store was a bad idea. It would be better to just serve the host nix store with nix-serve -p 8080 and add that as a substituter during install.
This commit is contained in:
parent
e65504b5f3
commit
5b7cae49c3
@ -9,7 +9,6 @@
|
||||
{
|
||||
imports = [
|
||||
./roles/2ship2harkinian
|
||||
./roles/9pfs_nix_store
|
||||
./roles/alacritty
|
||||
./roles/ansible
|
||||
./roles/ares
|
||||
|
@ -126,7 +126,6 @@
|
||||
isoImage.makeUsbBootable = true;
|
||||
me.buildingIso = true;
|
||||
me.optimizations.enable = nixpkgs.lib.mkDefault false;
|
||||
me._9pfs_nix_store.is_iso = true;
|
||||
}
|
||||
{
|
||||
# These are big space hogs. The chance that I need them on an ISO is slim.
|
||||
@ -141,9 +140,6 @@
|
||||
networking.useDHCP = true;
|
||||
me.optimizations.enable = nixpkgs.lib.mkDefault false;
|
||||
}
|
||||
{
|
||||
# me._9pfs_nix_store.enable = true;
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
|
@ -1,77 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
_9pfs_nix_store.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to mount /nix/store over 9pfs (useful in virtual machines to share a directory from the host as a persistent nix store.";
|
||||
};
|
||||
|
||||
_9pfs_nix_store.is_iso = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether this build is for an ISO. It changes how we mount the nix store.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me._9pfs_nix_store.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me._9pfs_nix_store.is_iso {
|
||||
# fileSystems = {
|
||||
# "/nix/store" = lib.mkForce {
|
||||
# fsType = "overlay";
|
||||
# device = "overlay";
|
||||
# options = [
|
||||
# "lowerdir=/nix/.ro-store"
|
||||
# "upperdir=/store"
|
||||
# "workdir=/work"
|
||||
# ];
|
||||
# depends = [
|
||||
# "/nix/.ro-store"
|
||||
# "/store"
|
||||
# "/work"
|
||||
# ];
|
||||
# };
|
||||
|
||||
# "/store" = lib.mkForce {
|
||||
# fsType = "9p";
|
||||
# device = "nixstore";
|
||||
# options = [
|
||||
# "trans=virtio"
|
||||
# "version=9p2000.L"
|
||||
# "x-systemd.requires=modprobe@9pnet_virtio.service"
|
||||
# "msize=16384" # Maximum packet size. Increasing this should improve performance at the cost of increased memory usage.
|
||||
# "cache=loose"
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
})
|
||||
(lib.mkIf (!config.me._9pfs_nix_store.is_iso) {
|
||||
fileSystems = {
|
||||
"/nix/store" = lib.mkForce {
|
||||
fsType = "9p";
|
||||
device = "nixstore";
|
||||
neededForBoot = true;
|
||||
options = [
|
||||
"trans=virtio"
|
||||
"version=9p2000.L"
|
||||
"x-systemd.requires=modprobe@9pnet_virtio.service"
|
||||
"msize=16384" # Maximum packet size. Increasing this should improve performance at the cost of increased memory usage.
|
||||
"cache=loose"
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user