qclk/firmware/app.nix

32 lines
675 B
Nix

{ lib, pkgs, config, ... }:
let
configurer = pkgs.substituteAll {
src = ./configurer.py;
isExecutable = true;
python = pkgs.python3.withPackages (ps: with ps; [ pyyaml ]);
wireguardTools = pkgs.wireguard-tools;
systemd = config.systemd.package;
};
in
{
config = {
systemd = {
services = {
qclk-configurer = {
description = "qclk dynamic configurer";
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${configurer}";
};
wantedBy = [ "multi-user.target" ];
};
};
};
};
}