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
|
let
|
||||||
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
|
hyprlandFiles = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/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}";
|
|
||||||
});
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# NixOS: Enable Hyprland (optional)
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Home Manager: Hyprland-specific configurations
|
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
# Use config.home-manager.users.${user.username} instead of userConfig
|
home.stateVersion = "25.11";
|
||||||
home.stateVersion = config.home-manager.users.${user.username}.stateVersion or "25.11"; # Default fallback
|
home.username = user.username;
|
||||||
home.username = user.username; # Use the 'user' argument
|
|
||||||
home.homeDirectory =
|
home.homeDirectory =
|
||||||
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
||||||
|
|
||||||
@@ -814,12 +805,18 @@ in
|
|||||||
enable = true;
|
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 = {
|
xdg.configFile = {
|
||||||
"hypr/.keep" = {
|
"hypr/.keep" = {
|
||||||
text = "";
|
text = "";
|
||||||
};
|
};
|
||||||
} // hyprlandConfs;
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
EDITOR = "emacs";
|
EDITOR = "emacs";
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
||||||
};
|
};
|
||||||
|
/*
|
||||||
# Home Manager file management
|
# Home Manager file management
|
||||||
home.file = {
|
home.file = {
|
||||||
"emacs/early-init.el" = {
|
"emacs/early-init.el" = {
|
||||||
@@ -88,5 +88,6 @@
|
|||||||
target = ".emacs.d/init.el";
|
target = ".emacs.d/init.el";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user