Working on bindings
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
lib,
|
lib,
|
||||||
user,
|
user,
|
||||||
flakeRoot,
|
flakeRoot,
|
||||||
|
userConfig,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -11,29 +12,31 @@ let
|
|||||||
# Dynamically read all files in assets/hyprland/conf/
|
# Dynamically read all files in assets/hyprland/conf/
|
||||||
hyprlandConfs =
|
hyprlandConfs =
|
||||||
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf"))
|
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf"))
|
||||||
(
|
(name: {
|
||||||
name: "hypr/${name}" # Prepend "hypr/" to deploy files to ~/.config/hypr/
|
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}";
|
||||||
);
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# NixOS: Enable Hyprland (optional, if you want to set it as the default session)
|
# NixOS: Enable Hyprland (optional)
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hyprland-specific Home Manager configurations
|
# Home Manager: Hyprland-specific configurations
|
||||||
home-manager.users.${user.username} = {
|
home-manager.users.${user.username} = {
|
||||||
home.stateVersion = userConfig.stateVersion;
|
home.stateVersion = userConfig.stateVersion;
|
||||||
home.username = userConfig.username;
|
home.username = userConfig.username;
|
||||||
home.homeDirectory = userConfig.homeDirectory;
|
home.homeDirectory = userConfig.homeDirectory;
|
||||||
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Dynamically deploy all Hyprland config files
|
# Merge dynamic Hyprland configs with existing xdg.configFile
|
||||||
xdg.configFile = lib.genAttrs hyprlandConfs (path: {
|
xdg.configFile = {
|
||||||
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${lib.stringReplace "hypr/" "" path}";
|
# Your existing manual configs (if any)
|
||||||
});
|
# "hypr/hyprland.conf".text = "...";
|
||||||
|
}
|
||||||
|
// hyprlandConfs; # Merge dynamic configs here
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user