Set up NFS and tailscale on buck

This commit is contained in:
Jacob Hinkle 2023-11-20 11:45:56 -05:00
parent 3193cad85f
commit 4a0d01a460

View File

@ -165,12 +165,16 @@
enable = true; enable = true;
}; };
rpcbind.enable = true; # for NFS
syncthing = import ./syncthing.nix; syncthing = import ./syncthing.nix;
udev.extraRules = '' udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
''; '';
tailscale.enable = true;
# Enable the X11 windowing system. services.xserver.enable = true; # Enable the X11 windowing system. services.xserver.enable = true;
xserver = { xserver = {
enable = true; enable = true;
@ -209,6 +213,31 @@
services.thermald.enable = true; services.thermald.enable = true;
services.fwupd.enable = true; services.fwupd.enable = true;
systemd.mounts = let
nfsOpts = {
type = "nfs";
mountConfig = {
Options = "noatime";
};
};
nas = "100.64.0.5"; # synnas over tailscale
in [
(nfsOpts // {
what = "${nas}:/homes/jacob/Photos";
where = "/nas/photos";
})
];
systemd.automounts = let
autoMountOpts = {
wantedBy = [ "multi-user.target" ];
automountConfig = {
TimeoutIdleSec = "600";
};
};
in [
(autoMountOpts // { where = "/nas/photos"; })
];
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;