mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-26 03:34:35 +00:00
Add hyprpaper
This commit is contained in:
parent
842b009f84
commit
73c7b503ad
|
@ -1,5 +1,6 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [
|
imports = [
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
|
./hyprpaper.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
34
home/services/hyprpaper.nix
Normal file
34
home/services/hyprpaper.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
osConfig,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf getExe;
|
||||||
|
|
||||||
|
cfg = osConfig.myOptions.home-manager.services.hyprpaper;
|
||||||
|
cfgIsWayland = osConfig.myOptions.home-manager.wms.isWayland;
|
||||||
|
in {
|
||||||
|
config = mkIf (cfg.enable && cfgIsWayland) {
|
||||||
|
systemd.user.services.hyprpaper = {
|
||||||
|
Install.WantedBy = [ "hyprland-session.target" ];
|
||||||
|
Unit = {
|
||||||
|
Description = "Hyprpaper (Hyprland wallpaper daemon)";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${getExe pkgs.hyprpaper}";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||||
|
preload=${cfg.wallpaperPath}
|
||||||
|
wallpaper=,${cfg.wallpaperPath} # same wallpaper on all monitors
|
||||||
|
ipc=off
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -217,6 +217,12 @@
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
dunst.enable = true;
|
dunst.enable = true;
|
||||||
|
hyprpaper = {
|
||||||
|
enable = true;
|
||||||
|
# This file intentionally lacks a file extension, it should be a symlink
|
||||||
|
# to whatever file you wish to actually be your wallpaper
|
||||||
|
wallpaperPath = "/data/Data/Media/Pictures/Wallpapers/active";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,6 +4,14 @@ in
|
||||||
{
|
{
|
||||||
options.myOptions.home-manager.services = {
|
options.myOptions.home-manager.services = {
|
||||||
dunst.enable = mkEnableOption "Dunst (lightweight notification daemon)";
|
dunst.enable = mkEnableOption "Dunst (lightweight notification daemon)";
|
||||||
|
hyprpaper = {
|
||||||
|
enable = mkEnableOption "Hyprpaper (Hyprland wallpaper daemon)";
|
||||||
|
wallpaperPath = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = null;
|
||||||
|
description = "Path to the wallpaper of your choosing";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue