diff --git a/modules/base/default.nix b/modules/base/default.nix index e22aa7d..c37be96 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -61,7 +61,7 @@ in neovim.enable = true; systemd-boot.enable = true; tuigreet.enable = true; - # tailscale.enable = true; + networkmanager.enable = true; }; # TODO: Remove everything below, it is here out of convenience and should be elsewhere diff --git a/modules/default.nix b/modules/default.nix index c077c1f..d2894d3 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -21,6 +21,7 @@ with lib; ./greeter/greetd/tuigreet.nix ./locale/default.nix ./neovim/default.nix + ./networkmanager/default.nix ./power-saving/default.nix ./sound/pipewire.nix ./users/default.nix diff --git a/modules/networkmanager/default.nix b/modules/networkmanager/default.nix new file mode 100644 index 0000000..317423e --- /dev/null +++ b/modules/networkmanager/default.nix @@ -0,0 +1,25 @@ +{ + lib, + config, + ... +}: + +with lib; +let + cfg = config.modules.power-saving; +in +{ + options.modules.networkmanager = { + enable = mkEnableOption "networkmanager"; + }; + + config = mkIf cfg.enable { + machine.sudo-groups = [ "networkmanager" ]; + networking = { + networkmanager = { + enable = true; + wifi.powersave = true; + }; + }; + }; +} diff --git a/modules/power-saving/default.nix b/modules/power-saving/default.nix index 8fb491e..22372c6 100644 --- a/modules/power-saving/default.nix +++ b/modules/power-saving/default.nix @@ -1,7 +1,6 @@ { lib, config, - pkgs, ... }: