fixed nfs
This commit is contained in:
parent
9bfddf14ce
commit
4a57978f45
6 changed files with 21 additions and 20 deletions
|
@ -39,7 +39,7 @@
|
|||
|
||||
# Mount remote filesystem
|
||||
fileSystems."/mnt/remote/media" = {
|
||||
device = "sleeper-service:/mnt/storage";
|
||||
device = "sleeper-service:/mnt/storage/media";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
|
@ -94,7 +94,7 @@
|
|||
|
||||
# Firewall
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 22 23231];
|
||||
networking.firewall.allowedTCPPorts = [ 22 3000 23231];
|
||||
networking.firewall.allowedUDPPorts = [ 22 23231 ];
|
||||
networking.nftables.enable = true;
|
||||
system.stateVersion = "23.05"; # Do not change this, it maintains data compatibility.
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
{ device = "/dev/disk/by-uuid/E251-F60A";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/mnt/remote/media" =
|
||||
{ device = "sleeper-service:/mnt/storage";
|
||||
fsType = "nfs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
"git.geokkjer.eu" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".proxyPass = "http://apps:3000";
|
||||
locations."/".proxyPass = "http://grey-area:3000";
|
||||
};
|
||||
#"geokkjer.eu" = {
|
||||
# default = true;
|
||||
|
@ -85,7 +85,7 @@
|
|||
# Stream configuration for SSH forwarding to Git server
|
||||
streamConfig = ''
|
||||
upstream git_ssh_backend {
|
||||
server apps:22;
|
||||
server grey-area:22;
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
|
@ -58,10 +58,10 @@
|
|||
# ];
|
||||
|
||||
# Create mount directories early in boot process
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt/storage 0755 root root -"
|
||||
"d /mnt/storage/media 0755 root root -"
|
||||
];
|
||||
# systemd.tmpfiles.rules = [
|
||||
# "d /mnt/storage 0755 root root -"
|
||||
# "d /mnt/storage/media 0755 root root -"
|
||||
# ];
|
||||
|
||||
# Network configuration - using working setup from old config
|
||||
# networking.hostName = "sleeper-service";
|
||||
|
|
|
@ -10,18 +10,19 @@
|
|||
# Allow access from both local network and Tailscale network
|
||||
exports = ''
|
||||
/mnt/storage 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) 100.64.0.0/10(rw,sync,no_subtree_check,no_root_squash)
|
||||
/mnt/storage/media 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) 100.64.0.0/10(rw,sync,no_subtree_check,no_root_squash)
|
||||
'';
|
||||
# Create exports on startup
|
||||
createMountPoints = true;
|
||||
};
|
||||
|
||||
# Ensure the storage subdirectories exist (ZFS dataset is mounted at /mnt/storage)
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt/storage/media 0755 sma users -"
|
||||
"d /mnt/storage/downloads 0755 sma users -"
|
||||
"d /mnt/storage/backups 0755 sma users -"
|
||||
"d /mnt/storage/shares 0755 sma users -"
|
||||
];
|
||||
# systemd.tmpfiles.rules = [
|
||||
# "d /mnt/storage/media 0755 sma users -"
|
||||
# "d /mnt/storage/downloads 0755 sma users -"
|
||||
# "d /mnt/storage/backups 0755 sma users -"
|
||||
# "d /mnt/storage/shares 0755 sma users -"
|
||||
# ];
|
||||
|
||||
# Required packages for NFS
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
users.users.sma = {
|
||||
description = "Diziet Sma - System Administrator";
|
||||
isNormalUser = true;
|
||||
uid = 1001; # Fixed UID for consistency across machines
|
||||
group = "sma"; # Primary group
|
||||
|
||||
# Admin privileges
|
||||
|
@ -132,5 +133,7 @@
|
|||
];
|
||||
|
||||
# Create the sma group
|
||||
users.groups.sma = {};
|
||||
users.groups.sma = {
|
||||
gid = 992; # Fixed GID for consistency across machines
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue