Add some personal obsidian configs
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
...
|
||||
}:
|
||||
let
|
||||
version = "7.7.7";
|
||||
|
||||
css = builtins.fetchurl {
|
||||
url = "https://github.com/kepano/obsidian-minimal/releases/download/${version}/theme.css";
|
||||
sha256 = "sha256:1j7w6dsl20fbpzy9ldplf658qhg5ka1bkd2a8ac9q4n15lbqnp3a";
|
||||
};
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "obsidian.themes.minimal";
|
||||
|
||||
src = builtins.fetchurl {
|
||||
url = "https://github.com/kepano/obsidian-minimal/releases/download/${version}/manifest.json";
|
||||
sha256 = "sha256:1hcp8kpzkb2hdj520mqdaar9dh0fcaqwcgji7dd1ws37yzw44kc5";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp $src $out/manifest.json
|
||||
cp ${css} $out/theme.css
|
||||
'';
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
...
|
||||
}:
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.themes.minimal";
|
||||
version = "7.7.7";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kepano";
|
||||
repo = "obsidian-minimal";
|
||||
rev = "${version}";
|
||||
hash = "sha256-Atb9ZVou4EkfppV7VvTEMG/UruKlADctbXL1M8vvhxQ=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-PzsZv/On8ci6EkF3WE4aez3/jQu5AqyJxFUzJk+Pn0c=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [ sass ];
|
||||
|
||||
buildPhase = ''
|
||||
npx grunt cssmin
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ./manifest.json $out/manifest.json
|
||||
cp ./theme.css $out/theme.css
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user