Files
nixos/Droidnix/generated/hyprland/hyprland.nix
T
2026-03-15 12:22:41 +00:00

45 lines
1.1 KiB
Nix

{
config,
pkgs,
lib,
user,
flakeRoot,
...
}:
let
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
files = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr");
in
{
# NixOS: Enable Hyprland
programs.hyprland = {
enable = true;
};
# Home Manager: Hyprland-specific configurations
home-manager.users.${user.username} = {
home.stateVersion = config.home-manager.users.${user.username}.stateVersion or "25.11";
home.username = user.username;
home.homeDirectory =
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
wayland.windowManager.hyprland = {
enable = true;
};
# Create symlinks for all files in assets/hyprland/conf/hypr
xdg.configFile = {
"hypr/.keep" = {
text = "";
};
};
# Add activation script to create symlinks
system.activationScripts.hyprlandLinks = ''
mkdir -p ~/.config/hypr/
ln -sf ${flakeRoot}/assets/hyprland/conf/hypr/* ~/.config/hypr/
'';
};
}