Working on bindings

This commit is contained in:
2026-03-08 00:18:23 +01:00
parent 6ea59f7417
commit 505c95646a
2 changed files with 384 additions and 354 deletions
+353 -338
View File
File diff suppressed because it is too large Load Diff
+31 -16
View File
@@ -546,33 +546,48 @@ This is top file of this level which contains just an import statement for all r
** =generated/hyprland/hyprland.nix= ** =generated/hyprland/hyprland.nix=
The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure. The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.
#+BEGIN_SRC nix :tangle generated/hyprland/hyprland.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/hyprland/hyprland.nix :noweb tangle :mkdirp yes :eval never-html
{ config, pkgs, lib, user, flakeRoot, ... }: {
config,
pkgs,
lib,
user,
flakeRoot,
...
}:
let let
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr"; hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
# Get a list of all files in the conf directory # Dynamically read all files in assets/hyprland/conf/
hyprlandConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf")) (name: { hyprlandConfs =
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}"; lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf"))
}); (name: {
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}";
});
in in
{ {
# NixOS: Enable Hyprland (optional)
programs.hyprland = {
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; # Use config.home-manager.users.${user.username} instead of userConfig
home.username = userConfig.username; home.stateVersion = config.home-manager.users.${user.username}.stateVersion or "23.11"; # Default fallback
home.homeDirectory = userConfig.homeDirectory; home.username = user.username; # Use the 'user' argument
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf; home.homeDirectory =
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
}; };
# Merge dynamic Hyprland configs with existing xdg.configFile
xdg.configFile = {
# Your existing manual configs (if any)
}
// hyprlandConfs;
}; };
# Dynamically deploy all files in assets/hyprland/conf/
xdg.configFile = hyprlandConfs // {
inherit hyprlandConfigDir;
};
} }
#+END_SRC #+END_SRC
** =generated/mangowc/top.nix= ** =generated/mangowc/top.nix=