Merge remote-tracking branch 'upstream/master' into staging

This commit is contained in:
Tuomas Tynkkynen
2018-05-22 17:48:29 +03:00
47 changed files with 1103 additions and 581 deletions

View File

@@ -70,7 +70,7 @@ in {
resources = {
limits = {
cpu = "100m";
memory = "50Mi";
memory = "250Mi";
};
requests = {
cpu = "100m";

View File

@@ -128,9 +128,17 @@ in {
you might need to specify it in <literal>extraPackages</literal>.
'';
};
openFirewall = mkOption {
default = false;
type = types.bool;
description = "Whether to open the firewall for the specified port.";
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
systemd.services.home-assistant = {
description = "Home Assistant";
after = [ "network.target" ];

View File

@@ -344,7 +344,7 @@ in
default =
[
"$HOME/.nix-defexpr/channels"
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs"
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
"nixos-config=/etc/nixos/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
];

View File

@@ -209,7 +209,7 @@ let
''
echo "${cidr}" >> $state
echo -n "adding route ${cidr}... "
if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" 2>&1); then
if out=$(ip route add "${cidr}" ${options} ${via} dev "${i.name}" proto static 2>&1); then
echo "done"
elif ! echo "$out" | grep "File exists" >/dev/null 2>&1; then
echo "'ip route add "${cidr}" ${options} ${via} dev "${i.name}"' failed: $out"