Add option for networkmanager configuration.

This commit is contained in:
Kevin Baensch 2024-12-21 20:46:27 +01:00
parent 43a1b7881b
commit c968d00767
Signed by: derped
GPG key ID: C0F1D326C7626543
3 changed files with 28 additions and 1 deletions

View file

@ -7,7 +7,7 @@ with lib;
let
inherit (config.machine) networkD;
in
{
mkIf (!elem "networkmanager" config.machine.conffiles) {
networking = {
inherit (config.machine) hostName;
useNetworkd = networkD.enable;

26
config/networkmanager.nix Normal file
View file

@ -0,0 +1,26 @@
{
pkgs,
config,
lib,
...
}:
with lib;
mkIf (elem "networkmanager" config.machine.conffiles) {
networking = {
inherit (config.machine) hostName;
};
networking.networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-openconnect
];
};
environment.systemPackages = with pkgs; [
networkmanagerapplet
networkmanager_dmenu
];
}

View file

@ -48,6 +48,7 @@ let
])
++ (optional config.programs.virt-manager.enable "libvirtd")
++ (optional config.virtualisation.virtualbox.host.enable "vboxusers")
++ (optional config.networking.networkmanager.enable "networkmanager")
++ (optional (withDocker && !withPodman) "docker")
++ (optional withPodman "podman");
shell = "${pkgs.zsh}/bin/zsh";