1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat(samba): add bunker share for very important data

This commit is contained in:
oddlama 2024-01-14 14:53:05 +01:00
parent 412405be3d
commit 1165dc44aa
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 105 additions and 63 deletions

View file

@ -44,7 +44,11 @@
# services.telegraf.extraConfig.inputs.github = {};
guests = let
mkGuest = guestName: {enableStorageDataset ? false, ...}: {
mkGuest = guestName: {
enableStorageDataset ? false,
enableBunkerDataset ? false,
...
}: {
autostart = true;
zfs."/state" = {
# TODO make one option out of that? and split into two readonly options automatically?
@ -59,6 +63,10 @@
pool = "storage";
dataset = "safe/guests/${guestName}";
};
zfs."/bunker" = lib.mkIf enableBunkerDataset {
pool = "storage";
dataset = "bunker/guests/${guestName}";
};
modules = [
../../modules
./guests/common.nix
@ -105,7 +113,10 @@
in
lib.mkIf (!minimal) (
{}
// mkMicrovm "samba" {enableStorageDataset = true;}
// mkMicrovm "samba" {
enableStorageDataset = true;
enableBunkerDataset = true;
}
// mkMicrovm "grafana" {}
// mkMicrovm "influxdb" {}
// mkMicrovm "loki" {}