From d1466bbba38c99180608ce1b164e71677bb64d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 26 Jan 2023 10:54:34 +0100 Subject: [PATCH] add miracast module --- modules/programs/default.nix | 3 ++- modules/programs/miracast.nix | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 modules/programs/miracast.nix diff --git a/modules/programs/default.nix b/modules/programs/default.nix index abc4c23..d7e92ff 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -18,10 +18,12 @@ ./gpg.nix ./helix.nix ./hub.nix + ./hyprland ./kakoune.nix ./kitty.nix ./ledger ./logseq.nix + ./miracast.nix ./python.nix ./rofi ./spotify.nix @@ -32,6 +34,5 @@ ./xmonad ./zathura.nix ./zsh.nix - ./hyprland ]; } diff --git a/modules/programs/miracast.nix b/modules/programs/miracast.nix new file mode 100644 index 0000000..6181a88 --- /dev/null +++ b/modules/programs/miracast.nix @@ -0,0 +1,23 @@ +{ config +, lib +, pkgs +, ... +}: + +with lib; +let + cfg = config.my.programs.miracast; +in +{ + options.my.programs.miracast.enable = mkEnableOption "miracast"; + + config = mkIf cfg.enable { + networking.firewall = { + allowedTCPPorts = [ 7236 7250 ]; + allowedUDPPorts = [ 7236 5353 ]; + }; + users.users.moritz.packages = with pkgs; [ + gnome-network-displays + ]; + }; +}