Adding networking
This commit is contained in:
+34
-12
@@ -465,6 +465,10 @@ in
|
||||
git-extras
|
||||
];
|
||||
};
|
||||
|
||||
# Ensure the user is in the necessary groups
|
||||
users.users.${config.users.users.${user.username}.username} = {
|
||||
extraGroups = [ "networkmanager" ];
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
@@ -615,13 +619,36 @@ This sets the dbus implementation
|
||||
** =assets/flake/machines/traveldroid/networking.nix=
|
||||
This sets the dbus implementation
|
||||
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/networking.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Enable NetworkManager
|
||||
services.NetworkManager = {
|
||||
enable = true;
|
||||
dhcpcd.enable = false; # Ensure dhcpcd is disabled to avoid conflicts
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
networkmanager.enable = true;
|
||||
networkmanager.wifi.backend = "iwd";
|
||||
wireless.iwd.enable = true;
|
||||
wireless.userControlled.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
# KDE Connect: discovery + encrypted connections
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Install NetworkManager and wofi
|
||||
@@ -629,16 +656,11 @@ This sets the dbus implementation
|
||||
networkmanager
|
||||
wofi
|
||||
];
|
||||
|
||||
# Ensure the user is in the necessary groups
|
||||
users.users.${config.users.users."henrov".username} = {
|
||||
extraGroups = [ "networkmanager" ];
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =assets/flake/machines/traveldroid/session.nix=
|
||||
This sets the dbus implementation
|
||||
This sets the session variables
|
||||
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/session.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, user, ... }:
|
||||
{
|
||||
@@ -762,7 +784,7 @@ The ./generated/top.nix file acts as an anchor or entry point for the entire cha
|
||||
|
||||
let
|
||||
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
|
||||
# Dynamically read all files in assets/hyprland/conf/
|
||||
# Dynamically read all files in assets/hyprland/conf/hypr
|
||||
hyprlandConfs =
|
||||
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr"))
|
||||
(name: {
|
||||
|
||||
Reference in New Issue
Block a user