From a3bb5fe3deb3526e03f0278a411da125e15425db Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Wed, 21 Feb 2024 15:45:12 -0600 Subject: [PATCH] user changes and more time machine config --- configuration-nas.nix | 6 +++--- nas-samba/samba.nix | 33 ++++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/configuration-nas.nix b/configuration-nas.nix index 7a95fb6..db6ed32 100644 --- a/configuration-nas.nix +++ b/configuration-nas.nix @@ -5,7 +5,7 @@ { config, lib, pkgs, ... }: let user = "admin"; - password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"; + password = "\$y\$j9T\$EkPXmsmIMFFZ\.WRrBYCxS1\$P0kwo6e4\.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"; hostname = "jallen-nas"; timezone = "America/Chicago"; in @@ -263,7 +263,7 @@ in # Admin account users."${user}" = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "docker" "podman" "libvirtd" ]; # Enable ‘sudo’ for the user. + extraGroups = [ "wheel" "networkmanager" "docker" "podman" "libvirtd" "nas-apps" "jallen-nas" ]; # Enable ‘sudo’ for the user. initialHashedPassword = password; shell = pkgs.fish; packages = with pkgs; [ @@ -285,7 +285,7 @@ in isSystemUser = true; uid = 911; group = "jallen-nas"; - extraGroups = [ "wheel" "docker" "podman" "libvirt" ]; # Enable ‘sudo’ for the user. + extraGroups = [ "jallen-nas" ]; # Enable ‘sudo’ for the user. initialHashedPassword = password; }; }; diff --git a/nas-samba/samba.nix b/nas-samba/samba.nix index 1cd26b0..6d05b1e 100644 --- a/nas-samba/samba.nix +++ b/nas-samba/samba.nix @@ -25,7 +25,7 @@ ''; shares = { "3d_printer" = { - path = "/mnt/Main\ Pool/3d_printer"; + path = "/mnt/mainpool/3d_printer"; browseable = "yes"; "read only" = "no"; "guest ok" = "yes"; @@ -33,7 +33,7 @@ "directory mask" = "0755"; }; Backup = { - path = "/mnt/Main\ Pool/Backup"; + path = "/mnt/mainpool/Backup"; browseable = "yes"; "read only" = "no"; "guest ok" = "yes"; @@ -41,7 +41,7 @@ "directory mask" = "0755"; }; Documents = { - path = "/mnt/Main\ Pool/Documents"; + path = "/mnt/mainpool/Documents"; browseable = "yes"; "read only" = "no"; "guest ok" = "yes"; @@ -49,7 +49,7 @@ "directory mask" = "0755"; }; isos = { - path = "/mnt/Main\ Pool/isos"; + path = "/mnt/mainpool/isos"; browseable = "yes"; "read only" = "no"; "guest ok" = "yes"; @@ -57,14 +57,33 @@ "directory mask" = "0755"; }; TimeMachine = { - path = "/mnt/Main\ Pool/TimeMachine"; - "valid users" = "mattjallen"; + path = "/mnt/mainpool/TimeMachine"; public = "no"; + "force user" = "admin"; writable = "yes"; - "force user" = "mattjallen"; + "valid users" = "admin"; "fruit:aapl" = "yes"; "fruit:time machine" = "yes"; "vfs objects" = "catia fruit streams_xattr"; + "fruit:metadata" = "stream"; + "fruit:model" = "MacSamba"; + "fruit:posix_rename" = "yes"; + "fruit:veto_appledouble" = "no"; + "fruit:nfs_aces" = "no"; + "fruit:wipe_intentionally_left_blank_rfork" = "yes"; + "fruit:delete_empty_adfiles" = "yes"; + "fruit:time machine max size" = "1T"; + }; + }; + }; + + services.netatalk = { + enable = true; + settings = { + time-machine = { + path = "/mnt/mainpool/TimeMachine"; + "valid users" = "whoever"; + "time machine" = true; }; }; };