Lots of updates
This commit is contained in:
@@ -100,7 +100,7 @@ in {
|
||||
"L /root/.ssh/known_hosts - - - - /state/root/ssh/known_hosts"
|
||||
];
|
||||
|
||||
security.acme.email = "niten@fudo.org";
|
||||
security.acme.defaults.email = "niten@fudo.org";
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
|
||||
@@ -85,6 +85,24 @@ in {
|
||||
target-file = "/run/services/postgres/db.passwd";
|
||||
user = config.services.postgresql.superUser;
|
||||
};
|
||||
pricebot-auth-token = {
|
||||
source-file =
|
||||
config.fudo.secrets.files.service-secrets.nostromo."pricebot-auth.token";
|
||||
target-file = "/run/services/pricebot/auth.token";
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
|
||||
pricebot = {
|
||||
enable = true;
|
||||
mattermost-url = "https://chat.fudo.org";
|
||||
mattermost-auth-token-file = host-secrets.pricebot-auth-token.target-file;
|
||||
monitors = {
|
||||
btc = {
|
||||
mattermost-channel-id = "3m4bsxcrwbrmpqd4yawwh98q8o";
|
||||
notify-user = "niten";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
fudo.slynk.enable = true;
|
||||
fudo = {
|
||||
slynk.enable = true;
|
||||
wallfly.location = "office";
|
||||
};
|
||||
|
||||
networking = {
|
||||
interfaces = {
|
||||
intif0.useDHCP = true;
|
||||
};
|
||||
interfaces = { intif0.useDHCP = true; };
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-rime
|
||||
];
|
||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons fcitx5-rime ];
|
||||
};
|
||||
|
||||
# fudo.adguard-dns-proxy = {
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
with lib;
|
||||
let state-dir = "/state";
|
||||
in {
|
||||
fudo.slynk.enable = true;
|
||||
fudo = {
|
||||
slynk.enable = true;
|
||||
wallfly.location = "office";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ opencv-java ];
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ in {
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
|
||||
firewall.enable = false;
|
||||
firewall = { enable = false; };
|
||||
|
||||
defaultGateway = {
|
||||
address = "10.0.0.1";
|
||||
@@ -41,7 +41,7 @@ in {
|
||||
ipv4 = {
|
||||
addresses = [{
|
||||
address = primary-ip;
|
||||
prefixLength = 24;
|
||||
prefixLength = 16;
|
||||
}];
|
||||
};
|
||||
};
|
||||
@@ -75,6 +75,11 @@ in {
|
||||
target-file = "/run/mosquitto-secrets/xiaoxuan.passwd";
|
||||
user = mosquitto-user;
|
||||
};
|
||||
mosquitto-wallfly-passwd = {
|
||||
source-file = host-passwds.mosquitto-wallfly;
|
||||
target-file = "/run/mosquitto-secrets/wallfly.passwd";
|
||||
user = mosquitto-user;
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
@@ -102,14 +107,14 @@ in {
|
||||
};
|
||||
|
||||
tmpfiles.rules = [
|
||||
"L /root/.gnupg - - - - ${state-dir}/user/root/gnupg"
|
||||
"L /root/.ssh/id_rsa - - - - ${state-dir}/user/root/ssh/id_rsa"
|
||||
"L /root/.ssh/id_rsa.pub - - - - ${state-dir}/user/root/ssh/id_rsa.pub"
|
||||
"L /root/.ssh/known_hosts - - - - ${state-dir}/user/root/ssh/known_hosts"
|
||||
"L /etc/adjtime - - - - ${state-dir}/etc/adjtime"
|
||||
"d /state/services 0711 root root - -"
|
||||
"L /root/.gnupg - - - - ${state-dir}/user/root/gnupg"
|
||||
"L /root/.ssh/id_rsa - - - - ${state-dir}/user/root/ssh/id_rsa"
|
||||
"L /root/.ssh/id_rsa.pub - - - - ${state-dir}/user/root/ssh/id_rsa.pub"
|
||||
"L /root/.ssh/known_hosts - - - - ${state-dir}/user/root/ssh/known_hosts"
|
||||
"L /etc/adjtime - - - - ${state-dir}/etc/adjtime"
|
||||
"d /state/services 0711 root root - -"
|
||||
"d ${zigbee2mqtt-statedir} 0700 ${zigbee2mqtt-user} - - -"
|
||||
"d ${mosquitto-statedir} 0700 ${mosquitto-user} - - -"
|
||||
"d ${mosquitto-statedir} 0700 ${mosquitto-user} - - -"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -150,6 +155,7 @@ in {
|
||||
listeners = [{
|
||||
settings.allow_anonymous = false;
|
||||
port = 1883;
|
||||
address = "0.0.0.0";
|
||||
users = {
|
||||
zigbee2mqtt = {
|
||||
passwordFile =
|
||||
@@ -161,14 +167,18 @@ in {
|
||||
host-secrets.mosquitto-home-assistant-passwd.target-file;
|
||||
acl = [ "readwrite #" ];
|
||||
};
|
||||
niten = {
|
||||
passwordFile = host-secrets.mosquitto-niten-passwd.target-file;
|
||||
acl = [ "readwrite #" ];
|
||||
};
|
||||
xiaoxuan = {
|
||||
passwordFile = host-secrets.mosquitto-xiaoxuan-passwd.target-file;
|
||||
acl = [ "readwrite #" ];
|
||||
};
|
||||
# niten = {
|
||||
# passwordFile = host-secrets.mosquitto-niten-passwd.target-file;
|
||||
# acl = [ "readwrite #" ];
|
||||
# };
|
||||
# xiaoxuan = {
|
||||
# passwordFile = host-secrets.mosquitto-xiaoxuan-passwd.target-file;
|
||||
# acl = [ "readwrite #" ];
|
||||
# };
|
||||
# wallfly = {
|
||||
# passwordFile = host-secrets.mosquitto-wallfly-passwd.target-file;
|
||||
# acl = [ "readwrite homeassistant/binary_sensor/#" ];
|
||||
# };
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
+26
-13
@@ -1,25 +1,38 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
let state-dir = "/state";
|
||||
in {
|
||||
config = {
|
||||
fudo.slynk.enable = true;
|
||||
fudo = {
|
||||
slynk.enable = true;
|
||||
wallfly.location = "family_room";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ opencv-java ];
|
||||
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
interfaces.intif0.useDHCP = true;
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-rime
|
||||
];
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.xpadneo.enable = true;
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons fcitx5-rime ];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${state-dir}/lib/flatpak 0755 root root - -"
|
||||
"d ${state-dir}/etc 0755 root root - -"
|
||||
"L /var/lib/flatpak - - - - ${state-dir}/lib/flatpak"
|
||||
"L /etc/adjtime - - - - ${state-dir}/etc/adjtime"
|
||||
];
|
||||
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluezFull;
|
||||
};
|
||||
xpadneo.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user