Adding networking

This commit is contained in:
2026-03-14 11:58:47 +01:00
parent bb631afc79
commit 0b03fe684f
@@ -1,33 +1,20 @@
{ { config, pkgs, ... }:
config,
pkgs,
lib,
...
}:
{ {
# Enable NetworkManager (NixOS-specific) # Enable NetworkManager
services.networkmanager = lib.mkIf (lib.isNixos) { services.networkmanager = {
enable = true; enable = true;
dhcpcd.enable = false; # Ensure dhcpcd is disabled to avoid conflicts dhcpcd.enable = false; # Ensure dhcpcd is disabled to avoid conflicts
}; };
# Install NetworkManager and wofi (NixOS-specific) # Install NetworkManager and wofi
environment.systemPackages = lib.mkIf (lib.isNixos) ( environment.systemPackages = with pkgs; [
with pkgs; networkmanager
[ wofi
networkmanager ];
wofi
]
);
# Ensure the user is in the necessary groups (NixOS-specific) # Ensure the user is in the necessary groups
users.users.${config.users.users."henrov".username} = lib.mkIf (lib.isNixos) { users.users.${config.users.users."henrov".username} = {
extraGroups = [ "networkmanager" ]; extraGroups = [ "networkmanager" ];
}; };
# Home Manager-specific configuration
home-manager = lib.mkIf (lib.isHomeManager) {
# Home Manager configurations go here
};
} }