modules/cluster: prepare for leon
This commit is contained in:
parent
ecbb8818bb
commit
4b6fce111a
|
@ -49,6 +49,12 @@ in {
|
||||||
uid = 1001;
|
uid = 1001;
|
||||||
sshKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
sshKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||||
};
|
};
|
||||||
|
users.leon = {
|
||||||
|
uid = 1002;
|
||||||
|
sshKeys = with import ../../users.nix;
|
||||||
|
leon.sshKeys ++
|
||||||
|
astro.sshKeys;
|
||||||
|
};
|
||||||
deploy.customizationModule = ./deployment.nix;
|
deploy.customizationModule = ./deployment.nix;
|
||||||
|
|
||||||
storage.glusterfs = {
|
storage.glusterfs = {
|
||||||
|
|
|
@ -33,6 +33,8 @@ let
|
||||||
then s
|
then s
|
||||||
else withoutLeadingSlash s';
|
else withoutLeadingSlash s';
|
||||||
|
|
||||||
|
writableStoreOverlayImage = "/var/tmp/${user}-${repo}-${vmName}-overlay.img";
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
deployment.networks = nets;
|
deployment.networks = nets;
|
||||||
|
@ -42,6 +44,11 @@ in
|
||||||
vcpu = config.deployment.vcpu;
|
vcpu = config.deployment.vcpu;
|
||||||
mem = config.deployment.mem;
|
mem = config.deployment.mem;
|
||||||
|
|
||||||
|
preStart = ''
|
||||||
|
# Discard old writable store overlay
|
||||||
|
rm -f "${writableStoreOverlayImage}"
|
||||||
|
'';
|
||||||
|
|
||||||
shares = [ {
|
shares = [ {
|
||||||
proto = "virtiofs";
|
proto = "virtiofs";
|
||||||
tag = "ro-store";
|
tag = "ro-store";
|
||||||
|
@ -55,12 +62,12 @@ in
|
||||||
source = "/glusterfs/fast/microvms/${user}/${repo}/${vmName}/${withoutLeadingSlash mountPoint}";
|
source = "/glusterfs/fast/microvms/${user}/${repo}/${vmName}/${withoutLeadingSlash mountPoint}";
|
||||||
inherit mountPoint;
|
inherit mountPoint;
|
||||||
}) config.deployment.persistedShares;
|
}) config.deployment.persistedShares;
|
||||||
# volumes = [ {
|
volumes = [ {
|
||||||
# image = "/glusterfs/fast/microvms/${user}/${repo}/${vmName}/overlay.img";
|
image = writableStoreOverlayImage;
|
||||||
# mountPoint = "/";
|
mountPoint = config.microvm.writableStoreOverlay;
|
||||||
# size = 8 * 1024;
|
size = 8 * 1024;
|
||||||
# } ];
|
} ];
|
||||||
# writableStoreOverlay = "/nix/.rw-store";
|
writableStoreOverlay = "/nix/.rw-store";
|
||||||
|
|
||||||
interfaces = map (net: {
|
interfaces = map (net: {
|
||||||
type = "tap";
|
type = "tap";
|
||||||
|
|
Loading…
Reference in New Issue