Compare commits

...

3 Commits

3 changed files with 77 additions and 54 deletions

View File

@ -5,7 +5,7 @@ let
in in
{ {
networking.nat = { networking.nat = {
enable = true; enable = false;
internalInterfaces = [ "ve-*" ]; internalInterfaces = [ "ve-*" ];
externalInterface = "wlan0"; externalInterface = "wlan0";
# Lazy IPv6 connectivity for the container # Lazy IPv6 connectivity for the container
@ -13,7 +13,7 @@ in
}; };
containers.actual = { containers.actual = {
autoStart = true; autoStart = false;
privateNetwork = true; privateNetwork = true;
hostAddress = "192.168.10.188"; hostAddress = "192.168.10.188";
localAddress = "192.168.10.11"; localAddress = "192.168.10.11";
@ -23,7 +23,7 @@ in
networking.firewall.allowedTCPPorts = [ port ]; networking.firewall.allowedTCPPorts = [ port ];
services = { services = {
actual = { actual = {
enable = true; enable = false;
settings = { settings = {
inherit port; inherit port;
loginMethod = "password"; loginMethod = "password";

View File

@ -6,11 +6,18 @@ let
in in
{ {
services.home-assistant = { services = {
home-assistant = {
enable = true; enable = true;
package = package =
(pkgs.home-assistant.override { (pkgs.home-assistant.override {
extraPackages = py: with py; [ psycopg2 ]; extraPackages =
py: with py; [
# Postgres
psycopg2
# Roomba
roombapy
];
}).overrideAttrs }).overrideAttrs
(oldAttrs: { (oldAttrs: {
# Avoid long install checks # Avoid long install checks
@ -41,7 +48,7 @@ in
}; };
}; };
services.nginx.virtualHosts.${domain} = { nginx.virtualHosts.${domain} = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
extraConfig = '' extraConfig = ''
@ -52,7 +59,7 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
services.postgresql = { postgresql = {
enable = true; enable = true;
ensureDatabases = [ dbName ]; ensureDatabases = [ dbName ];
ensureUsers = [ ensureUsers = [
@ -62,4 +69,5 @@ in
} }
]; ];
}; };
};
} }

View File

@ -1,7 +1,22 @@
{ systemConfig, ... }:
{ {
imports = [ imports = [
./firewall.nix ./firewall.nix
]; ];
security.sudo.extraRules = [
{
users = [ systemConfig.username ];
runAs = "ALL:ALL";
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
services.pcscd.enable = true; services.pcscd.enable = true;
} }