refactor: moved nixos modules to dendrite pattern
This commit is contained in:
parent
df8dd110ad
commit
0ea11e0236
219 changed files with 4802 additions and 4820 deletions
11
modules/nixos/programs/home-assistant/extensions/default.nix
Normal file
11
modules/nixos/programs/home-assistant/extensions/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{config, ...}: let
|
||||
mod = config.flake.nixosModules;
|
||||
in {
|
||||
flake.nixosModules.home-assistant-extensions = {
|
||||
imports = [
|
||||
mod.home-assistant-sonos
|
||||
mod.home-assistant-jellyfin
|
||||
mod.home-assistant-wyoming
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{...}: {
|
||||
flake.nixosModules.home-assistant-jellyfin = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf (config.services.home-assistant.extensions.jellyfin.enable) {
|
||||
services.home-assistant.extraComponents = ["jellyfin"];
|
||||
# TODO: configure port, address, and login information here
|
||||
};
|
||||
}
|
||||
13
modules/nixos/programs/home-assistant/extensions/sonos.nix
Normal file
13
modules/nixos/programs/home-assistant/extensions/sonos.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{...}: {
|
||||
flake.nixosModules.home-assistant-sonos = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf (config.services.home-assistant.extensions.sonos.enable) {
|
||||
services.home-assistant.extraComponents = ["sonos"];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
config.services.home-assistant.extensions.sonos.port
|
||||
];
|
||||
};
|
||||
}
|
||||
11
modules/nixos/programs/home-assistant/extensions/wyoming.nix
Normal file
11
modules/nixos/programs/home-assistant/extensions/wyoming.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{...}: {
|
||||
flake.nixosModules.home-assistant-wyoming = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf (config.services.home-assistant.extensions.wyoming.enable) {
|
||||
services.home-assistant.extraComponents = ["wyoming"];
|
||||
services.wyoming.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue