mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
nixos/openwebrx: init
This commit is contained in:
parent
5ab365c2a9
commit
f1020d20fa
@ -1015,6 +1015,7 @@
|
||||
./services/web-apps/pgpkeyserver-lite.nix
|
||||
./services/web-apps/matomo.nix
|
||||
./services/web-apps/moinmoin.nix
|
||||
./services/web-apps/openwebrx.nix
|
||||
./services/web-apps/restya-board.nix
|
||||
./services/web-apps/sogo.nix
|
||||
./services/web-apps/rss-bridge.nix
|
||||
|
33
nixos/modules/services/web-apps/openwebrx.nix
Normal file
33
nixos/modules/services/web-apps/openwebrx.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.openwebrx;
|
||||
in
|
||||
{
|
||||
options.services.openwebrx = with lib; {
|
||||
enable = mkEnableOption "OpenWebRX Web interface for Software-Defined Radios on http://localhost:8073";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.openwebrx;
|
||||
description = "OpenWebRX package to use for the service";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.openwebrx = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [
|
||||
csdr
|
||||
alsaUtils
|
||||
netcat
|
||||
];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/openwebrx";
|
||||
Restart = "always";
|
||||
DynamicUser = true;
|
||||
# openwebrx uses /var/lib/openwebrx by default
|
||||
StateDirectory = [ "openwebrx" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user