Files
nixos/Droidnix/generated/modules/traveldroid/system/hypridle.nix
T
2026-04-19 18:30:28 +02:00

43 lines
1.1 KiB
Nix

# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
basePath = "${flakeRoot}/generated/.config";
assetPath = "${flakeRoot}/generated/.config/hypr";
in
{
#################################
# Install hypridle system-wide
#################################
environment.systemPackages = [ pkgs.hypridle ];
#################################
# Deploy config
#################################
home-manager.users = {
${username} = {
home.file = {
".config/hypr/hypridle.conf" = {
text = builtins.readFile "${assetPath}/hypridle.conf";
force = true;
};
};
};
};
#################################
# Systemd user service
#################################
systemd.user.services.hypridle = {
description = "Hypridle (Hyprland idle daemon)";
after = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.hypridle}/bin/hypridle";
Restart = "always";
};
wantedBy = [ "default.target" ];
};
}