wip: added obsidian
but waybar failed to build
This commit is contained in:
@@ -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.
|
||||
|
52
home/obsidian.nix
Normal file
52
home/obsidian.nix
Normal file
@@ -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"
|
||||
'';
|
||||
}
|
@@ -23,7 +23,6 @@
|
||||
fh
|
||||
aria2
|
||||
yt-dlp
|
||||
obsidian
|
||||
vscode
|
||||
weechat
|
||||
inetutils
|
||||
|
@@ -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" ];
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user