2024-02-11 18:23:11 -07:00
|
|
|
{ pkgs, ... }:
|
2024-02-11 17:29:31 -07:00
|
|
|
let
|
|
|
|
tmuxFormat = pkgs.formats.yaml { };
|
|
|
|
in
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.zsh.promptInit = ''
|
|
|
|
alias tstart='smug -f /etc/smug/main.yml start';
|
|
|
|
alias cistart='smug -f /etc/smug/ci.yml start';
|
|
|
|
'';
|
|
|
|
environment = {
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
smug
|
|
|
|
];
|
|
|
|
etc."smug/ci.yml".text = builtins.readFile (tmuxFormat.generate "ci.yml" {
|
|
|
|
session = "CI";
|
|
|
|
root = "~/";
|
|
|
|
windows = [
|
|
|
|
{
|
|
|
|
name = "CI 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"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
});
|
|
|
|
etc."smug/main.yml".text = builtins.readFile (tmuxFormat.generate "main.yml" {
|
|
|
|
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-02-18 17:52:17 -07:00
|
|
|
commands = [ "mosh pwntie" ];
|
2024-02-11 17:29:31 -07:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Barrier";
|
|
|
|
commands = [
|
|
|
|
"barriers -a 127.0.0.1 -f --disable-crypto"
|
|
|
|
];
|
|
|
|
panes = [
|
|
|
|
{
|
|
|
|
commands = [ "ssh stan" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Xin";
|
|
|
|
root = "src/xin";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "Lab";
|
|
|
|
root = "src/biltong";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "NixPkgs";
|
|
|
|
root = "src/nixpkgs";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "NomadNet";
|
|
|
|
root = "reticulum";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|