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

54 lines
1.2 KiB
Nix

{
config,
pkgs,
lib,
user,
flakeRoot,
...
}:
let
hyprlandFiles = builtins.attrNames (
builtins.filter (name: name != "hyprland.conf") (
builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr"
)
);
in
{
# Basic Hyprland configuration
programs.hyprland = {
enable = true;
# Disable the default config to avoid conflicts
extraConfig = "";
};
# Home Manager configuration
home-manager.users.${user.username} = {
home.stateVersion = "25.11";
home.username = user.username;
home.homeDirectory =
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
wayland.windowManager.hyprland = {
enable = true;
# Use our custom config file instead of the default
settings = {
configFile = "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf";
};
};
# Create config directory and all other files
xdg.configFile = {
"hypr/.keep" = {
text = "";
};
};
# Create symlinks for all other files except hyprland.conf
home.file = lib.genAttrs hyprlandFiles (name: {
target = ".config/hypr/${name}";
source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
});
};
}