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=
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
{ config, pkgs, lib, user, flakeRoot, ... }:
{
config,
pkgs,
lib,
user,
flakeRoot,
...
}:
let
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
# Get a list of all files in the conf directory
hyprlandConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf")) (name: {
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}";
});
# Dynamically read all files in assets/hyprland/conf/
hyprlandConfs =
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf"))
(name: {
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}";
});
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.stateVersion = userConfig.stateVersion;
home.username = userConfig.username;
home.homeDirectory = userConfig.homeDirectory;
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
# Use config.home-manager.users.${user.username} instead of userConfig
home.stateVersion = config.home-manager.users.${user.username}.stateVersion or "23.11"; # Default fallback
home.username = user.username; # Use the 'user' argument
home.homeDirectory =
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
wayland.windowManager.hyprland = {
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
** =generated/mangowc/top.nix=