2024-03-05 06:29:05 -07:00
|
|
|
{ lib, pkgs, ... }:
|
2024-02-11 17:29:31 -07:00
|
|
|
let
|
2024-03-05 06:29:05 -07:00
|
|
|
inherit (lib) mkMerge;
|
2024-02-11 17:29:31 -07:00
|
|
|
tmuxFormat = pkgs.formats.yaml { };
|
2024-03-05 06:29:05 -07:00
|
|
|
mkSmugEntry = name: cfg:
|
|
|
|
{
|
2024-09-09 08:19:36 -06:00
|
|
|
environment =
|
|
|
|
let
|
|
|
|
yamlFile = tmuxFormat.generate "${name}.yml" cfg;
|
|
|
|
startScript = pkgs.writeScriptBin name ''
|
|
|
|
${pkgs.smug}/bin/smug -f ${yamlFile} start
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
|
|
systemPackages = [
|
|
|
|
startScript
|
|
|
|
];
|
|
|
|
};
|
2024-03-05 06:29:05 -07:00
|
|
|
};
|
2024-02-11 17:29:31 -07:00
|
|
|
in
|
|
|
|
{
|
2024-03-05 06:29:05 -07:00
|
|
|
config = mkMerge [
|
2024-04-24 08:45:06 -06:00
|
|
|
(mkSmugEntry "work"
|
|
|
|
{
|
|
|
|
session = "Work";
|
|
|
|
root = "~/";
|
|
|
|
before_start = [
|
|
|
|
"ssh-add"
|
|
|
|
];
|
|
|
|
windows = [
|
|
|
|
{
|
|
|
|
name = "VM";
|
|
|
|
layout = "even-vertical";
|
|
|
|
commands = [
|
|
|
|
"ssh vm"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "aef100";
|
|
|
|
root = "~/aef100";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
})
|
2024-03-05 06:29:05 -07:00
|
|
|
(mkSmugEntry "cistart"
|
|
|
|
{
|
2024-02-11 17:29:31 -07:00
|
|
|
session = "CI";
|
|
|
|
root = "~/";
|
|
|
|
windows = [
|
|
|
|
{
|
2024-03-05 06:29:05 -07:00
|
|
|
name = "Status";
|
2024-02-11 21:50:31 -07:00
|
|
|
layout = "even-vertical";
|
2024-02-11 17:29:31 -07:00
|
|
|
commands = [
|
|
|
|
"journalctl -xef -u xin-ci-update.service"
|
|
|
|
];
|
|
|
|
panes = [
|
|
|
|
{
|
2024-02-11 21:50:31 -07:00
|
|
|
type = "even-vertical";
|
2024-02-11 17:29:31 -07:00
|
|
|
commands = [ "journalctl -xef -u xin-ci.service" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
2024-02-11 21:50:31 -07:00
|
|
|
name = "btop";
|
2024-02-11 17:29:31 -07:00
|
|
|
commands = [
|
|
|
|
"btop"
|
|
|
|
];
|
|
|
|
}
|
2024-08-19 09:46:59 -06:00
|
|
|
{
|
|
|
|
name = "nix-binary-cache";
|
|
|
|
commands = [
|
|
|
|
"journalctl -xef -u nix-binary-cache.service"
|
|
|
|
];
|
|
|
|
}
|
2024-03-06 05:52:05 -07:00
|
|
|
{
|
|
|
|
name = "admin";
|
|
|
|
}
|
2024-02-11 17:29:31 -07:00
|
|
|
];
|
2024-03-05 06:29:05 -07:00
|
|
|
})
|
|
|
|
(mkSmugEntry "tstart"
|
|
|
|
{
|
2024-02-11 17:29:31 -07:00
|
|
|
session = "Main";
|
|
|
|
root = "~/";
|
2024-02-11 18:52:20 -07:00
|
|
|
before_start = [
|
|
|
|
"ssh-add"
|
|
|
|
];
|
2024-02-11 17:29:31 -07:00
|
|
|
windows = [
|
|
|
|
{
|
|
|
|
name = "Status";
|
|
|
|
commands = [
|
|
|
|
"while true; do ssh -4 anonicb@slackers.openbsd.org; sleep 300; done"
|
|
|
|
];
|
|
|
|
panes = [
|
|
|
|
{
|
2024-03-05 07:27:29 -07:00
|
|
|
commands = [ "mosh pwntie cistart" ];
|
2024-02-11 17:29:31 -07:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
2024-02-28 09:48:35 -07:00
|
|
|
name = "KVM";
|
2024-02-11 17:29:31 -07:00
|
|
|
commands = [
|
2024-02-28 11:08:31 -07:00
|
|
|
"journalctl -xef -u rkvm-server"
|
2024-02-11 17:29:31 -07:00
|
|
|
];
|
|
|
|
panes = [
|
|
|
|
{
|
2024-11-05 13:03:51 -07:00
|
|
|
commands = [ "ssh stan-kvm" ];
|
2024-02-11 17:29:31 -07:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Xin";
|
|
|
|
root = "src/xin";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Lab";
|
|
|
|
root = "src/biltong";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "NixPkgs";
|
|
|
|
root = "src/nixpkgs";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "NomadNet";
|
|
|
|
root = "reticulum";
|
|
|
|
}
|
|
|
|
];
|
2024-03-05 06:29:05 -07:00
|
|
|
})
|
|
|
|
];
|
2024-02-11 17:29:31 -07:00
|
|
|
}
|