obsidian and signal: sharp font on wayland

This commit is contained in:
Daniel Langbein 2024-01-02 10:56:15 +01:00
parent add329e728
commit eda1964476
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
2 changed files with 19 additions and 4 deletions

View File

@ -6,10 +6,6 @@
# export LD_LIBRARY_PATH=$(nix --extra-experimental-features nix-command --extra-experimental-features flakes build --print-out-paths --no-link nixpkgs#libGL)/lib # export LD_LIBRARY_PATH=$(nix --extra-experimental-features nix-command --extra-experimental-features flakes build --print-out-paths --no-link nixpkgs#libGL)/lib
# obsidian # obsidian
# TODO: Only if on wayland and display scaling != 1
# To have sharp font, start obsidian with:
# obsidian --enable-features=UseOzonePlatform --ozone-platform=x11
# This `config` is only for "stable" `nixpkgs`, not for "unstable". # This `config` is only for "stable" `nixpkgs`, not for "unstable".
# See nur-and-unstable.nix # See nur-and-unstable.nix
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ # nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
@ -24,4 +20,8 @@
unstable.obsidian # Markdown notes unstable.obsidian # Markdown notes
]; ];
}; };
# TODO: if on wayland and scaling != 1
# Sharp fonts.
# obsidian --enable-features=UseOzonePlatform --ozone-platform=x11
} }

View File

@ -8,4 +8,19 @@
# Signal does also use the NIXOS_OZONE_WL variable to enable Wayland support. # Signal does also use the NIXOS_OZONE_WL variable to enable Wayland support.
environment.sessionVariables.NIXOS_OZONE_WL = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) "1"; environment.sessionVariables.NIXOS_OZONE_WL = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) "1";
# TODO: if on wayland and scaling != 1
# Sharp fonts.
nixpkgs.overlays = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) [
(self: super: {
signal-desktop = super.signal-desktop.overrideAttrs (old: {
preFixup = (old.preFixup or "") + ''
gappsWrapperArgs+=(
--add-flags "--enable-features=UseOzonePlatform"
--add-flags "--ozone-platform=x11"
)
'';
});
})
];
} }