Files
nixos/Droidnix/generated/modules/desktop/hyprland.nix
T
2026-03-20 10:26:57 +00:00

75 lines
1.8 KiB
Nix

{ lib, config, ... }:
let
moduleName = "hyprland";
username = config.defaultUser or "henrov";
# Path to hyprland assets
assetPath = ../../../assets/hyprland/conf/hypr;
# Main config
mainConfigPath = "${assetPath}/hypr.hyprland.conf";
enableProgram = config.enableHyprland or false;
in
{
# --- Option ---
options.enableHyprland = lib.mkEnableOption "Enable Hyprland desktop";
# --- ExtraFragment for aggregator ---
{ lib, config, ... }:
let
moduleName = "hyprland";
username = config.defaultUser or "henrov";
# Path to hyprland assets
assetPath = ../../../assets/hyprland/conf/hypr;
# Main config
mainConfigPath = "${assetPath}/hypr.hyprland.conf";
enableProgram = config.enableHyprland or false;
in
{
# --- Option ---
options.enableHyprland = lib.mkEnableOption "Enable Hyprland desktop";
# --- ExtraFragment for aggregator ---
homeManagerExtraUserFragment = lib.mkIf enableProgram {
${username} = {
wayland.windowManager.hyprland = {
enable = true;
# Minimal example setting
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
};
# Deploy the main config file
xdg.configFile = {
"hypr/hyprland.conf".text = builtins.readFile mainConfigPath;
};
};
};
} = lib.mkIf enableProgram {
${username} = {
home.stateVersion = "26.05";
home.username = username;
home.homeDirectory = "/home/${username}";
wayland.windowManager.hyprland = {
enable = true;
# Minimal example setting
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
};
# Deploy the main config file
xdg.configFile = {
"hypr/hyprland.conf".text = builtins.readFile mainConfigPath;
};
};
};
}