!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1167 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org188 Servers

Load older messages


SenderMessageTime
1 Dec 2025
@samasaur:matrix.orgsamasaurexactly yeah23:23:23
@xoredg:matrix.orgxoredso is something I messed up, what else is new23:23:25
@samasaur:matrix.orgsamasaur mine doesn't show with the Time Machine disk icon, though... :(
i guess "functional" is more important but still
23:23:45
@samasaur:matrix.orgsamasauri did get it to show up as an Xserve when you connect via finder23:24:04
@xoredg:matrix.orgxoreddo you see anything on my config you don't have23:24:19
@xoredg:matrix.orgxoredI think the "hardening" they did in 4.20 is what breaks it23:24:47
@xoredg:matrix.orgxored* I think the "hardening" they did in 4.21 is what breaks it23:25:03
@samasaur:matrix.orgsamasaurwhen was they23:25:19
@samasaur:matrix.orgsamasaur* when was that23:25:23
@xoredg:matrix.orgxoredI have no idea, just looking at the samba releases since 25.0523:25:39
@xoredg:matrix.orgxoredthere are Mac bug fixes across renaming that could affect this too (the sparse bundle stuff timemachine does) but I reckon if its working for ppl is my valid users or force users or something similar23:26:19
@samasaur:matrix.orgsamasaur
  fileSystems."/timemachine" = {
    device = "data/timemachine";
    fsType = "zfs";
  };

  users.groups.timemachine.members = [ "sam" ];
  
  services.samba = {
    enable = true;
    smbd.enable = true;
    nmbd.enable = false;
    winbindd.enable = false;
    usershares.enable = false;
    nsswins = false;

    settings = {
      global = {
        "vfs objects" = "catia fruit streams_xattr";

        # time machine/apple compatibility options
        "fruit:aapl" = true;
        "fruit:nfs_aces" = false;
        "fruit:copyfile" = false;
        # Run `plutil -p /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist` and grep for RackMac3,1
        # Any model like that seems to be valid?
        # Icons in `/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/`
        "fruit:model" = "RackMac3,1";

        # assorted other samba options
        "panic action" = '' ${lib.getExe pkgs.curl} cliff/send -d \"title=Samba crashed\" '';
      };
      timemachine = {
        # time machine/apple compat
        "fruit:resource" = "xattr";
        "fruit:time machine" = true;
        # "fruit:time machine max size" = "10T"; # impacts how many backups are kept (logic on time machine side)
        "fruit:metadata" = "netatalk";
        "fruit:encoding" = "native";

        # samba options
        path = "/timemachine";
        preexec = '' ${lib.getExe pkgs.curl} cliff/send -d \"title=Samba connection initiated\" -d \"body=%u connected to %S from %m (%I)\" '';
        writeable = true;
        "valid users" = "sam";
      };
    };
  };

  services.avahi = {
    enable = true;
    extraServiceFiles.samba = ''
      <?xml version="1.0" standalone='no'?>
      <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
      <service-group>
        <name replace-wildcards="yes">%h</name>
        <service>
          <type>_smb._tcp</type>
          <port>445</port>
        </service>
        <service>
          <type>_device-info._tcp</type>
          <port>0</port>
          <txt-record>model=RackMac3,1</txt-record>
        </service>
        <service>
          <type>_adisk._tcp</type>
          <txt-record>dk0=adVN=timemachine,adVF=0x82</txt-record>
          <txt-record>sys=waMa=0,adVF=0x100</txt-record>
        </service>
      </service-group>
    '';
  };
23:26:55
@samasaur:matrix.orgsamasaurthis is what i have23:27:11
@xoredg:matrix.orgxoredoh boy you have all those fruit options I tried so many times in different combinations lmao23:27:47
@xoredg:matrix.orgxoredyou do have valid users23:28:51
@xoredg:matrix.orgxoredbut no force user23:28:55
@samasaur:matrix.orgsamasaurand my nixpkgs rev was originally from October 22. I've updated more recently than that but im only like 99% sure it's still working23:29:14
@samasaur:matrix.orgsamasauri know for a fact it was in October23:29:24
@samasaur:matrix.orgsamasaurand im still on macOS 15 fwiw23:29:33
@xoredg:matrix.orgxoredI've been resetting my Time Machine locations between tries, so its possible that if you had an initial backup it would continue working23:30:02
@samasaur:matrix.orgsamasaur
In reply to @xoredg:matrix.org
oh boy you have all those fruit options I tried so many times in different combinations lmao
i read the whole manual lol
23:30:28
@xoredg:matrix.orgxoredhmm it's definitely something user related 23:33:23
@reckenrode:matrix.orgRandy Eckenrode

I create users for everything. My setup is still 25.05 though.

https://github.com/reckenrode/nixos-configs/blob/85d19ca2e51254f36f04bfdf8f932c596d18f7c4/modules/by-name/sa/samba/nixos-module.nix

https://github.com/reckenrode/nixos-configs/blob/85d19ca2e51254f36f04bfdf8f932c596d18f7c4/modules/by-name/ti/time-machine/nixos-module.nix

https://github.com/reckenrode/nixos-configs/blob/85d19ca2e51254f36f04bfdf8f932c596d18f7c4/hosts/meteion/samba.nix

23:35:26
@reckenrode:matrix.orgRandy EckenrodeI also set up Time Machine via the CLI to use a FQDN, which was hard to do with encryption because it’s pretty much undocumented.23:37:46
@reckenrode:matrix.orgRandy Eckenrode

Avahi config, but it’s just firewall rules.

https://github.com/reckenrode/nixos-configs/blob/85d19ca2e51254f36f04bfdf8f932c596d18f7c4/modules/by-name/av/avahi/nixos-module.nix

23:40:57
@xoredg:matrix.orgxoreddid you do anything to your dataset, I had only do acltype=posix and xattr=sa23:42:27
@xoredg:matrix.orgxoredwhich again works on 25.0523:42:35
@reckenrode:matrix.orgRandy EckenrodeI have acltype=posix and xattr=on.23:44:39
@xoredg:matrix.orgxoredsame23:44:53
@xoredg:matrix.orgxoredhmmm23:44:56

Show newer messages


Back to Room ListRoom Version: 6