feat: added a formatter and some instructions

This commit is contained in:
silver 2023-09-17 20:51:08 +01:00
parent 14ae0a9065
commit 7f3dc8946e
39 changed files with 1739 additions and 1348 deletions

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.skynet_ulfm;
in {
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.services.skynet_ulfm;
in {
imports = [
./acme.nix
./dns.nix
@ -12,34 +15,34 @@
];
options.services.skynet_ulfm = {
enable = mkEnableOption "ULFM service";
enable = mkEnableOption "ULFM service";
host = {
ip = mkOption {
type = types.str;
};
host = {
ip = mkOption {
type = types.str;
};
name = mkOption {
type = types.str;
};
};
name = mkOption {
type = types.str;
};
};
domain = {
tld = mkOption {
type = types.str;
default = "ie";
};
domain = {
tld = mkOption {
type = types.str;
default = "ie";
};
base = mkOption {
type = types.str;
default = "skynet";
};
base = mkOption {
type = types.str;
default = "skynet";
};
sub = mkOption {
type = types.str;
default = "ulfm";
};
};
sub = mkOption {
type = types.str;
default = "ulfm";
};
};
};
config = mkIf cfg.enable {
@ -55,7 +58,11 @@
];
skynet_dns.records = [
{record=cfg.domain.sub; r_type="CNAME"; value=cfg.host.name;}
{
record = cfg.domain.sub;
r_type = "CNAME";
value = cfg.host.name;
}
];
skynet_firewall.forward = [
@ -74,9 +81,9 @@
};
systemd.services.icecast = {
after = [ "network.target" ];
after = ["network.target"];
description = "Icecast Network Audio Streaming Server";
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
preStart = "mkdir -p /var/log/icecast && chown nobody:nogroup /var/log/icecast";
serviceConfig = {
@ -91,7 +98,5 @@
useACMEHost = "skynet";
locations."/".proxyPass = "http://localhost:8000";
};
};
}
}