commit 4909eab1ae4ad3da5b53356ac54fd2dbfbbe659f parent cc28b2c8f4a0483bd8e14d54a068c9c13d67cac6 Author: Vincent Demeester <vincent@sbr.pm> Date: Tue, 23 Aug 2022 18:22:36 +0200 systems/modules: avahi changes Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | systems/hosts/wakasu.nix | | | 1 | - |
M | systems/modules/desktop/base.nix | | | 63 | ++++++++++++++++++++++++++------------------------------------- |
2 files changed, 26 insertions(+), 38 deletions(-)
diff --git a/systems/hosts/wakasu.nix b/systems/hosts/wakasu.nix @@ -99,7 +99,6 @@ in # TODO Migrate to modules profiles.home = true; - profiles.avahi.enable = true; profiles.externalbuilder.enable = true; services = { diff --git a/systems/modules/desktop/base.nix b/systems/modules/desktop/base.nix @@ -83,32 +83,32 @@ in # Do not manager libvirt interfaces ++ lib.optionals config.virtualisation.libvirtd.enable [ "interface-name:virbr*" ]; packages = with pkgs; [ networkmanager-openvpn ]; - dispatcherScripts = [{ - # https://askubuntu.com/questions/1271491/disable-wifi-if-lan-is-connected - source = pkgs.writeText "wifi-wired-exclusive" '' - #!${pkgs.bash}/bin/bash - export LC_ALL=C - - enable_disable_wifi () - { - result=$(${pkgs.networkmanager}/bin/nmcli dev | ${pkgs.gnugrep}/bin/grep "ethernet" | ${pkgs.gnugrep}/bin/grep -w "connected") - if [ -n "$result" ]; then - ${pkgs.networkmanager}/bin/nmcli radio wifi off - else - ${pkgs.networkmanager}/bin/nmcli radio wifi on - fi - } - - if [ "$2" = "up" ]; then - enable_disable_wifi - fi - - if [ "$2" = "down" ]; then - enable_disable_wifi - fi - ''; - type = "basic"; - }]; + # dispatcherScripts = [{ + # # https://askubuntu.com/questions/1271491/disable-wifi-if-lan-is-connected + # source = pkgs.writeText "wifi-wired-exclusive" '' + # #!${pkgs.bash}/bin/bash + # export LC_ALL=C + # + # enable_disable_wifi () + # { + # result=$(${pkgs.networkmanager}/bin/nmcli dev | ${pkgs.gnugrep}/bin/grep "ethernet" | ${pkgs.gnugrep}/bin/grep -w "connected") + # if [ -n "$result" ]; then + # ${pkgs.networkmanager}/bin/nmcli radio wifi off + # else + # ${pkgs.networkmanager}/bin/nmcli radio wifi on + # fi + # } + # + # if [ "$2" = "up" ]; then + # enable_disable_wifi + # fi + # + # if [ "$2" = "down" ]; then + # enable_disable_wifi + # fi + # ''; + # type = "basic"; + # }]; }; nix = { @@ -117,17 +117,6 @@ in }; services = { - # Enable avahi with a lot of options - avahi = { - enable = true; - ipv4 = true; - ipv6 = true; - nssmdns = true; - publish = { - enable = true; - userServices = true; - }; - }; udisks2.enable = true; # Make `/run/user/X` larger.