diff --git a/flake.lock b/flake.lock index d1b8fb2..8f2b399 100644 --- a/flake.lock +++ b/flake.lock @@ -64,11 +64,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1751123364, - "narHash": "sha256-Nb3pxs1onnbdhhnoNc+IfHzrW9dM+UbEdjK0AguR2J4=", + "lastModified": 1753816554, + "narHash": "sha256-eyFfBXb5IJaNTGTdkjpWKSMTs8wiJ0i+9n5jUKtVFa4=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "f6d1c274b9c0e095dc0a1b411dec7410ad779bf5", + "rev": "c78d32074ebab14d2060e5cd3c7667cbe37ab8ee", "type": "github" }, "original": { @@ -84,11 +84,11 @@ ] }, "locked": { - "lastModified": 1750792728, - "narHash": "sha256-Lh3dopA8DdY+ZoaAJPrtkZOZaFEJGSYjOdAYYgOPgE4=", + "lastModified": 1753592768, + "narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=", "owner": "nix-community", "repo": "home-manager", - "rev": "366f00797b1efb70f2882d3da485e3c10fd3d557", + "rev": "fc3add429f21450359369af74c2375cb34a2d204", "type": "github" }, "original": { @@ -129,11 +129,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1750969886, - "narHash": "sha256-zW/OFnotiz/ndPFdebpo3X0CrbVNf22n4DjN2vxlb58=", + "lastModified": 1753749649, + "narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a676066377a2fe7457369dd37c31fd2263b662f4", + "rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a", "type": "github" }, "original": { @@ -170,7 +170,8 @@ "zig": { "inputs": { "flake-compat": [ - "ghostty" + "ghostty", + "flake-compat" ], "flake-utils": [ "ghostty", @@ -216,8 +217,8 @@ }, "original": { "owner": "jcollie", - "ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613", "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", "type": "github" } } diff --git a/home/default.nix b/home/default.nix index c463789..e5797e7 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,4 +1,5 @@ { + config, lib, pkgs, userName, @@ -13,7 +14,7 @@ }; in { # Import sub modules - imports = map (module: import module {inherit lib pkgs dirs userName userEmail ghostty;}) [ + imports = map (module: import module {inherit config lib pkgs dirs userName userEmail ghostty;}) [ ./atuin.nix ./shell.nix ./packages @@ -27,6 +28,7 @@ in { ./browser.nix ./zellij.nix ./bat.nix + ./obsidian.nix ]; # Home Manager needs a bit of information about you and the @@ -56,7 +58,7 @@ in { size = 22; }; - stateVersion = "24.11"; + stateVersion = "25.05"; }; # Let Home Manager install and manage itself. diff --git a/home/obsidian.nix b/home/obsidian.nix new file mode 100644 index 0000000..fcb4471 --- /dev/null +++ b/home/obsidian.nix @@ -0,0 +1,52 @@ +{ config, 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" ]; + # # }; + # }; + + home.activation.obsidianRepos = config.lib.dag.entryAfter ["writeBoundary"] '' + REPOS_DIR="${config.home.homeDirectory}/Documents/obsidian" + + # Create the repos directory if it doesn't exist + mkdir -p "$REPOS_DIR" + + # Function to clone or update a repository + clone_or_update() { + local repo_url="$1" + local vault_name="$2" + local vault_path="$REPOS_DIR/$vault_name" + + if [ -d "$vault_path/.git" ]; then + echo "Updating existing vault: $vault_name" + cd "$vault_path" + ${pkgs.git}/bin/git pull origin main || ${pkgs.git}/bin/git pull origin master || true + else + echo "Cloning new vault: $vault_name" + rm -rf "$vault_path" # Remove if exists but not a git repo + ${pkgs.git}/bin/git clone "$repo_url" "$vault_path" || true + fi + } + + # Clone repositories + clone_or_update "https://scm.wyattjmiller.com/NoteFolio/notes.git" "notes" + clone_or_update "https://scm.wyattjmiller.com/NoteFolio/work-notes.git" "work-notes" + + echo "Obsidian repository vaults setup complete in $REPOS_DIR" + ''; +} diff --git a/home/packages/common.nix b/home/packages/common.nix index 03034f2..6377240 100644 --- a/home/packages/common.nix +++ b/home/packages/common.nix @@ -23,7 +23,6 @@ fh aria2 yt-dlp - obsidian vscode weechat inetutils diff --git a/home/sway.nix b/home/sway.nix index 5778135..b4261af 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -149,17 +149,17 @@ in { systemd.enable = true; package = pkgs.waybar.overrideAttrs (old: { - version = "0.11.0"; + version = "0.13.0"; src = pkgs.fetchFromGitHub { owner = "Alexays"; repo = "Waybar"; - rev = "d56dd6ee7fdf8c5ba4e90790af62b7f7829d3a47"; + rev = "0fcda9afa519eb84deda68c051f7938a6c6bdbce"; sha256 = "sha256-3lc0voMU5RS+mEtxKuRayq/uJO09X7byq6Rm5NZohq8="; fetchSubmodules = true; }; - buildInputs = old.buildInputs ++ [ pkgs.fftw pkgs.libcava ]; + # buildInputs = old.buildInputs ++ [ pkgs.fftw libcava ]; # mesonFlags = (old.mesonFlags or []) ++ [ "-Dcava=disabled" ]; }); }; diff --git a/modules/machine/cloud/configuration.nix b/modules/machine/cloud/configuration.nix index 1ec6029..c8f8673 100644 --- a/modules/machine/cloud/configuration.nix +++ b/modules/machine/cloud/configuration.nix @@ -11,7 +11,6 @@ "info.beyondallreason.bar" "io.dbeaver.DBeaverCommunity" "io.openrct2.OpenRCT2" - "md.obsidian.Obsidian" "org.prismlauncher.PrismLauncher" "sh.cider.Cider" ];