Adding networking

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