Merge remote-tracking branch 'upstream/master' into staging
This commit is contained in:
@@ -70,7 +70,7 @@ in {
|
||||
resources = {
|
||||
limits = {
|
||||
cpu = "100m";
|
||||
memory = "50Mi";
|
||||
memory = "250Mi";
|
||||
};
|
||||
requests = {
|
||||
cpu = "100m";
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user