1 { config, lib, pkgs, ... }:
4 cfg = config.services.fractalart;
6 options.services.fractalart = {
11 description = "Enable FractalArt for generating colorful wallpapers on login";
15 type = types.nullOr types.int;
18 description = "Screen width";
22 type = types.nullOr types.int;
25 description = "Screen height";
29 config = mkIf cfg.enable {
30 environment.systemPackages = [ pkgs.haskellPackages.FractalArt ];
31 services.xserver.displayManager.sessionCommands =
32 "${pkgs.haskellPackages.FractalArt}/bin/FractalArt --no-bg -f .background-image"
33 + optionalString (cfg.width != null) " -w ${toString cfg.width}"
34 + optionalString (cfg.height != null) " -h ${toString cfg.height}";