fix systemd env for wpd

This commit is contained in:
Ivan Kirilov Dimitrov 2024-08-01 23:24:07 +02:00
parent 096d73470d
commit 0f4d3087f6
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294
3 changed files with 4 additions and 3 deletions

View File

@ -443,7 +443,7 @@ toplevel@{ moduleWithSystem, ... }: {
services = {
wpd = {
Install = { WantedBy = [ "sway-session.target" ]; };
Unit = { Description = "Restart bingwp and wpd services"; After = "graphical-session-pre.target"; PartOf = "graphical-session.target"; };
Unit = { Description = "Switch background every x minutes"; After = "graphical-session-pre.target"; PartOf = "graphical-session.target"; };
Service = {
ExecStart = [ "${pkgs.wpd}/bin/wpd" ];
};

View File

@ -19,7 +19,7 @@ top@{ moduleWithSystem, ... }: {
time.timeZone = "Europe/Prague";
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
environment = {
systemPackages = with pkgs; [ cmatrix uutils-coreutils cryptsetup fd file git glibc gnumake mlocate moreutils openssh openssl procs ripgrep srm unzip vim zip just ];
systemPackages = with pkgs; [ cmatrix uutils-coreutils-noprefix cryptsetup fd file git glibc gnumake mlocate openssh openssl procs ripgrep srm unzip vim zip just ];
shells = with pkgs; [ zsh nushell ];
};
programs = { zsh.enable = true; nix-ld.enable = true; dconf.enable = true; };

View File

@ -10,7 +10,8 @@ top@{ inputs, ... }: {
};
wpd = pkgs.writeShellApplication {
name = "wpd";
runtimeInputs = with pkgs; [ swaybg xdg-utils fd ];
runtimeInputs = with pkgs; [ swaybg xdg-user-dirs fd uutils-coreutils-noprefix ];
runtimeEnv = { WAYLAND_DISPLAY = "wayland-1"; };
text = ''
random_pic () {
bg_dir="$(xdg-user-dir PICTURES)/bg"