bruh
This commit is contained in:
@@ -24,7 +24,7 @@ in
|
||||
lm_sensors
|
||||
nano
|
||||
nix-prefetch-scripts
|
||||
nixfmt-rfc-style
|
||||
nixfmt
|
||||
pciutils
|
||||
protonup-ng
|
||||
rsync
|
||||
|
||||
46
modules/nixos/homeassistant/services/govee2mqtt/default.nix
Normal file
46
modules/nixos/homeassistant/services/govee2mqtt/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.services.home-assistant;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
sops = {
|
||||
secrets = {
|
||||
"jallen-nas/govee2mqtt/govee-email" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
"jallen-nas/govee2mqtt/govee-password" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
"jallen-nas/govee2mqtt/govee-api" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
};
|
||||
templates = {
|
||||
"govee2mqtt.env" = {
|
||||
mode = "660";
|
||||
restartUnits = [ "govee2mqtt.service" ];
|
||||
content = ''
|
||||
GOVEE_EMAIL=${config.sops.placeholder."jallen-nas/govee2mqtt/govee-email"}
|
||||
GOVEE_PASSWORD=${config.sops.placeholder."jallen-nas/govee2mqtt/govee-password"}
|
||||
GOVEE_API_KEY=${config.sops.placeholder."jallen-nas/govee2mqtt/govee-api"}
|
||||
GOVEE_MQTT_HOST=localhost
|
||||
GOVEE_MQTT_PORT=1883
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
govee2mqtt = {
|
||||
enable = true;
|
||||
environmentFile = config.sops.templates."govee2mqtt.env".path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,19 +11,19 @@ let
|
||||
cfg = config.${namespace}.services.home-assistant;
|
||||
in
|
||||
{
|
||||
disabledModules = [
|
||||
"services/home-automation/home-assistant.nix"
|
||||
];
|
||||
# disabledModules = [
|
||||
# "services/home-automation/home-assistant.nix"
|
||||
# ];
|
||||
|
||||
imports = [
|
||||
"${inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/home-assistant.nix"
|
||||
];
|
||||
# imports = [
|
||||
# "${inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/home-assistant.nix"
|
||||
# ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.home-assistant;
|
||||
package = pkgs.home-assistant;
|
||||
openFirewall = true;
|
||||
configDir = "/var/lib/homeassistant";
|
||||
configWritable = true; # todo
|
||||
@@ -252,6 +252,7 @@ in
|
||||
ha-bambulab
|
||||
ha-bedjet
|
||||
ha-gehome
|
||||
# ha-govee
|
||||
ha-icloud3
|
||||
ha-local-llm
|
||||
ha-mail-and-packages
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
settings = {
|
||||
# extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||
substituters = [
|
||||
"https://cache.mjallen.dev/nas-cache"
|
||||
# "https://cache.mjallen.dev/nas-cache"
|
||||
"https://nixos-apple-silicon.cachix.org"
|
||||
"https://nixos-raspberrypi.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nas-cache:Y7PR+XTLr1bLIL85PKb9Tk9/BnE5HndTKvZYWVP1/48="
|
||||
# "nas-cache:Y7PR+XTLr1bLIL85PKb9Tk9/BnE5HndTKvZYWVP1/48="
|
||||
"nixos-apple-silicon.cachix.org-1:8psDu5SA5dAD7qA0zMy5UT292TxeEPzIz8VVEr2Js20="
|
||||
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
|
||||
@@ -16,6 +16,39 @@ let
|
||||
description = "*arr Services";
|
||||
options = { };
|
||||
moduleConfig = {
|
||||
sops = {
|
||||
secrets = {
|
||||
"jallen-nas/sabnzbd/password" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
"jallen-nas/sabnzbd/api-key" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
"jallen-nas/sabnzbd/nzb-key" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
"jallen-nas/sabnzbd/server/username" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
"jallen-nas/sabnzbd/server/password" = {
|
||||
sopsFile = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
|
||||
};
|
||||
};
|
||||
templates = {
|
||||
"sabnzbd.ini" = {
|
||||
mode = "660";
|
||||
restartUnits = [ "sabnzbd.service" ];
|
||||
content = ''
|
||||
misc.password=${config.sops.placeholder."jallen-nas/sabnzbd/password"}
|
||||
misc.api_key=${config.sops.placeholder."jallen-nas/sabnzbd/api-key"}
|
||||
misc.nzb_key=${config.sops.placeholder."jallen-nas/sabnzbd/nzb-key"}
|
||||
servers."news.newsgroupdirect.com".username=${config.sops.placeholder."jallen-nas/sabnzbd/server/username"}
|
||||
servers."news.newsgroupdirect.com".password=${config.sops.placeholder."jallen-nas/sabnzbd/server/password"}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable radarr service
|
||||
services.radarr = {
|
||||
enable = true;
|
||||
@@ -38,10 +71,42 @@ let
|
||||
# Enable Sabnzbd service
|
||||
services.sabnzbd = {
|
||||
enable = true;
|
||||
# openFirewall = cfg.openFirewall;
|
||||
user = "nix-apps";
|
||||
group = "jallen-nas";
|
||||
configFile = "${cfg.configDir}/sabnzbd/sabnzbd.ini";
|
||||
secretFiles = [
|
||||
config.sops.templates."sabnzbd.ini".path
|
||||
];
|
||||
settings = {
|
||||
misc = {
|
||||
host = "0.0.0.0";
|
||||
port = 8280;
|
||||
cache_limit = "10G";
|
||||
download_dir = "${cfg.configDir}/downloads";
|
||||
complete_dir = "${cfg.configDir}/incomplete";
|
||||
};
|
||||
servers = {
|
||||
"news.newsgroupdirect.com" = {
|
||||
name = "news.newsgroupdirect.com";
|
||||
displayname = "news.newsgroupdirect.com";
|
||||
host = "news.newsgroupdirect.com";
|
||||
port = 563;
|
||||
timeout = 60;
|
||||
connections = 8;
|
||||
ssl = true;
|
||||
ssl_verify = 2;
|
||||
ssl_ciphers = "";
|
||||
enable = true;
|
||||
required = false;
|
||||
optional = false;
|
||||
retention = 0;
|
||||
expire_date = "";
|
||||
quota = "";
|
||||
usage_at_start = 0;
|
||||
priority = 0;
|
||||
notes = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.deluge = {
|
||||
|
||||
Reference in New Issue
Block a user