# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- { pkgs, lib, ... }: { environment.systemPackages = [ pkgs.onlyoffice-desktopeditors ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ]; fonts.packages = with pkgs; [ corefonts ]; # Automatically copy corefonts to ~/.local/share/fonts for ONLYOFFICE systemd.user.services.onlyoffice-fonts = { description = "Copy corefonts to user font directory for ONLYOFFICE"; wantedBy = [ "default.target" ]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; }; script = '' mkdir -p $HOME/.local/share/fonts cp -f ${pkgs.corefonts}/share/fonts/truetype/* $HOME/.local/share/fonts/ chmod 644 $HOME/.local/share/fonts/* ${pkgs.fontconfig}/bin/fc-cache -f $HOME/.local/share/fonts ''; }; }