Samba: Difference between revisions

imported>Lukeadams
add time machine / sambaMaster info
imported>Makefu
move Apple time machine to subsection
Line 29: Line 29:
</syntaxhighlight>
</syntaxhighlight>


== Apple Time Machine ==
nixpkgs includes Samba4.8-git, which adds support for using shares for Time Machine backups on macOS 10.12+.
Example configuration:
<syntaxhighlight lang="nix">
services.samba = {
  package = pkgs.sambaMaster;
  shares = {
    tm_share = {
        path = "/mnt/Shares/tm_share";
        "valid users" = "username";
        public = "no";
        writeable = "yes";
        "force user" = "username";
        "fruit:aapl" = "yes";
        "fruit:time machine" = "yes";
        "vfs objects" = "catia fruit streams_xattr";
      };
}
</syntaxhighlight>
== excerpt of /etc/nixos/configuration.nix ==
== excerpt of /etc/nixos/configuration.nix ==


Line 109: Line 90:
# systemctl restart samba
# systemctl restart samba
</syntaxhighlight>
</syntaxhighlight>
== Use Cases ==
=== Apple Time Machine ===
nixpkgs includes Samba4.8-git, which adds support for using shares for Time Machine backups on macOS 10.12+.
Example configuration:
<syntaxhighlight lang="nix">
services.samba = {
  package = pkgs.sambaMaster;
  shares = {
    tm_share = {
        path = "/mnt/Shares/tm_share";
        "valid users" = "username";
        public = "no";
        writeable = "yes";
        "force user" = "username";
        "fruit:aapl" = "yes";
        "fruit:time machine" = "yes";
        "vfs objects" = "catia fruit streams_xattr";
    };
  };
}
</syntaxhighlight>


== links ==
== links ==