30 lines
850 B
Nix
30 lines
850 B
Nix
{ pkgs, ... }:
|
|
{
|
|
boot.isContainer = true;
|
|
networking.hostName = "agent";
|
|
|
|
networking.useNetworkd = true;
|
|
networking.useHostResolvConf = false;
|
|
systemd.network.enable = true;
|
|
networking.firewall.allowedTCPPorts = [ 1984 ];
|
|
|
|
environment.systemPackages = with pkgs; [ goose-cli git curl ripgrep ];
|
|
|
|
systemd.services.goose = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network-online.target" ];
|
|
wants = [ "network-online.target" ];
|
|
path = [ "/run/current-system/sw" ];
|
|
environment.HOME = "/root";
|
|
serviceConfig = {
|
|
EnvironmentFile = "/var/lib/slackerbot/agent.env";
|
|
ExecStart = "${pkgs.goose-cli}/bin/goose serve --host 0.0.0.0 --port 1984 --with-builtin developer";
|
|
WorkingDirectory = "/root";
|
|
Restart = "always";
|
|
RestartSec = 2;
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "25.11";
|
|
}
|