Compare commits
No commits in common. "e9c7c7135610e0324f94daedf6232eacf7d1ae11" and "fc52217007abb21e0d775eb4ddc1645904fd3028" have entirely different histories.
e9c7c71356
...
fc52217007
@ -47,6 +47,10 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = with pkgs.unstablePkgs; [ gamemode heroic ];
|
environment.systemPackages = with pkgs.unstablePkgs; [ gamemode heroic ];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
pulseaudio.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = pkgs.lib.mkForce false;
|
systemd.services.NetworkManager-wait-online.enable = pkgs.lib.mkForce false;
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -75,7 +79,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
pulseaudio.enable = false;
|
|
||||||
sunshine = {
|
sunshine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
@ -8,17 +8,57 @@ in
|
|||||||
{
|
{
|
||||||
options.pepe.services.homeassistant = with lib; {
|
options.pepe.services.homeassistant = with lib; {
|
||||||
enable = mkEnableOption "Enable Home Assistant";
|
enable = mkEnableOption "Enable Home Assistant";
|
||||||
|
package = mkPackageOption pkgs "home-assistant" { };
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
extraComponents = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
description = "Additional components to enable in Home Assistant";
|
||||||
|
};
|
||||||
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
|
default = _: [];
|
||||||
|
description = "Additional Python packages for Home Assistant";
|
||||||
|
};
|
||||||
|
config = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
default = {};
|
||||||
|
description = "Home Assistant configuration";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
services.home-assistant = {
|
||||||
|
enable = true;
|
||||||
|
package = cfg.package;
|
||||||
|
extraComponents = cfg.extraComponents;
|
||||||
|
extraPackages = cfg.extraPackages;
|
||||||
|
config = cfg.config;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.mosquitto = {
|
||||||
|
enable = true;
|
||||||
|
listeners = [
|
||||||
|
{
|
||||||
|
address = "127.0.0.1";
|
||||||
|
acl = [ "pattern readwrite #" ];
|
||||||
|
omitPasswordAuth = true;
|
||||||
|
settings.allow_anonymous = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.go2rtc = {
|
||||||
|
enable = true;
|
||||||
|
settings.api.listen = "127.0.0.1:1984";
|
||||||
|
};
|
||||||
|
|
||||||
pepe.core.vhost.hosts.${cfg.domain} = {
|
pepe.core.vhost.hosts.${cfg.domain} = {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
host = "10.0.0.251";
|
port = config.services.home-assistant.config.http.server_port or 8123;
|
||||||
port = 8123;
|
|
||||||
allowLAN = true;
|
allowLAN = true;
|
||||||
allowVPN = true;
|
allowVPN = true;
|
||||||
allowWAN = true;
|
allowWAN = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user