about summary refs log tree commit diff
path: root/nixos/modules/services/misc
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-05-22 17:48:29 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-05-22 17:48:29 +0300
commitf9feacfc7c389bacb937e24d7cccfe013271efaa (patch)
tree264c2e15652058f1f1dc16fa4739d453c533ba58 /nixos/modules/services/misc
parentdb4d77779c9b52a35c5a4306d36e2727cba1b162 (diff)
parentc8a4562f5966e90cbbe04195b4a37a5d4a334f60 (diff)
downloadnixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar
nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.gz
nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.bz2
nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.lz
nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.xz
nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.zst
nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.zip
Merge remote-tracking branch 'upstream/master' into staging
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r--nixos/modules/services/misc/home-assistant.nix8
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix2
2 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix
index 1dc7b44ee37b..05555353f207 100644
--- a/nixos/modules/services/misc/home-assistant.nix
+++ b/nixos/modules/services/misc/home-assistant.nix
@@ -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" ];
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 6aa6d9b271ff..429ce09ea68f 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -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"
           ];