nixops-aws
nixops-aws copied to clipboard
Allow mounting /nix/store on separate ebs volume
Currently it seems not possible to mount /nix/store
to a separate ebs volume. I would expect that given the following configuration the store should be located on /dev/xvdj
. Instead it is mounted on the root device. So the store does get its own mount point but on the device of the root partition. Is this intentional? Is it possible to have the store on a separate volume at all?
let
region = "us-west-1";
zone = "us-west-1b";
in
{
resources.ec2KeyPairs.xxxxx = { inherit region; };
resources.ebsVolumes.nixStore = {
tags.Name = "nix-store";
inherit region zone;
size = 250;
volumeType = "gp2";
};
jenkinsMaster =
{ config, resources, ... }:
{
deployment.targetEnv = "ec2";
deployment.ec2.ebsInitialRootDiskSize = 250;
deployment.ec2.region = region;
deployment.ec2.instanceType = "c4.xlarge";
deployment.ec2.keyPair = resources.ec2KeyPairs.xxxx;
deployment.ec2.subnetId = "xxxx";
fileSystems."/nix/store" = {
autoFormat = true;
fsType = "ext4";
device = "/dev/xvdj";
ec2.disk = resources.ebsVolumes.nixStore;
};
};
}
16:26:09 ikwildrpepper | domenkozar: no, that's very hard to do
Is this a problem for having a separate /nix/store
partition in general? Are things any easier if it's the whole /nix
partition that is separate?
(Where can I learn about how /nix/store
is mounted?)