Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obsidian Configuration Module #6321

Open
athyfr opened this issue Jan 15, 2025 · 0 comments
Open

Obsidian Configuration Module #6321

athyfr opened this issue Jan 15, 2025 · 0 comments
Assignees

Comments

@athyfr
Copy link

athyfr commented Jan 15, 2025

Description

Obsidian note-taking app has a LOT of configuration that can be done, and it's all stored in configuration files.

The hardest/most unusual part is that most everything is self-contained in the 'vaults', but that should be easy to account for.

It's hard to sync configuration (and things like that) for multiple vaults without it being supported by home-manager, which is tiresome.

It could be something like this:

programs.obsidian = {
  enable = true;
  package = pkgs.obsidian;
  vaults = {
    obsidian-vault = {
      enable = true;

      path = "~/Documents/obsidian-vault"; # This would be the default. (Based on the name)
    
      community-plugins = {
        # List of plugin names translate to vault/.obsidian/community-plugins.json:
        # [ "plugin-1", "plugin-2" ]
        
        obsidian-style-settings = {
          enable = true;
          config = {
            # Configuration in here would translate to
            # vault/.obsidian/plugins/obsidian-style-settings/data.json
          };
        };
      };
      
      core-plugins = {
        # Format in vault/.obsidian/core-plugins.json is different:
        # { "plugin-1": true, "plugin-2": false }
        
        file-explorer = {
          enable = true;
          config = {
            # Configuration here would translate to
            # vault/.obsidian/plugins/file-explorer/data.json
          };
        };
      };

      extraConfig = {
        app = { # Directly translates to vault/.obsidian/app.json
        };
        appearance = { # Directly translates to vault/.obsidian/appearance.json
        };
        # etc.
      };
    };
  };
}

Note that Obsidian may not behave well without write access. (I think)

A few explicitly defined options for convenience, with most of the configuration defined automatically (using JSON)

If someone has better ideas for how to lay it out, that's all okay. I'm a beginner, so the example above may not conform to home-manager standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants