summaryrefslogtreecommitdiffstats
path: root/lass/2configs/blue-host.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
committermakefu <github@syntax-fehler.de>2020-10-23 21:02:02 +0200
commite8b6cc0587929a7ebd0d00f83d298640b20b055f (patch)
treee0f813b8264119a84d6b8c32fa68041c8541ab59 /lass/2configs/blue-host.nix
parentfd41a76d4cab2765f9ef95ce5322b7bffe52b8a7 (diff)
parent242530680d5dcb37a5a023d0b8f6155ab441cead (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/blue-host.nix')
-rw-r--r--lass/2configs/blue-host.nix90
1 files changed, 45 insertions, 45 deletions
diff --git a/lass/2configs/blue-host.nix b/lass/2configs/blue-host.nix
index 718a92e9..7aabf093 100644
--- a/lass/2configs/blue-host.nix
+++ b/lass/2configs/blue-host.nix
@@ -49,54 +49,54 @@ in {
};
- systemd.services = builtins.listToAttrs (map (host:
- let
- in nameValuePair "sync-blue-${host}" {
- bindsTo = [ "container@blue.service" ];
- wantedBy = [ "container@blue.service" ];
- # ssh needed for rsync
- path = [ pkgs.openssh ];
- serviceConfig = {
- Restart = "always";
- RestartSec = 10;
- ExecStart = pkgs.writeDash "sync-blue-${host}" ''
- set -efu
- #make sure blue is running
- /run/wrappers/bin/ping -c1 blue.r > /dev/null
+ #systemd.services = builtins.listToAttrs (map (host:
+ # let
+ # in nameValuePair "sync-blue-${host}" {
+ # bindsTo = [ "container@blue.service" ];
+ # wantedBy = [ "container@blue.service" ];
+ # # ssh needed for rsync
+ # path = [ pkgs.openssh ];
+ # serviceConfig = {
+ # Restart = "always";
+ # RestartSec = 10;
+ # ExecStart = pkgs.writeDash "sync-blue-${host}" ''
+ # set -efu
+ # #make sure blue is running
+ # /run/wrappers/bin/ping -c1 blue.r > /dev/null
- #make sure the container is unlocked
- ${pkgs.mount}/bin/mount | ${pkgs.gnugrep}/bin/grep -q '^encfs on /var/lib/containers/blue'
+ # #make sure the container is unlocked
+ # ${pkgs.mount}/bin/mount | ${pkgs.gnugrep}/bin/grep -q '^encfs on /var/lib/containers/blue'
- #make sure our target is reachable
- ${pkgs.untilport}/bin/untilport ${host}.r 22 2>/dev/null
+ # #make sure our target is reachable
+ # ${pkgs.untilport}/bin/untilport ${host}.r 22 2>/dev/null
- #start sync
- ${pkgs.lsyncd}/bin/lsyncd -log scarce ${pkgs.writeText "lsyncd-config.lua" ''
- settings {
- nodaemon = true,
- inotifyMode = "CloseWrite or Modify",
- }
- sync {
- default.rsyncssh,
- source = "/var/lib/containers/.blue",
- host = "${host}.r",
- targetdir = "/var/lib/containers/.blue",
- rsync = {
- archive = true,
- owner = true,
- group = true,
- };
- ssh = {
- binary = "${pkgs.openssh}/bin/ssh";
- identityFile = "/var/lib/containers/blue/home/lass/.ssh/id_rsa",
- },
- }
- ''}
- '';
- };
- unitConfig.ConditionPathExists = "!/var/run/ppp0.pid";
- }
- ) remote_hosts);
+ # #start sync
+ # ${pkgs.lsyncd}/bin/lsyncd -log scarce ${pkgs.writeText "lsyncd-config.lua" ''
+ # settings {
+ # nodaemon = true,
+ # inotifyMode = "CloseWrite or Modify",
+ # }
+ # sync {
+ # default.rsyncssh,
+ # source = "/var/lib/containers/.blue",
+ # host = "${host}.r",
+ # targetdir = "/var/lib/containers/.blue",
+ # rsync = {
+ # archive = true,
+ # owner = true,
+ # group = true,
+ # };
+ # ssh = {
+ # binary = "${pkgs.openssh}/bin/ssh";
+ # identityFile = "/var/lib/containers/blue/home/lass/.ssh/id_rsa",
+ # },
+ # }
+ # ''}
+ # '';
+ # };
+ # unitConfig.ConditionPathExists = "!/var/run/ppp0.pid";
+ # }
+ #) remote_hosts);
environment.systemPackages = [
(pkgs.writeDashBin "start-blue" ''