added resilio sync
This commit is contained in:
parent
c3ff8f1e47
commit
9adb676f7c
@ -7,10 +7,12 @@
|
||||
networking.domain = "strangervm.ts.hillion.co.uk";
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common/default.nix
|
||||
../../modules/secrets/tailscale/vm.strangervm.ts.hillion.co.uk.nix
|
||||
../../modules/resilio/default.nix
|
||||
../../modules/reverse-proxy/global.nix
|
||||
../../modules/secrets/resilio/encrypted.nix
|
||||
../../modules/secrets/tailscale/vm.strangervm.ts.hillion.co.uk.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
@ -23,5 +25,10 @@
|
||||
prefixLength = 24;
|
||||
}];
|
||||
networking.defaultGateway = "10.72.164.1";
|
||||
|
||||
## Resilio Sync (Encrypted)
|
||||
services.resilio.enable = true;
|
||||
services.resilio.deviceName = "vm.strangervm";
|
||||
services.resilio.directoryRoot = "/data/sync";
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,11 @@
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/data" =
|
||||
{ device = "/dev/disk/by-uuid/01a351b8-cf66-4a31-9804-0b4145e69153";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
@ -26,7 +31,7 @@
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
options = "--delete-older-than 90d";
|
||||
};
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
time.timeZone = "Europe/London";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
23
modules/resilio/default.nix
Normal file
23
modules/resilio/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
options.resilioFolders = lib.mkOption {
|
||||
type = with lib.types; uniq (listOf attrs);
|
||||
default = [];
|
||||
};
|
||||
|
||||
config.services.resilio.sharedFolders =
|
||||
let
|
||||
mkFolder = name: secret: {
|
||||
directory = "${config.services.resilio.directoryRoot}/${name}";
|
||||
secret = "${secret}";
|
||||
knownHosts = [];
|
||||
searchLAN = true;
|
||||
useDHT = true;
|
||||
useRelayServer = true;
|
||||
useSyncTrash = false;
|
||||
useTracker = true;
|
||||
};
|
||||
in builtins.map (folder: mkFolder folder.name folder.secret) config.resilioFolders;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f79ce8b5b5eb6e558363ba63f5f31cf7cf023cf1
|
||||
Subproject commit 5e88b57ee4dbf292b74a52351dd87cddc12a2356
|
Loading…
Reference in New Issue
Block a user