Commit 9142885615d7

Vincent Demeester <vincent@sbr.pm>
2022-07-20 10:40:25
services: add a barrier service
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent e929ae7
Changed files (3)
systems
systems/hosts/naruhodo.nix
@@ -149,6 +149,7 @@ in
       endpointPublicKey = endpointPublicKey;
     };
     syncthing.guiAddress = "${metadata.hosts.naruhodo.wireguard.addrs.v4}:8384";
+    barrier.enable = true;
   };
 
   virtualisation = {
systems/modules/services/barrier.nix
@@ -0,0 +1,18 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+  cfg = config.services.barrier;
+in
+{
+  options = {
+    services.barrier = {
+      enable = mkEnableOption ''
+        Barrier is a software kvm
+      '';
+    };
+  };
+  config = mkIf cfg.enable {
+    networking.firewall.allowedTCPPorts = [ 24800 ];
+  };
+}
systems/modules/services/default.nix
@@ -1,5 +1,6 @@
 {
   imports = [
+    ./barrier.nix
     ./govanityurl.nix
     ./nix-binary-cache.nix
     ./wireguard.client.nix