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:
|
|
|
|
{
|
|
|
|
environment = {
|
|
|
|
systemPackages = [
|
|
|
|
(pkgs.writeScriptBin name ''
|
|
|
|
${pkgs.smug}/bin/smug -f /etc/smug/${name}.yml start
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
etc."smug/${name}.yml".text = builtins.readFile
|
|
|
|
(tmuxFormat.generate "${name}.yml" cfg);
|
|
|
|
};
|
|
|
|
};
|
2024-02-11 17:29:31 -07:00
|
|
|
in
|
|
|
|
{
|
2024-03-05 06:29:05 -07:00
|
|
|
config = mkMerge [
|
|
|
|
(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-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 = [
|
|
|
|
{
|
|
|
|
commands = [ "ssh stan" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
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
|
|
|
}
|