Archived
modularized raspi mount
This commit is contained in:
@@ -26,6 +26,7 @@ in
|
|||||||
# ../../modules/nix/tailscale-service.nix
|
# ../../modules/nix/tailscale-service.nix
|
||||||
../../modules/tailscale/enable-service.nix
|
../../modules/tailscale/enable-service.nix
|
||||||
../../modules/rotate-traefik-logs.nix
|
../../modules/rotate-traefik-logs.nix
|
||||||
|
../../modules/raspi/mount-data.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -40,54 +41,32 @@ boot.zfs.forceImportRoot = false;
|
|||||||
nfs-utils
|
nfs-utils
|
||||||
];
|
];
|
||||||
|
|
||||||
# services.logrotate = {
|
|
||||||
# enable = true;
|
|
||||||
|
|
||||||
# settings = {
|
|
||||||
# "/mnt/docker-volumes/traefik-data/logs/*.log" = {
|
|
||||||
# daily = true;
|
|
||||||
# size = "100M";
|
|
||||||
# rotate = 20;
|
|
||||||
# compress = true;
|
|
||||||
# missingok = true;
|
|
||||||
# notifempty = true;
|
|
||||||
# copytruncate = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "nfs" ];
|
boot.supportedFilesystems = [ "nfs" ];
|
||||||
services.rpcbind.enable = true;
|
services.rpcbind.enable = true;
|
||||||
|
|
||||||
# Mount docker persistent data
|
|
||||||
# fileSystems."/mnt/docker-persistent-data" = {
|
# fileSystems."/mnt/raspi" = {
|
||||||
# device = "/dev/disk/by-label/docker-data";
|
# device = "raspberrypi.tail13f623.ts.net:/home/raspi/raspi";
|
||||||
# fsType = "ext4";
|
# fsType = "nfs4";
|
||||||
# options = [ "defaults" "nofail" "noatime" ];
|
# options = [
|
||||||
|
# "nofail"
|
||||||
|
# "_netdev"
|
||||||
|
# "noatime"
|
||||||
|
|
||||||
|
# # Don't mount until first access
|
||||||
|
# "x-systemd.automount"
|
||||||
|
|
||||||
|
# # Unmount after 10 min idle
|
||||||
|
# "x-systemd.idle-timeout=600"
|
||||||
|
|
||||||
|
# # Give the Pi/Tailscale a little time to appear
|
||||||
|
# "x-systemd.device-timeout=10s"
|
||||||
|
|
||||||
|
# # Explicitly use NFSv4.2 if supported
|
||||||
|
# "nfsvers=4.2"
|
||||||
|
# ];
|
||||||
# };
|
# };
|
||||||
fileSystems."/mnt/raspi" = {
|
|
||||||
device = "raspberrypi.tail13f623.ts.net:/home/raspi/raspi";
|
|
||||||
fsType = "nfs4";
|
|
||||||
options = [
|
|
||||||
"nofail"
|
|
||||||
"_netdev"
|
|
||||||
"noatime"
|
|
||||||
|
|
||||||
# Don't mount until first access
|
|
||||||
"x-systemd.automount"
|
|
||||||
|
|
||||||
# Unmount after 10 min idle
|
|
||||||
"x-systemd.idle-timeout=600"
|
|
||||||
|
|
||||||
# Give the Pi/Tailscale a little time to appear
|
|
||||||
"x-systemd.device-timeout=10s"
|
|
||||||
|
|
||||||
# Explicitly use NFSv4.2 if supported
|
|
||||||
"nfsvers=4.2"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create nextcloud cron scheduled task
|
# Create nextcloud cron scheduled task
|
||||||
systemd.services.nextcloud = {
|
systemd.services.nextcloud = {
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
fileSystems."/mnt/raspi" = {
|
||||||
|
device = "raspberrypi.tail13f623.ts.net:/home/raspi/raspi";
|
||||||
|
fsType = "nfs4";
|
||||||
|
options = [
|
||||||
|
"nofail"
|
||||||
|
"_netdev"
|
||||||
|
"noatime"
|
||||||
|
|
||||||
|
# Don't mount until first access
|
||||||
|
"x-systemd.automount"
|
||||||
|
|
||||||
|
# Unmount after 10 min idle
|
||||||
|
"x-systemd.idle-timeout=600"
|
||||||
|
|
||||||
|
# Give the Pi/Tailscale a little time to appear
|
||||||
|
"x-systemd.device-timeout=10s"
|
||||||
|
|
||||||
|
# Explicitly use NFSv4.2 if supported
|
||||||
|
"nfsvers=4.2"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user