mixer-rpc/configuration.nix

37 lines
1,004 B
Nix

{ config, modulesPath, pkgs, lib, ... }:
{
imports = [ (modulesPath + "/virtualisation/proxmox-lxc.nix") ];
nix.settings = { sandbox = false; };
proxmoxLXC = {
manageNetwork = false;
privileged = true;
};
security.pam.services.sshd.allowNullPassword = true;
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = false;
};
};
environment.systemPackages = with pkgs; [
vim
git
# (python3.withPackages (p: with p; [paho-mqtt mido])) # enable for local testing
];
systemd.services.mixer-mqtt = {
wantedBy = [ "multi-user.target" ]; # auto-start at boot
serviceConfig = {
ExecStart = "${pkgs.python3.withPackages (p: with p; [ paho-mqtt mido ])}/bin/python3 /root/mixer-rpc/mqtt_client.py 172.23.42.20 172.23.42.25";
Restart = "always";
RestartSec = 5;
Environment = "PYTHONUNBUFFERED=1";
};
};
system.stateVersion = "25.05";
}