Add option for networkmanager configuration.
This commit is contained in:
parent
43a1b7881b
commit
c968d00767
3 changed files with 28 additions and 1 deletions
|
@ -7,7 +7,7 @@ with lib;
|
||||||
let
|
let
|
||||||
inherit (config.machine) networkD;
|
inherit (config.machine) networkD;
|
||||||
in
|
in
|
||||||
{
|
mkIf (!elem "networkmanager" config.machine.conffiles) {
|
||||||
networking = {
|
networking = {
|
||||||
inherit (config.machine) hostName;
|
inherit (config.machine) hostName;
|
||||||
useNetworkd = networkD.enable;
|
useNetworkd = networkD.enable;
|
||||||
|
|
26
config/networkmanager.nix
Normal file
26
config/networkmanager.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
|
@ -48,6 +48,7 @@ let
|
||||||
])
|
])
|
||||||
++ (optional config.programs.virt-manager.enable "libvirtd")
|
++ (optional config.programs.virt-manager.enable "libvirtd")
|
||||||
++ (optional config.virtualisation.virtualbox.host.enable "vboxusers")
|
++ (optional config.virtualisation.virtualbox.host.enable "vboxusers")
|
||||||
|
++ (optional config.networking.networkmanager.enable "networkmanager")
|
||||||
++ (optional (withDocker && !withPodman) "docker")
|
++ (optional (withDocker && !withPodman) "docker")
|
||||||
++ (optional withPodman "podman");
|
++ (optional withPodman "podman");
|
||||||
shell = "${pkgs.zsh}/bin/zsh";
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
|
|
Loading…
Reference in a new issue