Working on bindings

This commit is contained in:
2026-03-08 00:10:43 +01:00
parent 5244b334b9
commit 45dd985cd1
3 changed files with 366 additions and 391 deletions
+14 -23
View File
@@ -1,29 +1,12 @@
{
config,
pkgs,
lib,
user,
inputs,
flakeRoot,
...
}:
{ config, pkgs, lib, user, flakeRoot, ... }:
let
hyprlandConf = builtins.readFile (flakeRoot + "/assets/hyprland/conf/hyprland.conf");
userConfig = import (flakeRoot + "/assets/flake/users/henrov.nix");
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}";
});
in
{
# Nix settings to use Hyprland's cache for packages
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
# Install Hyprland and enable it as the window manager
environment.systemPackages = with pkgs; [ hyprland ];
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Hyprland-specific Home Manager configurations
home-manager.users.${user.username} = {
@@ -31,5 +14,13 @@ in
home.username = userConfig.username;
home.homeDirectory = userConfig.homeDirectory;
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
wayland.windowManager.hyprland = {
enable = true;
};
};
# Dynamically deploy all files in assets/hyprland/conf/
xdg.configFile = hyprlandConfs // {
inherit hyprlandConfigDir;
};
}