diff --git a/home/modules/app/default.nix b/home/modules/app/default.nix index 6a4c9e1f..946f9851 100644 --- a/home/modules/app/default.nix +++ b/home/modules/app/default.nix @@ -1,5 +1,5 @@ { ... }: { - imports = [ ./ghostty ./alacritty.nix ./discord.nix ./firefox.nix ./kitty.nix ./obs.nix ./wezterm.nix ]; + imports = [ ./ghostty ./alacritty.nix ./discord.nix ./firefox.nix ./kitty.nix ./obs.nix ./obsidian.nix ./wezterm.nix ]; } diff --git a/home/modules/app/obsidian.nix b/home/modules/app/obsidian.nix new file mode 100644 index 00000000..42642cd4 --- /dev/null +++ b/home/modules/app/obsidian.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.nyx.modules.app.obsidian; + obsidian = lib.throwIf (lib.versionOlder "1.4.16" pkgs.obsidian.version) "Obsidian no longer requires EOL Electron" ( + pkgs.obsidian.override { + electron = pkgs.electron_25.overrideAttrs (_: { + preFixup = "patchelf --add-needed ${pkgs.libglvnd}/lib/libEGL.so.1 $out/bin/electron"; # NixOS/nixpkgs#272912 + meta.knownVulnerabilities = [ ]; # NixOS/nixpkgs#273611 + }); + } + ); +in +{ + options.nyx.modules.app.obsidian = { + enable = mkEnableOption "Note taking application"; + }; + + config = mkIf cfg.enable { + home.packages = [ obsidian ]; + }; +} diff --git a/system/nixos/hosts/wrath/home.nix b/system/nixos/hosts/wrath/home.nix index 9e59299f..ad70d8ac 100644 --- a/system/nixos/hosts/wrath/home.nix +++ b/system/nixos/hosts/wrath/home.nix @@ -12,6 +12,7 @@ app = { alacritty.fontSize = 8; ghostty.enable = true; + obsidian.enable = true; wezterm.fontSize = 12; obs.enable = true; };