summaryrefslogtreecommitdiffstats
path: root/lass/2configs/blue-host.nix
diff options
context:
space:
mode:
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 718a92e9c..7aabf0931 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" ''