mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
refactor: move services out of systems/tewi/
This commit is contained in:
parent
2f68968238
commit
5a661e8809
30 changed files with 992 additions and 638 deletions
56
nixos/mosquitto.nix
Normal file
56
nixos/mosquitto.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkDefault;
|
||||
in {
|
||||
sops.secrets = {
|
||||
z2m-pass.owner = "mosquitto";
|
||||
systemd-pass.owner = "mosquitto";
|
||||
hass-pass.owner = "mosquitto";
|
||||
espresense-pass.owner = "mosquitto";
|
||||
};
|
||||
|
||||
services.mosquitto = {
|
||||
enable = mkDefault true;
|
||||
persistence = mkDefault true;
|
||||
listeners = [
|
||||
{
|
||||
openFirewall = mkDefault true;
|
||||
acl = [
|
||||
"pattern readwrite #"
|
||||
];
|
||||
users = {
|
||||
z2m = {
|
||||
passwordFile = config.sops.secrets.z2m-pass.path;
|
||||
acl = [
|
||||
"readwrite #"
|
||||
];
|
||||
};
|
||||
espresense = {
|
||||
passwordFile = config.sops.secrets.espresense-pass.path;
|
||||
acl = [
|
||||
"readwrite #"
|
||||
];
|
||||
};
|
||||
systemd = {
|
||||
passwordFile = config.sops.secrets.systemd-pass.path;
|
||||
acl = [
|
||||
"readwrite #"
|
||||
];
|
||||
};
|
||||
hass = {
|
||||
passwordFile = config.sops.secrets.hass-pass.path;
|
||||
acl = [
|
||||
"readwrite #"
|
||||
];
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
allow_anonymous = mkDefault false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue