Bloc notes | Mémo resilio (btsync)


Posted on December 26, 2018 by Alex comments [resilio zfs nixos]

Single user

/etc/nixos/configuration.nix

Other

ZFS

setfacl

exemple container nixos

/etc/nixos/configuration.nix

/etc/nixos/containers/resilo.nix

{ pkgs, config, ... }:

with pkgs;

{
  containers.resilio = {

    autoStart = true;
    privateNetwork = true;
    hostAddress = "10.10.16.1";
    localAddress = "10.10.16.2";

    bindMounts."/resilio" = {
      hostPath = "/resilio/alex";
      isReadOnly = false;
    };

    bindMounts."/www" = {
      hostPath = "/zroot/www";
      isReadOnly = false;
    };

    config = { config, pkgs, ... }: {

      nixpkgs.config.allowUnfree = true;
      networking.hostName = "sync1";
      networking.firewall.allowedTCPPorts = [ 9000 ];

      services.resilio.enable = true;
      services.resilio.enableWebUI = true;
      services.resilio.storagePath = "/resilio";

    };
  };
}