summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/1systems/hotdog/config.nix4
-rw-r--r--krebs/1systems/news/config.nix11
-rw-r--r--krebs/2configs/hotdog-host.nix9
-rw-r--r--krebs/2configs/news-host.nix9
-rw-r--r--krebs/2configs/news.nix3
-rw-r--r--krebs/3modules/sync-containers3.nix4
-rw-r--r--krebs/5pkgs/simple/fzfmenu/default.nix9
-rw-r--r--krebs/5pkgs/simple/pager.nix2
8 files changed, 28 insertions, 23 deletions
diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix
index 9849937d5..70307a96b 100644
--- a/krebs/1systems/hotdog/config.nix
+++ b/krebs/1systems/hotdog/config.nix
@@ -26,4 +26,8 @@
boot.isContainer = true;
networking.useDHCP = false;
+ krebs.sync-containers3.inContainer = {
+ enable = true;
+ pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM20tYHHvwIgrJZzR35ATzH9AlTrM1enNKEQJ7IP6lBh";
+ };
}
diff --git a/krebs/1systems/news/config.nix b/krebs/1systems/news/config.nix
index 620e6249e..b27fc3737 100644
--- a/krebs/1systems/news/config.nix
+++ b/krebs/1systems/news/config.nix
@@ -17,13 +17,8 @@
boot.isContainer = true;
networking.useDHCP = lib.mkForce true;
- krebs.bindfs = {
- "/var/lib/brockman" = {
- source = "/var/state/brockman";
- options = [
- "-m ${toString config.users.users.brockman.uid}:${toString config.users.users.nginx.uid}"
- ];
- clearTarget = true;
- };
+ krebs.sync-containers3.inContainer = {
+ enable = true;
+ pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMBVZomw68WDQy0HsHhNbWK1KpzaR5aRUG1oioE7IgCv";
};
}
diff --git a/krebs/2configs/hotdog-host.nix b/krebs/2configs/hotdog-host.nix
new file mode 100644
index 000000000..95d70376b
--- /dev/null
+++ b/krebs/2configs/hotdog-host.nix
@@ -0,0 +1,9 @@
+{
+ krebs.sync-containers3.containers.hotdog = {
+ sshKey = "${toString <secrets>}/hotdog.sync.key";
+ };
+ containers.hotdog.bindMounts."/var/lib" = {
+ hostPath = "/var/lib/sync-containers3/hotdog/state";
+ isReadOnly = false;
+ };
+}
diff --git a/krebs/2configs/news-host.nix b/krebs/2configs/news-host.nix
index 07674c86e..71793e518 100644
--- a/krebs/2configs/news-host.nix
+++ b/krebs/2configs/news-host.nix
@@ -1,10 +1,5 @@
{
- krebs.sync-containers.containers.news = {
- peers = [
- "shodan"
- "mors"
- "styx"
- ];
- format = "plain";
+ krebs.sync-containers3.containers.news = {
+ sshKey = "${toString <secrets>}/news.sync.key";
};
}
diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix
index d6c6371da..9d9470727 100644
--- a/krebs/2configs/news.nix
+++ b/krebs/2configs/news.nix
@@ -74,7 +74,7 @@
limits.identlen = 100;
history.enabled = false;
};
- systemd.services.brockman.bindsTo = [ "ergo.service" ];
+ systemd.services.brockman.bindsTo = [ "ergochat.service" ];
systemd.services.brockman.serviceConfig.LimitNOFILE = 16384;
systemd.services.brockman.environment.BROCKMAN_LOG_LEVEL = "DEBUG";
krebs.brockman = {
@@ -87,6 +87,7 @@
nick = "brockman";
extraChannels = [ "#all" ];
};
+ statePath = "/var/state/brockman/brockman.json";
bots = {};
};
};
diff --git a/krebs/3modules/sync-containers3.nix b/krebs/3modules/sync-containers3.nix
index 4a00b23ab..ed147b30e 100644
--- a/krebs/3modules/sync-containers3.nix
+++ b/krebs/3modules/sync-containers3.nix
@@ -104,7 +104,9 @@ in {
consul lock sync_${ctr.name} ${pkgs.writers.writeDash "${ctr.name}-sync" ''
set -efux
if /run/wrappers/bin/ping -c 1 ${ctr.name}.r; then
- nice --adjustment=30 rsync -a -e "ssh -i $CREDENTIALS_DIRECTORY/ssh_key" --timeout=30 container_sync@${ctr.name}.r:disk "$HOME"/disk
+ nice --adjustment=30 rsync -a -e "ssh -i $CREDENTIALS_DIRECTORY/ssh_key" --timeout=30 --inplace --sparse container_sync@${ctr.name}.r:disk "$HOME"/disk.rsync
+ touch "$HOME"/incomplete
+ nice --adjustment=30 rsync --inplace "$HOME"/disk.rsync "$HOME"/disk
rm -f "$HOME"/incomplete
fi
''}
diff --git a/krebs/5pkgs/simple/fzfmenu/default.nix b/krebs/5pkgs/simple/fzfmenu/default.nix
index 4527ad90b..fe5d5e27a 100644
--- a/krebs/5pkgs/simple/fzfmenu/default.nix
+++ b/krebs/5pkgs/simple/fzfmenu/default.nix
@@ -48,10 +48,11 @@ pkgs.writeDashBin "fzfmenu" ''
exec 4>&1
export FZFMENU_INPUT_FD=3
export FZFMENU_OUTPUT_FD=4
- exec ${pkgs.rxvt-unicode}/bin/urxvt \
- -name ${cfg.appName} \
- -title ${shell.escape cfg.windowTitle} \
- -e "$0" "$@"
+ exec ${pkgs.alacritty}/bin/alacritty \
+ --config-file /var/theme/config/alacritty.yaml \
+ --class ${cfg.appName} \
+ --title ${shell.escape cfg.windowTitle} \
+ --command "$0" "$@"
else
exec 0<&''${FZFMENU_INPUT_FD-0}
exec 1>&''${FZFMENU_OUTPUT_FD-1}
diff --git a/krebs/5pkgs/simple/pager.nix b/krebs/5pkgs/simple/pager.nix
index 506ef2eb3..952b5ee1e 100644
--- a/krebs/5pkgs/simple/pager.nix
+++ b/krebs/5pkgs/simple/pager.nix
@@ -33,8 +33,6 @@ pkgs.symlinkJoin {
-ti vt340 \
-xrm '*geometry: 32x10' \
-xrm '*internalBorder: 2' \
- -xrm '*background: #050505' \
- -xrm '*foreground: #d0d7d0' \
-e ${pkgs.haskellPackages.pager}/bin/pager "$@"
'')
pkgs.haskellPackages.pager