More niri styling
This commit is contained in:
56
modules/home/desktop-environments/niri/swww.nix
Normal file
56
modules/home/desktop-environments/niri/swww.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.desktop-environments.niri.swww;
|
||||
in {
|
||||
options = {
|
||||
settings.desktop-environments.niri.swww.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable swww wallpapers deamon
|
||||
'';
|
||||
default = config.settings.desktop-environments.niri.enable;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
swaybg
|
||||
];
|
||||
|
||||
systemd.user.services.swaybg = {
|
||||
Unit = {
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
Requisite = [ "graphical-session.target" ];
|
||||
Description = "Enable swaybg wallpaper management";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "niri.service"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = ''${pkgs.swaybg}/bin/swaybg -m fill -i "%h/nix/assets/wallpaper-2-blurred.png"'';
|
||||
Restart = ''on-failure'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.swww = {
|
||||
Unit = {
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
Requisite = [ "graphical-session.target" ];
|
||||
Description = "Enable swww wallpaper management";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "niri.service"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = ''${pkgs.swww}/bin/swww-daemon'';
|
||||
Restart = ''on-failure'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user