Added networking
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
user,
|
||||
flakeRoot,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
|
||||
# Dynamically read all files in assets/hyprland/conf/
|
||||
hyprlandConfs =
|
||||
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf"))
|
||||
(name: {
|
||||
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}";
|
||||
});
|
||||
in
|
||||
{
|
||||
# NixOS: Enable Hyprland (optional)
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Home Manager: Hyprland-specific configurations
|
||||
home-manager.users.${user.username} = {
|
||||
# Use config.home-manager.users.${user.username} instead of userConfig
|
||||
home.stateVersion = config.home-manager.users.${user.username}.stateVersion or "23.11"; # Default fallback
|
||||
home.username = user.username; # Use the 'user' argument
|
||||
home.homeDirectory =
|
||||
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Merge dynamic Hyprland configs with existing xdg.configFile
|
||||
xdg.configFile = {
|
||||
# Your existing manual configs (if any)
|
||||
}
|
||||
// hyprlandConfs;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user