1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(mpd-fm): open mpd port to local network, removing the need for a password

This commit is contained in:
2021-04-08 19:25:05 +02:00
parent ebbbb537c3
commit 69ed97a4ab
2 changed files with 22 additions and 3 deletions

View File

@@ -7,6 +7,12 @@ rec {
tmpfilesConfig = {type, path, mode ? "-", user ? "-", group ? "-", age ? "-", argument ? "-"}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
firewall = lib: {
accept = { source, protocol, dport }: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}");
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
};
sshPort = 22022;
colours = import ./colours/mac-os.nix;