nix-git/modules/obsidian.nix

28 lines
1.0 KiB
Nix
Raw Normal View History

2023-11-28 15:23:44 +01:00
{ config, pkgs, lib, ... }:
{
2024-01-01 16:21:47 +01:00
# TODO.
# As of 01.01.2024, the Electron version of Obsidian does not find some GL libraries.
# Temporary workaround (https://github.com/NixOS/nixpkgs/issues/268490#issuecomment-1817991394):
# export LD_LIBRARY_PATH=$(nix --extra-experimental-features nix-command --extra-experimental-features flakes build --print-out-paths --no-link nixpkgs#libGL)/lib
# obsidian
2023-11-28 15:23:44 +01:00
2024-01-01 16:21:47 +01:00
# This `config` is only for "stable" `nixpkgs`, not for "unstable".
# See nur-and-unstable.nix
# nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# "obsidian"
# ];
2023-11-28 15:23:44 +01:00
2024-01-01 16:21:47 +01:00
# TODO go back to stable nixpkgs.
# As of 01.01.2024, obsidian did not start on Wayland and it is using an insecure Electron version.
# Thus, we are currently running it from unstable.
2023-11-28 15:23:44 +01:00
users.users.yoda = {
packages = with pkgs; [
2024-01-01 16:21:47 +01:00
unstable.obsidian # Markdown notes
2023-11-28 15:23:44 +01:00
];
};
# TODO: if on wayland and scaling != 1
# Sharp fonts.
# obsidian --enable-features=UseOzonePlatform --ozone-platform=x11
2023-11-28 15:23:44 +01:00
}