{ pkgs, lib, ... }: { home.packages = with pkgs; [ swaybg ]; xdg.configFile."niri/live.kdl".text = ""; home.file."config" = let kdlfiles = lib.mapAttrsToList (filename: _value: "include \"${./niri/kdl}/${filename}\"") (lib.filterAttrs (key: value: value == "regular") (builtins.readDir ./niri/kdl)); startups = map (it: "spawn-at-startup ${it}") (map (lib.concatStringsSep " ") (map (map (word: "\"${word}\"")) [ ["touch" ".config/niri/live.kdl"] ])); other = [ "include \"live.kdl\"" ]; in { target = ".config/niri/config.kdl"; text = lib.concatLines (startups ++ kdlfiles ++ other); }; }