2023-06-12 23:25:40 +02:00
|
|
|
{ pkgs, lib, secret, ... }:
|
|
|
|
let
|
|
|
|
inherit (lib)
|
2023-06-28 14:24:21 +02:00
|
|
|
singleton
|
|
|
|
concatStringsSep;
|
2023-06-12 23:25:40 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
sshfs
|
|
|
|
];
|
|
|
|
|
2024-01-22 00:43:34 +01:00
|
|
|
# services.hashicorp.vault-agent = {
|
|
|
|
# settings.template = singleton {
|
|
|
|
# source = pkgs.writeText "kodi-samba.cred.vtmpl"
|
|
|
|
# ''{{ with secret "kv/data/homelab-1/blowhole/kodi_samba.cred" }}{{ .Data.data.cred }}{{ end }}'';
|
|
|
|
# destination = "/run/secrets/kodi_samba.cred";
|
|
|
|
# };
|
|
|
|
# };
|
2023-06-28 14:24:21 +02:00
|
|
|
|
2023-06-12 23:25:40 +02:00
|
|
|
fileSystems =
|
|
|
|
{
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/738acc32-3e2e-4986-987c-40264153d5bf";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
"/" = {
|
|
|
|
device = "blowhole-zpool/local/root";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
"/nix" = {
|
|
|
|
device = "blowhole-zpool/local/nix";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/var/nfs" = {
|
|
|
|
device = "/dev/disk/by-uuid/e06f6d2c-e434-4eec-b00d-b13c1ecc96f0";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"subvol=/nfs"
|
|
|
|
"noatime"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/mnt/cctv" = {
|
|
|
|
device = "camera@${secret.network.ips.woodchip or ""}:/";
|
|
|
|
fsType = "fuse.sshfs";
|
|
|
|
noCheck = true;
|
|
|
|
options = [
|
|
|
|
"_netdev"
|
|
|
|
"noauto"
|
|
|
|
"x-systemd.automount"
|
|
|
|
"IdentityFile=/run/secrets/id_ed_camera"
|
|
|
|
"StrictHostKeyChecking=no"
|
|
|
|
"allow_other"
|
|
|
|
"reconnect"
|
|
|
|
"Port=2522"
|
2023-06-28 14:25:39 +02:00
|
|
|
"nofail"
|
2023-06-12 23:25:40 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/old-root" = {
|
|
|
|
device = "/dev/disk/by-uuid/e06f6d2c-e434-4eec-b00d-b13c1ecc96f0";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"subvol=/arch"
|
|
|
|
"noatime"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
"/var/lib/nomad" = {
|
|
|
|
device = "blowhole-zpool/persist/nomad";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
"/var/secrets" = {
|
|
|
|
device = "blowhole-zpool/persist/secrets";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
"/var/lib/consul" = {
|
2023-07-10 23:36:07 +02:00
|
|
|
device = "blowhole-zpool/persist/consul";
|
|
|
|
fsType = "zfs";
|
2023-06-12 23:25:40 +02:00
|
|
|
};
|
|
|
|
"/var/lib/vault" = {
|
2023-07-18 11:45:01 +02:00
|
|
|
device = "blowhole-zpool/persist/vault";
|
2023-07-10 23:36:07 +02:00
|
|
|
fsType = "zfs";
|
2023-06-12 23:25:40 +02:00
|
|
|
};
|
2023-12-03 20:00:10 +01:00
|
|
|
"/var/lib/matrix-commander" = {
|
|
|
|
device = "blowhole-zpool/persist/matrix-commander";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
"/var/lib/smartd" = {
|
|
|
|
device = "blowhole-zpool/persist/smartd";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
2023-06-12 23:25:40 +02:00
|
|
|
}
|
|
|
|
// secret.mounts.blowhole or {};
|
|
|
|
}
|