Navigation Menu

Skip to content

Commit

Permalink
Switch to NetworkManager
Browse files Browse the repository at this point in the history
  • Loading branch information
PsychoLlama committed Sep 15, 2021
1 parent d5440f6 commit 54f1e40
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions default.nix
Expand Up @@ -10,6 +10,7 @@ in {
./modules/dev-shell.nix
./modules/editor.nix
./modules/passwordless-sudo.nix
./modules/wireless.nix
./modules/toolkits/development.nix
./modules/toolkits/files.nix
./modules/toolkits/infrastructure.nix
Expand Down
5 changes: 0 additions & 5 deletions hosts/ava/default.nix
Expand Up @@ -13,11 +13,6 @@
networking = {
interfaces.wlp0s20f3.useDHCP = true;
useDHCP = false; # Deprecated option - explicitly opt out.

wireless = {
enable = true;
interfaces = [ "wlp0s20f3" ];
};
};

# TODO: Manage background images more intelligently.
Expand Down
21 changes: 21 additions & 0 deletions modules/wireless.nix
@@ -0,0 +1,21 @@
{ config, unstable, lib, ... }:

let
df = config.dotfiles;
cfg = df.wireless;

in {
options.dotfiles.wireless = with lib; {
enable = mkOption {
type = types.bool;
description = "Enable wireless networking utilities";
default = df.kitchen-sink.enable;
};
};

config = with lib; {
networking.networkmanager.enable = cfg.enable;
users.users.${df.user.account}.extraGroups =
mkIf cfg.enable [ "networkmanager" ];
};
}

0 comments on commit 54f1e40

Please sign in to comment.