remove dead code
This commit is contained in:
parent
31225ff9cc
commit
6be5862f97
|
@ -1,7 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
loader.generic-extlinux-compatible.enable = true;
|
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"verbose" "shell_on_fail"
|
"verbose" "shell_on_fail"
|
||||||
"elevator=deadline"
|
"elevator=deadline"
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
let
|
let
|
||||||
inherit (config.c3d2.deployment) server;
|
inherit (config.c3d2.deployment) server;
|
||||||
serverFQDN = "${server}.cluster.zentralwerk.org";
|
serverFQDN = "${server}.cluster.zentralwerk.org";
|
||||||
serverConfig = zentralwerk.lib.config.site.hosts.${config.c3d2.deployment.server};
|
|
||||||
serverBridges = builtins.attrNames (
|
|
||||||
lib.filterAttrs (_: { type, ... }: type == "bridge")
|
|
||||||
serverConfig.interfaces
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.c3d2.deployment = with lib; {
|
options.c3d2.deployment = with lib; {
|
||||||
|
@ -83,36 +78,5 @@ in
|
||||||
socket = "${tag}.socket";
|
socket = "${tag}.socket";
|
||||||
}) config.c3d2.deployment.mounts;
|
}) config.c3d2.deployment.mounts;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."microvm-zfs-datasets@" = {
|
|
||||||
description = "Create ZFS datasets for MicroVM '%i'";
|
|
||||||
before = [ "microvm-virtiofsd@%i.service" ];
|
|
||||||
after = [ "local-fs.target" ];
|
|
||||||
partOf = [ "microvm@%i.service" ];
|
|
||||||
unitConfig.ConditionPathExists = "/var/lib/microvms/%i/current/share/microvm/virtiofs";
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
|
||||||
WorkingDirectory = "/var/lib/microvms/%i";
|
|
||||||
SyslogIdentifier = "microvm-zfs-datasets@%i";
|
|
||||||
};
|
|
||||||
scriptArgs = "%i";
|
|
||||||
script = ''
|
|
||||||
zfsExists() {
|
|
||||||
zfs list $1 >/dev/null 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
NAME="$1"
|
|
||||||
BASE=$(hostname)/vm/$NAME
|
|
||||||
zfsExists $BASE || \
|
|
||||||
zfs create $BASE
|
|
||||||
for d in current/share/microvm/virtiofs/*; do
|
|
||||||
SOURCE=$(cat $d/source)
|
|
||||||
MNT=$(pwd)/$SOURCE
|
|
||||||
zfsExists $BASE/$d || \
|
|
||||||
zfs create -o mountpoint=$MNT $BASE/$d
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue