Skip to content

Commit

Permalink
feat(nix): add obsidian module
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Feb 20, 2024
1 parent b837b99 commit e7a98d9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion home/modules/app/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
}
23 changes: 23 additions & 0 deletions home/modules/app/obsidian.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
1 change: 1 addition & 0 deletions system/nixos/hosts/wrath/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
app = {
alacritty.fontSize = 8;
ghostty.enable = true;
obsidian.enable = true;
wezterm.fontSize = 12;
obs.enable = true;
};
Expand Down

0 comments on commit e7a98d9

Please sign in to comment.