diff --git a/Droidnix/README.org b/Droidnix/README.org index de6fb91f1..779ca3d71 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -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 diff --git a/Droidnix/generated/system/applications/terminal_shell/emacs.nix b/Droidnix/generated/system/applications/terminal_shell/emacs.nix index 37436623a..d610e9a2b 100644 --- a/Droidnix/generated/system/applications/terminal_shell/emacs.nix +++ b/Droidnix/generated/system/applications/terminal_shell/emacs.nix @@ -76,7 +76,7 @@ EDITOR = "emacs"; XDG_SCREENSHOTS_DIR = "~/screenshots"; }; - + /* # Home Manager file management home.file = { "emacs/early-init.el" = { @@ -88,5 +88,6 @@ target = ".emacs.d/init.el"; }; }; + */ }; }