finding hyprland.conf error
This commit is contained in:
+11
-14
@@ -788,25 +788,16 @@ 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/hypr
|
||||
hyprlandConfs =
|
||||
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr"))
|
||||
(name: {
|
||||
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
|
||||
});
|
||||
hyprlandFiles = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr");
|
||||
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 "25.11"; # Default fallback
|
||||
home.username = user.username; # Use the 'user' argument
|
||||
home.stateVersion = "25.11";
|
||||
home.username = user.username;
|
||||
home.homeDirectory =
|
||||
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
||||
|
||||
@@ -814,12 +805,18 @@ in
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Ensure the Hyprland config directory exists
|
||||
# Create all files using home.file
|
||||
home.file = lib.genAttrs hyprlandFiles (name: {
|
||||
target = "/.config/hypr/${name}";
|
||||
source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
|
||||
});
|
||||
|
||||
# Create the directory structure
|
||||
xdg.configFile = {
|
||||
"hypr/.keep" = {
|
||||
text = "";
|
||||
};
|
||||
} // hyprlandConfs;
|
||||
};
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
Reference in New Issue
Block a user