diff --git a/flake.nix b/flake.nix index 9b6f461..8f37ec3 100644 --- a/flake.nix +++ b/flake.nix @@ -2,11 +2,16 @@ description = "Wyatt's nix configuration suite"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.6.0"; home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager-unstable = { + url = "https://github.com/nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; darwin = { url = "github:lnl7/nix-darwin/nix-darwin-25.05"; inputs.nixpkgs.follows = "nixpkgs"; @@ -17,9 +22,11 @@ outputs = inputs @ { self, nixpkgs, + nixpkgs-unstable, nix-flatpak, darwin, home-manager, + home-manager-unstable, ghostty, ... }: let @@ -28,6 +35,10 @@ extraSpecialArgs = { inherit userName userEmail ghostty; }; + + obsidianOverlay = final: prev: { + obsidian = nixpkgs-unstable.legacyPackages.${final.system}.obsidian; + }; in { meta = import ./meta; @@ -66,6 +77,10 @@ ./modules/common ./modules/machine/cloud + { + nixpkgs.overlays = [ obsidianOverlay ]; + } + home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/home/obsidian.nix b/home/obsidian.nix index fcb4471..0b86429 100644 --- a/home/obsidian.nix +++ b/home/obsidian.nix @@ -1,24 +1,25 @@ -{ config, pkgs, ...}: { +{ config, home-manager-unstable, pkgs, ...}: { home.packages = with pkgs; [ obsidian obsidian-export ]; - # programs.obsidian = { - # enable = true; - # vaults = { - # "notes" = { - # enable = true; - # target = "${config.home.homeDirectory}/Documents/obsidian/notes"; - # }; - # "work-notes" = { - # enable = true; - # target = "${config.home.homeDirectory}/Documents/obsidian/work-notes"; - # }; - # }; - # # defaultSettings = { - # # themes = [ "catppuccin" ]; - # # }; - # }; + programs.obsidian = { + enable = true; + package = + vaults = { + "notes" = { + enable = true; + target = "${config.home.homeDirectory}/Documents/obsidian/notes"; + }; + "work-notes" = { + enable = true; + target = "${config.home.homeDirectory}/Documents/obsidian/work-notes"; + }; + }; + # defaultSettings = { + # themes = [ "catppuccin" ]; + # }; + }; home.activation.obsidianRepos = config.lib.dag.entryAfter ["writeBoundary"] '' REPOS_DIR="${config.home.homeDirectory}/Documents/obsidian"