nixos-configuration/modules/nix.nix
Jakob Lechner f66217770b
Patch wpa_supplicant to support Tradebyte wifi
Tradebyte access points use legacy crypto. This patch makes it possible
to establish a network connection.
2023-02-01 21:31:51 +00:00

52 lines
1.1 KiB
Nix

{ config, lib, pkgs, inputs, system, ... }:
{
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle";
daemonIOSchedPriority = 7;
nixPath = [
"nixpkgs=${inputs.nixpkgs}"
];
settings = {
trusted-users = [ "@wheel" ];
auto-optimise-store = true;
allowed-users = [ "@wheel" ];
};
};
nixpkgs.overlays = with inputs; [
self.overlay
(final: prev: {
master = import inputs.nixpkgsMaster {
inherit system;
config = prev.config;
};
})
]
# Tradebyte access points use legacy crypto
++ lib.optional config.myConfig.tradebyte.enable (
final: prev:
let
inherit (prev) callPackage;
in
{
wpa_supplicant = prev.wpa_supplicant.overrideAttrs (attrs: {
patches = attrs.patches ++ [
./wpa_supplicant/SSL_CTX_set_options-SSL_OP_LEGACY_SERVER_CONNECT.patch
];
});
}
);
environment.systemPackages = with pkgs; [
cached-nix-shell
];
}