1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-02-12 19:25:05 +01:00

{hypridle, hyrpaper}: remove with lib; ()

* hypridle: remove with lib;

* hyprpaper: remove with lib;
This commit is contained in:
Austin Horstman 2025-01-18 11:35:49 -06:00 committed by GitHub
parent 1c75a4c151
commit 97d7946b5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 22 deletions

View file

@ -1,15 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.hypridle;
let cfg = config.services.hypridle;
in {
meta.maintainers = [ maintainers.khaneliman maintainers.fufexan ];
meta.maintainers = with lib.maintainers; [ khaneliman fufexan ];
options.services.hypridle = {
enable = mkEnableOption "Hypridle, Hyprland's idle daemon";
enable = lib.mkEnableOption "Hypridle, Hyprland's idle daemon";
package = mkPackageOption pkgs "hypridle" { };
package = lib.mkPackageOption pkgs "hypridle" { };
settings = lib.mkOption {
type = with lib.types;
@ -65,8 +62,8 @@ in {
};
};
config = mkIf cfg.enable {
xdg.configFile."hypr/hypridle.conf" = mkIf (cfg.settings != { }) {
config = lib.mkIf cfg.enable {
xdg.configFile."hypr/hypridle.conf" = lib.mkIf (cfg.settings != { }) {
text = lib.hm.generators.toHyprconf {
attrs = cfg.settings;
inherit (cfg) importantPrefixes;
@ -81,12 +78,12 @@ in {
Description = "hypridle";
After = [ config.wayland.systemd.target ];
PartOf = [ config.wayland.systemd.target ];
X-Restart-Triggers = mkIf (cfg.settings != { })
X-Restart-Triggers = lib.mkIf (cfg.settings != { })
[ "${config.xdg.configFile."hypr/hypridle.conf".source}" ];
};
Service = {
ExecStart = "${getExe cfg.package}";
ExecStart = "${lib.getExe cfg.package}";
Restart = "always";
RestartSec = "10";
};

View file

@ -1,15 +1,12 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.hyprpaper;
let cfg = config.services.hyprpaper;
in {
meta.maintainers = [ maintainers.khaneliman maintainers.fufexan ];
meta.maintainers = with lib.maintainers; [ khaneliman fufexan ];
options.services.hyprpaper = {
enable = mkEnableOption "Hyprpaper, Hyprland's wallpaper daemon";
enable = lib.mkEnableOption "Hyprpaper, Hyprland's wallpaper daemon";
package = mkPackageOption pkgs "hyprpaper" { };
package = lib.mkPackageOption pkgs "hyprpaper" { };
settings = lib.mkOption {
type = with lib.types;
@ -59,8 +56,8 @@ in {
};
};
config = mkIf cfg.enable {
xdg.configFile."hypr/hyprpaper.conf" = mkIf (cfg.settings != { }) {
config = lib.mkIf cfg.enable {
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf (cfg.settings != { }) {
text = lib.hm.generators.toHyprconf {
attrs = cfg.settings;
inherit (cfg) importantPrefixes;
@ -75,12 +72,12 @@ in {
Description = "hyprpaper";
After = [ config.wayland.systemd.target ];
PartOf = [ config.wayland.systemd.target ];
X-Restart-Triggers = mkIf (cfg.settings != { })
X-Restart-Triggers = lib.mkIf (cfg.settings != { })
[ "${config.xdg.configFile."hypr/hyprpaper.conf".source}" ];
};
Service = {
ExecStart = "${getExe cfg.package}";
ExecStart = "${lib.getExe cfg.package}";
Restart = "always";
RestartSec = "10";
};