nix-git/modules/obsidian.nix

37 lines
1.3 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-02-04 14:52:59 +01:00
# TODO: if on wayland and scaling != 1, start obsidian with the following command.
# Sharp fonts.
# obsidian --enable-features=UseOzonePlatform --ozone-platform=x11
2024-01-01 16:21:47 +01:00
# This `config` is only for "stable" `nixpkgs`, not for "unstable".
2024-02-04 14:52:59 +01:00
# See nur-and-unstable.nix for how to configure "unstable" `nixpkgs`.
2024-01-01 16:21:47 +01:00
# 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.
2024-02-04 14:52:59 +01:00
# - As of 2024-01-01, obsidian did not start on Wayland
# - As of 2024-02-03, obsidian is using an insecure Electron version.
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
];
};
2024-02-04 15:07:37 +01:00
programs.dconf.enable = true;
home-manager.users.yoda = { osConfig, config, pkgs, lib, ... }: {
dconf.settings = {
"org/gnome/shell" = {
favorite-apps = ["obsidian.desktop"];
};
};
};
2023-11-28 15:23:44 +01:00
}