diff --git a/flake.nix b/flake.nix index fe7a33e..5d811f2 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,7 @@ enable = true; driSupport = true; }; + security.polkit.enable = true; networking.hostName = host; boot.loader.systemd-boot = { enable = true; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 631e373..b45a957 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -114,6 +114,7 @@ in { "${waybar}" "${wl-paste} --type text --watch cliphist store" "${wl-paste} --type image --watch cliphist store" + "${pkgs.mate.mate-polkit}/bin/polkit-mate" ]; env = [ "WLR_NO_HARDWARE_CURSORS,1" diff --git a/hosts/Aloria/default.nix b/hosts/Aloria/default.nix index 1ae97b5..c709795 100644 --- a/hosts/Aloria/default.nix +++ b/hosts/Aloria/default.nix @@ -1,5 +1,38 @@ { pkgs, ... }: - +let +mkConnection = name: cfg: { + connection = { + id = name; + type = "wifi"; + }; + ipv4 = { + method = "auto"; + }; + ipv6 = { + method = "auto"; + }; + wifi = { + ssid = name; + mode = "infrastructure"; + }; + wifi-security = { + auth-alg = "open"; + key-mgmt = "wpa-psk"; + psk = cfg.id; + }; +}; +connections = { + "The Buttshark" = { + id = "$THE_BUTTSHARK"; + }; + "5G Research Tower (5000 Watt)" = { + id = "$RESEARCH_TOWER"; + }; + "5G Research Tower (2400 Watt)" = { + id = "$RESEARCH_TOWER"; + }; +}; +in { services.pcscd.enable = true; hardware.opengl.extraPackages = [ @@ -25,7 +58,7 @@ dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ]; privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key"; listenPort = 51820; - postUp = "resolvectl dns %i 10.0.0.1; resolvectl domain %i ~thomasave.be;"; + # postUp = "resolvectl dns %i 10.0.0.1; resolvectl domain %i ~thomasave.be;"; peers = [{ publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c="; allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ]; @@ -34,13 +67,13 @@ }]; }; }; - networking.wireless = { + networking.networkmanager = { enable = true; - environmentFile = "/home/user/.secrets/Wireless/Aloria.env"; - networks = { - "The Buttshark" = { - psk = "@THE_BUTTSHARK@"; - }; + ensureProfiles = { + environmentFiles = [ + "/home/user/.secrets/Wireless/Aloria.env" + ]; + profiles = pkgs.lib.mapAttrs mkConnection connections; }; }; @@ -48,26 +81,26 @@ fileSystems."/home/server" = { device = "10.1:/home/server"; fsType = "nfs"; - options = [ "x-systemd.automount" "x-systemd.mount-timeout=30" "_netdev" "noauto" ]; + options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ]; }; fileSystems."/home/user/Workspace" = { device = "10.1:/home/server/Workspace"; fsType = "nfs"; - options = [ "x-systemd.automount" "x-systemd.mount-timeout=30" "_netdev" "noauto" ]; + options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ]; }; fileSystems."/home/user/Documents" = { device = "10.1:/home/server/Storage/Thomas/Documents"; fsType = "nfs"; - options = [ "x-systemd.automount" "x-systemd.mount-timeout=30" "_netdev" "noauto" ]; + options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ]; }; fileSystems."/home/user/Pictures" = { device = "10.1:/home/server/Storage/Thomas/Pictures"; fsType = "nfs"; - options = [ "x-systemd.automount" "x-systemd.mount-timeout=30" "_netdev" "noauto" ]; + options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ]; }; fileSystems."/home/user/Videos" = { device = "10.1:/home/server/Storage/Thomas/Videos"; fsType = "nfs"; - options = [ "x-systemd.automount" "x-systemd.mount-timeout=30" "_netdev" "noauto" ]; + options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ]; }; }