Refactor packages
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -17,6 +17,8 @@ NixOS dotfiles and configuration for various hosts and users.
|
||||
- [`gui/`](./hosts/common/configs/user/gui): GUI-related settings.
|
||||
- `<name>/`: Individual host configurations.
|
||||
|
||||
- [`packages/`](./packages/): Custom packages.
|
||||
|
||||
- `secrets/<namespace>/`: Global secrets for individual namespaces that apply across all hosts.
|
||||
|
||||
- [`lib/`](./lib): Nix library function definitions and utilities.
|
||||
|
30
flake.lock
generated
30
flake.lock
generated
@@ -31,11 +31,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739969582,
|
||||
"narHash": "sha256-ni6tM12mzArohqzvscZn/N52GHiXZsskN6yMYzo25XI=",
|
||||
"lastModified": 1740081950,
|
||||
"narHash": "sha256-h6RFLln99Br7o0TmtKE+vd6F2PQiGBIrRobf4Ld2wRA=",
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"rev": "a0de1526d2de8a02feec1cba4086f284ec9f6098",
|
||||
"rev": "3620d51bc6c23ada1bd4b7c9cf1c458c138e68df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -115,11 +115,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740068813,
|
||||
"narHash": "sha256-8GRcU5uERvZDT/XNyI73ozHSBLrEmCdC0zgEY+Jff2s=",
|
||||
"lastModified": 1740348184,
|
||||
"narHash": "sha256-NnMzG2GYQJRrFTjvZBkaIE41EBekaMfIWiiEvxhvUTU=",
|
||||
"owner": "karaolidis",
|
||||
"repo": "home-manager",
|
||||
"rev": "4d6357dad7350b01339955acb690c57026eacee2",
|
||||
"rev": "6db31ab82b2b0d6bad4691a238073401120f673c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -131,11 +131,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1740070152,
|
||||
"narHash": "sha256-sTFYmNhrBogFEAQ0DnpDMR+aZ+7cjV2XamgPIaqO3kI=",
|
||||
"lastModified": 1740344707,
|
||||
"narHash": "sha256-6jzcaIMnVZjFIDB8jVCxeKehtgfhukmDAAAOyh/Qi6c=",
|
||||
"owner": "karaolidis",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6abb8f6d73fe6b7e9870f0ccc11a96958590b645",
|
||||
"rev": "d44556fd1331b9599764e86d618e2eb5b9362162",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -156,11 +156,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740062783,
|
||||
"narHash": "sha256-t+SH36EoF9vj/bTiqp71upfy0vdQgSM6WhtThiLBCxs=",
|
||||
"lastModified": 1740344228,
|
||||
"narHash": "sha256-AHqpsqI3CMAnyksdCBicBKyN9cwbwA6utx1C6abYei4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "86b71ef14fff48d7c19097bfee104ddc72a977a9",
|
||||
"rev": "62e7b43cd95735a6e730f4b9eee09d100d08614a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -238,11 +238,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739870849,
|
||||
"narHash": "sha256-FonprUB9oHn4BPBWpLPU18yu0QH0tRaworCiB3T1qF4=",
|
||||
"lastModified": 1740339146,
|
||||
"narHash": "sha256-N9O5JH22rmuRchqNmg+Jeiv067++WU1kyJqtLgB+rKI=",
|
||||
"owner": "karaolidis",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "984d59248f4100327953048ea2710633cd87332c",
|
||||
"rev": "3af70e8bc9b010845918be273f20de2cd34af046",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
14
flake.nix
14
flake.nix
@@ -167,20 +167,10 @@
|
||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||
in
|
||||
{
|
||||
devShells = {
|
||||
bun = import ./hosts/common/shells/bun { inherit pkgs; };
|
||||
c = import ./hosts/common/shells/c { inherit pkgs; };
|
||||
go = import ./hosts/common/shells/go { inherit pkgs; };
|
||||
java = import ./hosts/common/shells/java { inherit pkgs; };
|
||||
nix = import ./hosts/common/shells/nix { inherit pkgs; };
|
||||
nodejs = import ./hosts/common/shells/nodejs { inherit pkgs; };
|
||||
python = import ./hosts/common/shells/python { inherit pkgs; };
|
||||
rust = import ./hosts/common/shells/rust { inherit pkgs; };
|
||||
};
|
||||
|
||||
devShells = import ./hosts/common/shells { inherit pkgs; };
|
||||
packages = import ./packages { inherit pkgs; };
|
||||
formatter = treefmt.config.build.wrapper;
|
||||
checks.formatting = treefmt.config.build.check self;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
12
hosts/common/configs/system/nix-update/default.nix
Normal file
12
hosts/common/configs/system/nix-update/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
nix-update = prev.nix-update.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [ ./source-attribute.patch ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ nix-update ];
|
||||
}
|
127
hosts/common/configs/system/nix-update/source-attribute.patch
Normal file
127
hosts/common/configs/system/nix-update/source-attribute.patch
Normal file
@@ -0,0 +1,127 @@
|
||||
diff --git a/nix_update/__init__.py b/nix_update/__init__.py
|
||||
index 89bbe45..93f9322 100644
|
||||
--- a/nix_update/__init__.py
|
||||
+++ b/nix_update/__init__.py
|
||||
@@ -124,6 +124,12 @@ def parse_args(args: list[str]) -> Options:
|
||||
default=[],
|
||||
)
|
||||
|
||||
+ parser.add_argument(
|
||||
+ "--src-attr",
|
||||
+ help="Src attribute",
|
||||
+ default="src",
|
||||
+ )
|
||||
+
|
||||
a = parser.parse_args(args)
|
||||
extra_flags = ["--extra-experimental-features", "flakes nix-command"]
|
||||
if a.system:
|
||||
@@ -146,6 +152,7 @@ def parse_args(args: list[str]) -> Options:
|
||||
version=a.version,
|
||||
version_preference=VersionPreference.from_str(a.version),
|
||||
attribute=a.attribute,
|
||||
+ source_attribute=a.src_attr,
|
||||
test=a.test,
|
||||
version_regex=a.version_regex,
|
||||
review=a.review,
|
||||
diff --git a/nix_update/eval.py b/nix_update/eval.py
|
||||
index 1767056..f85ea69 100644
|
||||
--- a/nix_update/eval.py
|
||||
+++ b/nix_update/eval.py
|
||||
@@ -105,12 +105,19 @@ class Package:
|
||||
def eval_expression(
|
||||
escaped_import_path: str,
|
||||
attr: str,
|
||||
+ source_attr: str,
|
||||
flake: bool,
|
||||
system: str | None,
|
||||
override_filename: str | None,
|
||||
) -> str:
|
||||
system = f'"{system}"' if system else "builtins.currentSystem"
|
||||
|
||||
+ source_attrs = source_attr.rpartition(".")
|
||||
+ source_attr_last = source_attrs[-1] or source_attr
|
||||
+ source_attr_all_but_last = (
|
||||
+ f".{source_attrs[0]}" if source_attr_last != source_attr else ""
|
||||
+ )
|
||||
+
|
||||
if flake:
|
||||
sanitize_position = (
|
||||
f"""
|
||||
@@ -164,8 +171,8 @@ let
|
||||
raw_version_position
|
||||
else if pkg ? isPhpExtension then
|
||||
raw_version_position
|
||||
- else if (builtins.unsafeGetAttrPos "src" pkg) != null then
|
||||
- sanitizePosition (builtins.unsafeGetAttrPos "src" pkg)
|
||||
+ else if (builtins.unsafeGetAttrPos "{source_attr_last}" pkg) != null then
|
||||
+ sanitizePosition (builtins.unsafeGetAttrPos "{source_attr_last}" pkg{source_attr_all_but_last})
|
||||
else
|
||||
sanitizePosition (positionFromMeta pkg);
|
||||
in {{
|
||||
@@ -174,11 +181,11 @@ in {{
|
||||
inherit raw_version_position;
|
||||
filename = position.file;
|
||||
line = position.line;
|
||||
- urls = pkg.src.urls or null;
|
||||
- url = pkg.src.url or null;
|
||||
- rev = pkg.src.rev or null;
|
||||
- tag = pkg.src.tag or null;
|
||||
- hash = pkg.src.outputHash or null;
|
||||
+ urls = pkg.{source_attr}.urls or null;
|
||||
+ url = pkg.{source_attr}.url or null;
|
||||
+ rev = pkg.{source_attr}.rev or null;
|
||||
+ tag = pkg.{source_attr}.tag or null;
|
||||
+ hash = pkg.{source_attr}.outputHash or null;
|
||||
go_modules = pkg.goModules.outputHash or null;
|
||||
go_modules_old = pkg.go-modules.outputHash or null;
|
||||
cargo_deps = pkg.cargoDeps.outputHash or null;
|
||||
@@ -205,7 +212,7 @@ in {{
|
||||
mix_deps = pkg.mixFodDeps.outputHash or null;
|
||||
tests = builtins.attrNames (pkg.passthru.tests or {{}});
|
||||
has_update_script = {has_update_script};
|
||||
- src_homepage = pkg.src.meta.homepage or null;
|
||||
+ src_homepage = pkg.{source_attr}.meta.homepage or null;
|
||||
changelog = pkg.meta.changelog or null;
|
||||
maintainers = pkg.meta.maintainers or null;
|
||||
}}"""
|
||||
@@ -215,6 +222,7 @@ def eval_attr(opts: Options) -> Package:
|
||||
expr = eval_expression(
|
||||
opts.escaped_import_path,
|
||||
opts.escaped_attribute,
|
||||
+ opts.source_attribute,
|
||||
opts.flake,
|
||||
opts.system,
|
||||
opts.override_filename,
|
||||
diff --git a/nix_update/options.py b/nix_update/options.py
|
||||
index 2d07b77..ab5c305 100644
|
||||
--- a/nix_update/options.py
|
||||
+++ b/nix_update/options.py
|
||||
@@ -8,6 +8,7 @@ from .version.version import VersionPreference
|
||||
@dataclass
|
||||
class Options:
|
||||
attribute: str
|
||||
+ source_attribute: str = "src"
|
||||
flake: bool = False
|
||||
version: str = "stable"
|
||||
version_preference: VersionPreference = VersionPreference.STABLE
|
||||
@@ -33,4 +34,7 @@ class Options:
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
self.escaped_attribute = ".".join(map(json.dumps, self.attribute.split(".")))
|
||||
+ self.escaped_source_attribute = ".".join(
|
||||
+ map(json.dumps, self.source_attribute.split("."))
|
||||
+ )
|
||||
self.escaped_import_path = json.dumps(self.import_path)
|
||||
diff --git a/nix_update/update.py b/nix_update/update.py
|
||||
index 82b7bc5..464bf3d 100644
|
||||
--- a/nix_update/update.py
|
||||
+++ b/nix_update/update.py
|
||||
@@ -155,7 +155,7 @@ def git_prefetch(x: tuple[str, tuple[str, str]]) -> tuple[str, str]:
|
||||
|
||||
|
||||
def update_src_hash(opts: Options, filename: str, current_hash: str) -> None:
|
||||
- target_hash = nix_prefetch(opts, "src")
|
||||
+ target_hash = nix_prefetch(opts, opts.source_attribute)
|
||||
replace_hash(filename, current_hash, target_hash)
|
||||
|
||||
|
@@ -14,10 +14,13 @@
|
||||
];
|
||||
};
|
||||
|
||||
registry.self.flake = inputs.self;
|
||||
channel.enable = false;
|
||||
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
|
||||
registry.self.flake = inputs.self;
|
||||
|
||||
extraOptions = ''
|
||||
!include ${config.sops.secrets."nix/accessTokens/github".path}
|
||||
'';
|
||||
|
@@ -9,7 +9,12 @@
|
||||
|
||||
environment = {
|
||||
persistence."/persist"."/etc/ssh/ssh_host_ed25519_key" = { };
|
||||
systemPackages = with pkgs; [ sops ];
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
sops
|
||||
age
|
||||
ssh-to-age
|
||||
];
|
||||
};
|
||||
|
||||
sops.age = {
|
||||
|
@@ -7,8 +7,12 @@
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
@@ -19,12 +23,15 @@
|
||||
systemd.enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
inputs.ags.packages.${pkgs.system}.hyprland
|
||||
inputs.ags.packages.${pkgs.system}.tray
|
||||
inputs.ags.packages.${system}.hyprland
|
||||
inputs.ags.packages.${system}.tray
|
||||
sassc
|
||||
hyprland
|
||||
nixos-icons
|
||||
(pkgs.callPackage ../cliphist/rofi.nix { })
|
||||
(import ../cliphist/rofi.nix {
|
||||
rofi = hmConfig.programs.rofi.finalPackage;
|
||||
inherit lib pkgs;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
|
@@ -43,12 +43,13 @@ in
|
||||
finalPackage = mkOption {
|
||||
type = package;
|
||||
description = "The clipbook rofi package.";
|
||||
default = pkgs.callPackage ./rofi.nix {
|
||||
default = import ./rofi.nix {
|
||||
rofi = config.programs.rofi.finalPackage;
|
||||
bookmarks = builtins.mapAttrs (_: bookmark: {
|
||||
type = if bookmark.source != null then "file" else "text";
|
||||
content = if bookmark.source != null then bookmark.source else bookmark.text;
|
||||
}) cfg.bookmarks;
|
||||
inherit lib pkgs;
|
||||
};
|
||||
readOnly = true;
|
||||
};
|
||||
|
@@ -70,7 +70,10 @@ in
|
||||
wayland.windowManager.hyprland.settings.bind =
|
||||
let
|
||||
cliphist-rofi = lib.meta.getExe (
|
||||
pkgs.callPackage ./rofi.nix { rofi = hmConfig.programs.rofi.finalPackage; }
|
||||
import ./rofi.nix {
|
||||
rofi = hmConfig.programs.rofi.finalPackage;
|
||||
inherit pkgs lib;
|
||||
}
|
||||
);
|
||||
cliphist = lib.meta.getExe pkgs.cliphist;
|
||||
in
|
||||
|
@@ -2,8 +2,15 @@
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
@@ -23,71 +30,60 @@ in
|
||||
"/cache"."${home}/.cache/darktable" = { };
|
||||
};
|
||||
|
||||
home-manager.users.${user} =
|
||||
let
|
||||
lua-scripts = pkgs.fetchFromGitHub {
|
||||
owner = "darktable-org";
|
||||
repo = "lua-scripts";
|
||||
rev = "daa0877b4c25b91e4b71afc1ef8ffcba6018f7b2";
|
||||
hash = "sha256-NNGAq1zgKqWLhKBPgm7kFZq4xwvescxnCAwovSF9r4k=";
|
||||
};
|
||||
|
||||
hald-clut = pkgs.fetchFromGitHub {
|
||||
owner = "cedeber";
|
||||
repo = "hald-clut";
|
||||
rev = "3b3180f82d4dcea1e6e8c5648473539a910d7f49";
|
||||
hash = "sha256-R8vyYmcsfk49QsSV3v0QblXcO6U0oIfDyxbHPLwSMdo=";
|
||||
};
|
||||
in
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
home-manager.users.${user} = {
|
||||
home = {
|
||||
packages =
|
||||
with pkgs;
|
||||
with selfPkgs;
|
||||
[
|
||||
darktable
|
||||
exiftool
|
||||
(pkgs.callPackage ./publish { })
|
||||
darktable-ghost-cms-publish
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
GHOST_URL = "https://photos.karaolidis.com";
|
||||
GHOST_ADMIN_API_KEY_PATH = hmConfig.sops.secrets."jupiter/photos.karaolidis.com/admin".path;
|
||||
};
|
||||
sessionVariables = {
|
||||
GHOST_URL = "https://photos.karaolidis.com";
|
||||
GHOST_ADMIN_API_KEY_PATH = hmConfig.sops.secrets."jupiter/photos.karaolidis.com/admin".path;
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"darktable/darktablerc".source = (pkgs.formats.keyValue { }).generate "darktablerc" {
|
||||
"compress_xmp_tags" = "never";
|
||||
"database/create_snapshot" = "once a day";
|
||||
"rating_one_double_tap" = true;
|
||||
"run_crawler_on_start" = true;
|
||||
"ui_last/theme" = "darktable-elegant-darker";
|
||||
"ui_last/grouping" = true;
|
||||
"plugins/darkroom/lut3d/def_path" = "${home}/.config/darktable/luts";
|
||||
"opencl" = false;
|
||||
"plugins/lighttable/overlays/1/0" = 0;
|
||||
"plugins/lighttable/overlays/1/1" = 3;
|
||||
"plugins/lighttable/overlays/1/2" = 3;
|
||||
"plugins/darkroom/modulegroups/last_preset" = "modules: all";
|
||||
"session/base_directory_pattern" = "${home}/Pictures/Darktable";
|
||||
"session/filename_pattern" =
|
||||
"$(EXIF.YEAR)-$(EXIF.MONTH)-$(EXIF.DAY)_$(EXIF.HOUR)-$(EXIF.MINUTE)-$(EXIF.SECOND)_$(CONFLICT_PADDING).$(FILE_EXTENSION)";
|
||||
"session/sub_directory_pattern" = "";
|
||||
"setup_import_directory" = true;
|
||||
"lua/script_manager/check_update" = false;
|
||||
};
|
||||
|
||||
"darktable/luarc".text = ''
|
||||
require "tools/script_manager"
|
||||
require "tools/publish"
|
||||
'';
|
||||
|
||||
"darktable/lua/lib".source = "${lua-scripts}/lib";
|
||||
"darktable/lua/tools/script_manager.lua".source = "${lua-scripts}/tools/script_manager.lua";
|
||||
"darktable/lua/tools/publish.lua".source = ./publish/publish.lua;
|
||||
|
||||
"darktable/luts".source = "${hald-clut}/HaldCLUT";
|
||||
};
|
||||
|
||||
sops.secrets."jupiter/photos.karaolidis.com/admin".sopsFile =
|
||||
../../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"darktable/darktablerc".source = (pkgs.formats.keyValue { }).generate "darktablerc" {
|
||||
"compress_xmp_tags" = "never";
|
||||
"database/create_snapshot" = "once a day";
|
||||
"rating_one_double_tap" = true;
|
||||
"run_crawler_on_start" = true;
|
||||
"ui_last/theme" = "darktable-elegant-darker";
|
||||
"ui_last/grouping" = true;
|
||||
"plugins/darkroom/lut3d/def_path" = "${home}/.config/darktable/luts";
|
||||
"opencl" = false;
|
||||
"plugins/lighttable/overlays/1/0" = 0;
|
||||
"plugins/lighttable/overlays/1/1" = 3;
|
||||
"plugins/lighttable/overlays/1/2" = 3;
|
||||
"plugins/darkroom/modulegroups/last_preset" = "modules: all";
|
||||
"session/base_directory_pattern" = "${home}/Pictures/Darktable";
|
||||
"session/filename_pattern" =
|
||||
"$(EXIF.YEAR)-$(EXIF.MONTH)-$(EXIF.DAY)_$(EXIF.HOUR)-$(EXIF.MINUTE)-$(EXIF.SECOND)_$(CONFLICT_PADDING).$(FILE_EXTENSION)";
|
||||
"session/sub_directory_pattern" = "";
|
||||
"setup_import_directory" = true;
|
||||
"lua/script_manager/check_update" = false;
|
||||
};
|
||||
|
||||
"darktable/luarc".text = ''
|
||||
require "tools/script_manager"
|
||||
require "tools/publish"
|
||||
'';
|
||||
|
||||
"darktable/lua/lib".source = "${selfPkgs.darktable-lua-scripts}/lib";
|
||||
"darktable/lua/tools/script_manager.lua".source =
|
||||
"${selfPkgs.darktable-lua-scripts}/tools/script_manager.lua";
|
||||
"darktable/lua/tools/publish.lua".source =
|
||||
"${selfPkgs.darktable-ghost-cms-publish}/lib/darktable-ghost-cms-publish/publish.lua";
|
||||
|
||||
"darktable/luts".source = selfPkgs.darktable-hald-clut;
|
||||
};
|
||||
|
||||
sops.secrets."jupiter/photos.karaolidis.com/admin".sopsFile =
|
||||
../../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
}
|
||||
|
@@ -1,2 +0,0 @@
|
||||
node_modules/
|
||||
build/
|
Binary file not shown.
@@ -1,29 +0,0 @@
|
||||
{ pkgs, lib, ... }:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "darktable-publish";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
|
||||
npmSrc = pkgs.buildNpmPackage ({
|
||||
inherit src pname version;
|
||||
npmDepsHash = "sha256-vBJIIuryC/zRvp9oKBVuCDTycPOpzgsLebU55CiIb7I=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . $out
|
||||
'';
|
||||
});
|
||||
|
||||
# FIXME: https://github.com/NixOS/nixpkgs/issues/255890
|
||||
wrapper = pkgs.writeShellApplication {
|
||||
name = pname;
|
||||
runtimeInputs = with pkgs; [ bun ];
|
||||
text = ''
|
||||
bun ${npmSrc}/src/index.ts "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${lib.meta.getExe wrapper} $out/bin/
|
||||
'';
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
{ files: ["**/*.{js,mjs,cjs,ts}"] },
|
||||
{ languageOptions: { globals: globals.browser } },
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
];
|
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "publish",
|
||||
"module": "src/index.ts",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.17.0",
|
||||
"@types/bun": "latest",
|
||||
"@types/jsonwebtoken": "^9.0.7",
|
||||
"eslint": "^9.17.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"globals": "^15.14.0",
|
||||
"prettier": "^3.4.2",
|
||||
"typescript-eslint": "^8.18.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": "^12.1.0",
|
||||
"exiftool-vendored": "^29.0.0",
|
||||
"jsonwebtoken": "^9.0.2"
|
||||
}
|
||||
}
|
@@ -1,133 +0,0 @@
|
||||
local dt = require "darktable"
|
||||
local df = require "lib/dtutils.file"
|
||||
local os = require "os"
|
||||
|
||||
-- Some fucking bullshit happening right here.
|
||||
function os.capture(command, raw)
|
||||
local f = assert(io.popen(command, 'r'))
|
||||
local s = assert(f:read('*a'))
|
||||
f:close()
|
||||
if raw then return s end
|
||||
s = string.gsub(s, '^%s+', '')
|
||||
s = string.gsub(s, '%s+$', '')
|
||||
s = string.gsub(s, '[\n\r]+', ' ')
|
||||
return s
|
||||
end
|
||||
|
||||
local publish_title = dt.new_widget("entry") {
|
||||
placeholder = "Post Title",
|
||||
tooltip = "enter title for the post"
|
||||
}
|
||||
|
||||
local publish_slug = dt.new_widget("entry") {
|
||||
placeholder = "post-slug",
|
||||
tooltip = "enter slug for the post (URL-friendly)"
|
||||
}
|
||||
|
||||
local publish_keywords = dt.new_widget("entry") {
|
||||
placeholder = "keywords (space-separated)",
|
||||
tooltip = "enter keywords (tags) for the post"
|
||||
}
|
||||
|
||||
local strip_gps_checkbox = dt.new_widget("check_button") {
|
||||
label = "Strip GPS data",
|
||||
value = false,
|
||||
tooltip = "remove GPS metadata from files before uploading"
|
||||
}
|
||||
|
||||
local widget = dt.new_widget("box") {
|
||||
orientation = "vertical",
|
||||
publish_title,
|
||||
publish_slug,
|
||||
publish_keywords,
|
||||
strip_gps_checkbox
|
||||
}
|
||||
|
||||
local function initialize(_, _, images, _, extra_data)
|
||||
extra_data.exported_files = {}
|
||||
extra_data.cleanup_files = {}
|
||||
|
||||
if publish_title.text == "" then
|
||||
extra_data.title = df.get_basename(images[1].filename)
|
||||
else
|
||||
extra_data.title = publish_title.text
|
||||
end
|
||||
|
||||
if publish_slug.text == "" then
|
||||
extra_data.slug = df.get_basename(images[1].filename)
|
||||
else
|
||||
extra_data.slug = publish_slug.text
|
||||
end
|
||||
|
||||
extra_data.keywords = publish_keywords.text
|
||||
extra_data.strip_gps = strip_gps_checkbox.value
|
||||
|
||||
return images
|
||||
end
|
||||
|
||||
local function store(_, image, _, filename, _, _, _, extra_data)
|
||||
if extra_data.strip_gps then
|
||||
local command = string.format("exiftool -gps:all= -overwrite_original '%s'", filename)
|
||||
os.execute(command)
|
||||
end
|
||||
|
||||
if image.is_raw then
|
||||
local original_path = image.path .. "/" .. image.filename
|
||||
local raw_filename = original_path
|
||||
|
||||
if extra_data.strip_gps then
|
||||
local tmpfile = os.tmpname()
|
||||
local command = string.format("exiftool -gps:all= -o '%s' '%s'", tmpfile, original_path)
|
||||
os.execute(command)
|
||||
table.insert(extra_data.cleanup_files, tmpfile)
|
||||
raw_filename = tmpfile
|
||||
end
|
||||
|
||||
table.insert(extra_data.exported_files, filename .. ":" .. raw_filename)
|
||||
else
|
||||
table.insert(extra_data.exported_files, filename)
|
||||
end
|
||||
end
|
||||
|
||||
local function finalize(_, _, extra_data)
|
||||
local files_arg = table.concat(extra_data.exported_files, " ")
|
||||
|
||||
local command = string.format(
|
||||
"darktable-publish --title '%s' --slug '%s' %s",
|
||||
extra_data.title, extra_data.slug, files_arg
|
||||
)
|
||||
if extra_data.keywords ~= "" then
|
||||
command = command .. string.format(" --keywords %s", extra_data.keywords)
|
||||
end
|
||||
|
||||
-- Ignore that I use an external tool (written in JavaScript god forbid)
|
||||
-- I am _not_ doing JSON generation and web requests in Lua
|
||||
local result = os.capture(command)
|
||||
|
||||
if result and result:match("^http") then
|
||||
dt.print("Post published: " .. result)
|
||||
else
|
||||
dt.print("Failed to publish post.")
|
||||
end
|
||||
|
||||
local command = string.format("xdg-open %s", result)
|
||||
os.execute(command)
|
||||
|
||||
for _, tmpfile in ipairs(extra_data.cleanup_files) do
|
||||
os.remove(tmpfile)
|
||||
end
|
||||
end
|
||||
|
||||
local function supported(_, _)
|
||||
return true
|
||||
end
|
||||
|
||||
dt.register_storage(
|
||||
"ghost_publish",
|
||||
"publish to Ghost CMS",
|
||||
store,
|
||||
finalize,
|
||||
supported,
|
||||
initialize,
|
||||
widget
|
||||
)
|
@@ -1,110 +0,0 @@
|
||||
import { sign } from "jsonwebtoken";
|
||||
import { file } from "bun";
|
||||
|
||||
const getAdminApiKey = async () => {
|
||||
const keyPath = process.env.GHOST_ADMIN_API_KEY_PATH;
|
||||
if (!keyPath) {
|
||||
throw new Error(
|
||||
"Environment variable GHOST_ADMIN_API_KEY_PATH is not set.",
|
||||
);
|
||||
}
|
||||
|
||||
const keyFile = file(keyPath);
|
||||
if (!(await keyFile.exists())) {
|
||||
throw new Error(`Key file not found at path: ${keyPath}`);
|
||||
}
|
||||
|
||||
return await keyFile.text();
|
||||
};
|
||||
|
||||
const getEndpoint = () => {
|
||||
const endpoint = process.env.GHOST_URL;
|
||||
if (!endpoint) {
|
||||
throw new Error("Environment variable GHOST_URL is not set.");
|
||||
}
|
||||
|
||||
return endpoint;
|
||||
};
|
||||
|
||||
const createJwt = (key: string) => {
|
||||
const [id, secret] = key.split(":");
|
||||
if (!id || !secret) {
|
||||
throw new Error("Invalid API key format. Expected format: {id}:{secret}");
|
||||
}
|
||||
|
||||
return sign({}, Buffer.from(secret, "hex"), {
|
||||
keyid: id,
|
||||
algorithm: "HS256",
|
||||
expiresIn: "5m",
|
||||
audience: `/admin/`,
|
||||
});
|
||||
};
|
||||
|
||||
const upload = async (
|
||||
slug: string,
|
||||
path: string,
|
||||
type: string | undefined,
|
||||
): Promise<any> => {
|
||||
const endpoint = getEndpoint();
|
||||
const fullEndpoint = `${endpoint}${slug}`;
|
||||
|
||||
const key = await getAdminApiKey();
|
||||
const token = createJwt(key);
|
||||
|
||||
const f = Bun.file(path, { type });
|
||||
const formData = new FormData();
|
||||
formData.append("file", f);
|
||||
|
||||
const response = await fetch(fullEndpoint, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Ghost ${token}`,
|
||||
},
|
||||
body: formData,
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(
|
||||
`Failed to upload to ${fullEndpoint}: ${response.status} ${response.statusText}`,
|
||||
);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
};
|
||||
|
||||
export const uploadImage = async (imagePath: string): Promise<string> => {
|
||||
const slug = `/ghost/api/admin/images/upload`;
|
||||
return (await upload(slug, imagePath, "image/jpeg")).images[0].url;
|
||||
};
|
||||
|
||||
export const uploadFile = async (filePath: string): Promise<string> => {
|
||||
const slug = `/ghost/api/admin/files/upload`;
|
||||
return (await upload(slug, filePath, undefined)).files[0].url;
|
||||
};
|
||||
|
||||
export const uploadPost = async (post: any): Promise<string> => {
|
||||
const endpoint = getEndpoint();
|
||||
const fullEndpoint = `${endpoint}/ghost/api/admin/posts`;
|
||||
|
||||
const key = await getAdminApiKey();
|
||||
const token = createJwt(key);
|
||||
|
||||
const response = await fetch(fullEndpoint, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Ghost ${token}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
posts: [post],
|
||||
}),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(
|
||||
`Failed to upload to ${fullEndpoint}: ${response.status} ${response.statusText}`,
|
||||
);
|
||||
}
|
||||
|
||||
return (await response.json()).posts[0].url;
|
||||
};
|
@@ -1,48 +0,0 @@
|
||||
import { exiftool } from "exiftool-vendored";
|
||||
import type { FileInfo } from "./files";
|
||||
|
||||
export interface ShootingConditions {
|
||||
make: string;
|
||||
model: string;
|
||||
lensMake: string;
|
||||
lensModel: string;
|
||||
focalLength: string;
|
||||
focalLength35: string;
|
||||
shutterSpeed: string;
|
||||
fStop: string;
|
||||
iso: string;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export const extractShootingConditions = async (
|
||||
fileInfo: FileInfo,
|
||||
): Promise<ShootingConditions> => {
|
||||
const path = fileInfo.rawPath ?? fileInfo.jpegPath;
|
||||
|
||||
try {
|
||||
const exifData = await exiftool.read(path);
|
||||
|
||||
return {
|
||||
make: exifData.Make ?? "Unknown",
|
||||
model: exifData.Model ?? "Unknown",
|
||||
lensMake: exifData.LensMake ?? "Unknown",
|
||||
lensModel: exifData.LensModel ?? "Unknown",
|
||||
focalLength: exifData.FocalLength ?? "Unknown",
|
||||
focalLength35: exifData.FocalLengthIn35mmFormat ?? "Unknown",
|
||||
shutterSpeed: exifData.ExposureTime ?? "Unknown",
|
||||
fStop: exifData.FNumber?.toString() ?? "Unknown",
|
||||
iso: exifData.ISO?.toString() ?? "Unknown",
|
||||
timestamp: new Date(
|
||||
(exifData.CreateDate?.toString() as string).replace(/\./g, ":"),
|
||||
).toISOString(),
|
||||
};
|
||||
} catch (error: any) {
|
||||
throw new Error(
|
||||
`Failed to extract EXIF data from ${path}: ${error.message}`,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export const createImageCaption = (exif: ShootingConditions) => {
|
||||
return `${exif.make} ${exif.model}, ${exif.lensMake} ${exif.lensModel} @ ${exif.focalLength} (${exif.focalLength35}), ${exif.shutterSpeed} s, f/${exif.fStop}, ISO ${exif.iso}`;
|
||||
};
|
@@ -1,66 +0,0 @@
|
||||
import { basename, extname } from "path";
|
||||
|
||||
export interface FileInfo {
|
||||
jpegPath: string;
|
||||
jpegSize: number;
|
||||
rawPath?: string;
|
||||
rawSize?: number;
|
||||
}
|
||||
|
||||
export const getBasenameWithoutExtension = (path: string): string => {
|
||||
const base = basename(path);
|
||||
const extension = extname(path);
|
||||
return base.slice(0, -extension.length);
|
||||
};
|
||||
|
||||
export const getBasenameWithExtension = (path: string): string => {
|
||||
return basename(path);
|
||||
};
|
||||
|
||||
export const prepareFiles = async (files: string[]): Promise<FileInfo[]> => {
|
||||
if (files.length > 10) {
|
||||
throw new Error("Up to 10 files are allowed at a time.");
|
||||
}
|
||||
|
||||
const parsedFiles: FileInfo[] = [];
|
||||
|
||||
for (const pair of files) {
|
||||
const parts = pair.split(/(?<!\\):/);
|
||||
const jpegPath = parts[0].replace(/\\:/g, ":");
|
||||
const rawPath = parts[1]?.replace(/\\:/g, ":");
|
||||
|
||||
const jpegFile = Bun.file(jpegPath);
|
||||
if (!(await jpegFile.exists())) {
|
||||
throw new Error(`JPEG file not found: ${jpegPath}`);
|
||||
}
|
||||
|
||||
const jpegSize = jpegFile.size;
|
||||
|
||||
if (!rawPath) {
|
||||
parsedFiles.push({
|
||||
jpegPath,
|
||||
jpegSize,
|
||||
rawPath: undefined,
|
||||
rawSize: undefined,
|
||||
});
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
const rawFile = Bun.file(rawPath);
|
||||
if (!(await rawFile.exists())) {
|
||||
throw new Error(`RAW file not found: ${rawPath}`);
|
||||
}
|
||||
|
||||
const rawSize = rawFile.size;
|
||||
|
||||
parsedFiles.push({
|
||||
jpegPath,
|
||||
jpegSize,
|
||||
rawPath: rawPath,
|
||||
rawSize: rawSize,
|
||||
});
|
||||
}
|
||||
|
||||
return parsedFiles;
|
||||
};
|
@@ -1,112 +0,0 @@
|
||||
import { Command } from "commander";
|
||||
import { createFileNode, createImageNode, createHeadingNode } from "./lexical";
|
||||
import { extractShootingConditions, createImageCaption } from "./exif";
|
||||
import { uploadFile, uploadImage, uploadPost } from "./api";
|
||||
import { getBasenameWithExtension, prepareFiles } from "./files";
|
||||
|
||||
new Command()
|
||||
.name("darktable-publish")
|
||||
.description("Publish files to GHOST CMS with optional metadata.")
|
||||
.option("-t, --title [string]", "Specify the title")
|
||||
.option("-s, --slug [string]", "Specify the slug")
|
||||
.option("-k, --keywords [string...]", "Specify blog post keywords (tags)")
|
||||
.argument("<files...>", "Files to process")
|
||||
.action(async (files, options) => {
|
||||
if (!options.title) {
|
||||
throw new Error("Please specify a title.");
|
||||
}
|
||||
|
||||
if (!options.slug) {
|
||||
throw new Error("Please specify a slug.");
|
||||
}
|
||||
|
||||
const parsedFiles = await prepareFiles(files);
|
||||
|
||||
const [
|
||||
shootingConditions,
|
||||
uploadedJpegImages,
|
||||
uploadedJpegFiles,
|
||||
uploadedRawFiles,
|
||||
] = await Promise.all([
|
||||
Promise.all(parsedFiles.map(extractShootingConditions)),
|
||||
Promise.all(parsedFiles.map((f) => uploadImage(f.jpegPath))),
|
||||
Promise.all(parsedFiles.map((f) => uploadFile(f.jpegPath))),
|
||||
Promise.all(
|
||||
parsedFiles.map((f) =>
|
||||
f.rawPath ? uploadFile(f.rawPath) : Promise.resolve(undefined),
|
||||
),
|
||||
),
|
||||
]);
|
||||
|
||||
const aggregatedFiles = parsedFiles.map((file, index) => ({
|
||||
...file,
|
||||
shootingConditions: shootingConditions[index],
|
||||
uploadedJpegImage: uploadedJpegImages[index],
|
||||
uploadedJpegFile: uploadedJpegFiles[index],
|
||||
uploadedRawFile: uploadedRawFiles[index],
|
||||
}));
|
||||
|
||||
const result: any = {
|
||||
root: {
|
||||
children: [],
|
||||
direction: "ltr",
|
||||
format: "",
|
||||
indent: 0,
|
||||
type: "root",
|
||||
version: 1,
|
||||
},
|
||||
};
|
||||
|
||||
if (aggregatedFiles.length > 1) {
|
||||
aggregatedFiles.slice(1).forEach((file) =>
|
||||
result.root.children.push(
|
||||
createImageNode({
|
||||
src: file.uploadedJpegImage,
|
||||
caption: createImageCaption(file.shootingConditions),
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
result.root.children.push(createHeadingNode("Downloads", "h2"));
|
||||
|
||||
aggregatedFiles.forEach((file) => {
|
||||
result.root.children.push(
|
||||
createFileNode({
|
||||
src: file.uploadedJpegFile,
|
||||
name: getBasenameWithExtension(file.jpegPath),
|
||||
size: file.jpegSize,
|
||||
}),
|
||||
);
|
||||
|
||||
if (file.uploadedRawFile && file.rawPath && file.rawSize) {
|
||||
result.root.children.push(
|
||||
createFileNode({
|
||||
src: file.uploadedRawFile,
|
||||
name: getBasenameWithExtension(file.rawPath),
|
||||
size: file.rawSize,
|
||||
}),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
const post = {
|
||||
title: options.title,
|
||||
slug: options.slug,
|
||||
lexical: JSON.stringify(result),
|
||||
feature_image: aggregatedFiles[0].uploadedJpegImage,
|
||||
feature_image_caption: createImageCaption(
|
||||
aggregatedFiles[0].shootingConditions,
|
||||
),
|
||||
status: "published",
|
||||
visibility: "public",
|
||||
tags: options.keywords,
|
||||
published_at: aggregatedFiles[0].shootingConditions.timestamp,
|
||||
};
|
||||
|
||||
const url = await uploadPost(post);
|
||||
console.log(url);
|
||||
|
||||
process.exit(0);
|
||||
})
|
||||
.parse();
|
@@ -1,50 +0,0 @@
|
||||
export const createTextNode = (text: string) => ({
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: "normal",
|
||||
style: "",
|
||||
text,
|
||||
type: "extended-text",
|
||||
version: 1,
|
||||
});
|
||||
|
||||
export const createHeadingNode = (text: string, level: string) => ({
|
||||
children: [createTextNode(text)],
|
||||
direction: "ltr",
|
||||
format: "",
|
||||
indent: 0,
|
||||
type: "extended-heading",
|
||||
version: 1,
|
||||
tag: level,
|
||||
});
|
||||
|
||||
export interface ImageInput {
|
||||
src: string;
|
||||
caption: string;
|
||||
}
|
||||
|
||||
export const createImageNode = (image: ImageInput) => {
|
||||
return {
|
||||
type: "image",
|
||||
version: 1,
|
||||
cardWidth: "wide",
|
||||
...image,
|
||||
};
|
||||
};
|
||||
|
||||
export interface FileInput {
|
||||
src: string;
|
||||
name: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export const createFileNode = (file: FileInput) => {
|
||||
return {
|
||||
type: "file",
|
||||
src: file.src,
|
||||
fileTitle: file.name,
|
||||
fileName: file.name,
|
||||
fileCaption: "",
|
||||
fileSize: file.size,
|
||||
};
|
||||
};
|
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
// Enable latest features
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
// Bundler mode
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"noEmit": true,
|
||||
// Best practices
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
// Some stricter flags (disabled by default)
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"noPropertyAccessFromIndexSignature": false
|
||||
}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
diff --git a/package-lock.json b/package-lock.json
|
||||
index 3fa99a5..71302ec 100644
|
||||
--- a/package-lock.json
|
||||
+++ b/package-lock.json
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codemirror/commands": "^6.1.2",
|
||||
- "@codemirror/language": "https://github.com/lishid/cm-language",
|
||||
+ "@codemirror/language": "https://github.com/karaolidis/cm-language#package-lock",
|
||||
"@codemirror/search": "^6.2.2",
|
||||
"@codemirror/state": "^6.1.2",
|
||||
"@codemirror/view": "^6.4.0",
|
||||
@@ -49,7 +49,7 @@
|
||||
},
|
||||
"node_modules/@codemirror/language": {
|
||||
"version": "6.10.1",
|
||||
- "resolved": "git+ssh://git@github.com/lishid/cm-language.git#2644bfc27afda707a7e1f3aedaf3ca7120f63cd9",
|
||||
+ "resolved": "git+ssh://git@github.com/karaolidis/cm-language.git#d6238f0a9e17e20d604cee67a47d3a93b00dd41c",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
diff --git a/package.json b/package.json
|
||||
index 2537f1e..ba6bfff 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -24,7 +24,7 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@codemirror/commands": "^6.1.2",
|
||||
- "@codemirror/language": "https://github.com/lishid/cm-language",
|
||||
+ "@codemirror/language": "https://github.com/karaolidis/cm-language#package-lock",
|
||||
"@codemirror/search": "^6.2.2",
|
||||
"@codemirror/state": "^6.1.2",
|
||||
"@codemirror/view": "^6.4.0",
|
@@ -1,24 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.map-view";
|
||||
version = "5.0.2";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "e1d2737f20e8667417b040b4dcad020aa6de84d3";
|
||||
# owner = "esm7";
|
||||
repo = "obsidian-map-view";
|
||||
# rev = version;
|
||||
hash = "sha256-Tmp8/li82BHVY3pLwi5l86NTXzfzrcRMZFMVNWiItXE=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-BsiFThkaZHQcayTuI5uvD5uD710eDVPgkANSj7Qd5S0=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ./dist/manifest.json $out/manifest.json
|
||||
cp ./dist/main.js $out/main.js
|
||||
cp ./dist/styles.css $out/styles.css
|
||||
'';
|
||||
}
|
@@ -6,9 +6,12 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
@@ -73,7 +76,7 @@ in
|
||||
|
||||
communityPlugins = [
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/better-word-count { };
|
||||
pkg = selfPkgs.obsidian-plugin-better-word-count;
|
||||
options = {
|
||||
statusBar = [
|
||||
{
|
||||
@@ -99,7 +102,7 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/custom-sort { };
|
||||
pkg = selfPkgs.obsidian-plugin-custom-sort;
|
||||
options = {
|
||||
suspended = false;
|
||||
statusBarEntryEnabled = false;
|
||||
@@ -110,7 +113,7 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/dataview { };
|
||||
pkg = selfPkgs.obsidian-plugin-dataview;
|
||||
options = {
|
||||
enableDataviewJs = true;
|
||||
enableInlineDataviewJs = true;
|
||||
@@ -120,7 +123,7 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/excalidraw { };
|
||||
pkg = selfPkgs.obsidian-plugin-excalidraw;
|
||||
options = {
|
||||
folder = "Inbox";
|
||||
templateFilePath = "Templates";
|
||||
@@ -143,14 +146,14 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/folder-note { };
|
||||
pkg = selfPkgs.obsidian-plugin-folder-note;
|
||||
options = {
|
||||
folderNoteHide = false;
|
||||
folderNoteStrInit = "";
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/kanban { };
|
||||
pkg = selfPkgs.obsidian-plugin-kanban;
|
||||
options = {
|
||||
move-tags = true;
|
||||
move-dates = true;
|
||||
@@ -164,7 +167,7 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/languagetool { };
|
||||
pkg = selfPkgs.obsidian-plugin-languagetool;
|
||||
options = {
|
||||
shouldAutoCheck = true;
|
||||
pickyMode = true;
|
||||
@@ -173,7 +176,7 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/linter { };
|
||||
pkg = selfPkgs.obsidian-plugin-linter;
|
||||
options = {
|
||||
lintOnSave = true;
|
||||
displayChanged = false;
|
||||
@@ -313,7 +316,7 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/map-view { };
|
||||
pkg = selfPkgs.obsidian-plugin-map-view;
|
||||
options = {
|
||||
"markerIconRules" = [
|
||||
{
|
||||
@@ -399,20 +402,20 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/minimal-settings { };
|
||||
pkg = selfPkgs.obsidian-plugin-minimal-settings;
|
||||
options = {
|
||||
editorFont = "var(--font-monospace)";
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/outliner { };
|
||||
pkg = selfPkgs.obsidian-plugin-outliner;
|
||||
options = {
|
||||
styleLists = false;
|
||||
stickCursor = "never";
|
||||
};
|
||||
}
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/read-it-later { };
|
||||
pkg = selfPkgs.obsidian-plugin-read-it-later;
|
||||
options = {
|
||||
inboxDir = "Inbox";
|
||||
assetsDir = "Inbox/assets";
|
||||
@@ -498,9 +501,9 @@ in
|
||||
textSnippetNote = "%content%";
|
||||
};
|
||||
}
|
||||
(pkgs.callPackage ./config/plugins/style-settings { })
|
||||
(selfPkgs.obsidian-plugin-style-settings)
|
||||
{
|
||||
pkg = pkgs.callPackage ./config/plugins/tasks { };
|
||||
pkg = selfPkgs.obsidian-plugin-tasks;
|
||||
options = {
|
||||
globalQuery = "short mode";
|
||||
globalFilter = "#todo";
|
||||
@@ -646,12 +649,12 @@ in
|
||||
};
|
||||
};
|
||||
}
|
||||
(pkgs.callPackage ./config/plugins/url-into-selection { })
|
||||
(selfPkgs.obsidian-plugin-url-into-selection)
|
||||
];
|
||||
|
||||
cssSnippets = [ ./config/snippets/file-explorer-separators.css ];
|
||||
|
||||
themes = [ (pkgs.callPackage ./config/themes/minimal { }) ];
|
||||
themes = [ selfPkgs.obsidian-theme-minimal ];
|
||||
|
||||
hotkeys = {
|
||||
"command-palette:open" = [ { key = "F1"; } ];
|
||||
|
@@ -6,7 +6,7 @@
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -28,7 +28,7 @@ in
|
||||
|
||||
programs.spicetify =
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
@@ -21,75 +21,76 @@ in
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
mutableExtensionsDir = false;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
mkhl.direnv
|
||||
mhutchie.git-graph
|
||||
ms-vsliveshare.vsliveshare
|
||||
naumovs.color-highlight
|
||||
];
|
||||
profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
mkhl.direnv
|
||||
mhutchie.git-graph
|
||||
ms-vsliveshare.vsliveshare
|
||||
naumovs.color-highlight
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"editor.accessibilitySupport" = "off";
|
||||
"editor.cursorBlinking" = "phase";
|
||||
"editor.cursorSmoothCaretAnimation" = "on";
|
||||
"editor.fontFamily" = builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.fontSize" = hmConfig.theme.font.size;
|
||||
"editor.formatOnPaste" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.formatOnType" = true;
|
||||
"editor.indentSize" = "tabSize";
|
||||
"editor.inlineSuggest.enabled" = true;
|
||||
"editor.largeFileOptimizations" = false;
|
||||
"editor.linkedEditing" = true;
|
||||
"editor.renderFinalNewline" = "on";
|
||||
"editor.smoothScrolling" = true;
|
||||
"editor.stickyScroll.enabled" = true;
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.tabSize" = 2;
|
||||
"editor.unicodeHighlight.includeComments" = true;
|
||||
"editor.unicodeHighlight.nonBasicASCII" = true;
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"explorer.confirmPasteNative" = false;
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.ignoreRecommendations" = true;
|
||||
"files.autoSave" = "afterDelay";
|
||||
"files.eol" = "\n";
|
||||
"files.insertFinalNewline" = true;
|
||||
"files.trimFinalNewlines" = true;
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
"git.allowForcePush" = true;
|
||||
"git.alwaysSignOff" = true;
|
||||
"git.autofetch" = "all";
|
||||
"git.closeDiffOnOperation" = true;
|
||||
"git.confirmForcePush" = false;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableCommitSigning" = true;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.ignoreRebaseWarning" = true;
|
||||
"git.openRepositoryInParentFolders" = "always";
|
||||
"git.path" = lib.meta.getExe pkgs.git;
|
||||
"mergeEditor.diffAlgorithm" = "advanced";
|
||||
"security.workspace.trust.enabled" = false;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"terminal.external.linuxExec" = "kitty";
|
||||
"terminal.integrated.confirmOnExit" = "hasChildProcesses";
|
||||
"terminal.integrated.copyOnSelection" = true;
|
||||
"terminal.integrated.fontFamily" =
|
||||
builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||
"terminal.integrated.fontSize" = hmConfig.theme.font.size;
|
||||
"update.mode" = "none";
|
||||
"window.autoDetectColorScheme" = true;
|
||||
"window.autoDetectHighContrast" = false;
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"workbench.editor.historyBasedLanguageDetection" = true;
|
||||
"workbench.list.smoothScrolling" = true;
|
||||
userSettings = {
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"editor.accessibilitySupport" = "off";
|
||||
"editor.cursorBlinking" = "phase";
|
||||
"editor.cursorSmoothCaretAnimation" = "on";
|
||||
"editor.fontFamily" = builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.fontSize" = hmConfig.theme.font.size;
|
||||
"editor.formatOnPaste" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.formatOnType" = true;
|
||||
"editor.indentSize" = "tabSize";
|
||||
"editor.inlineSuggest.enabled" = true;
|
||||
"editor.largeFileOptimizations" = false;
|
||||
"editor.linkedEditing" = true;
|
||||
"editor.renderFinalNewline" = "on";
|
||||
"editor.smoothScrolling" = true;
|
||||
"editor.stickyScroll.enabled" = true;
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.tabSize" = 2;
|
||||
"editor.unicodeHighlight.includeComments" = true;
|
||||
"editor.unicodeHighlight.nonBasicASCII" = true;
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"explorer.confirmPasteNative" = false;
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.ignoreRecommendations" = true;
|
||||
"files.autoSave" = "afterDelay";
|
||||
"files.eol" = "\n";
|
||||
"files.insertFinalNewline" = true;
|
||||
"files.trimFinalNewlines" = true;
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
"git.allowForcePush" = true;
|
||||
"git.alwaysSignOff" = true;
|
||||
"git.autofetch" = "all";
|
||||
"git.closeDiffOnOperation" = true;
|
||||
"git.confirmForcePush" = false;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableCommitSigning" = true;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.ignoreRebaseWarning" = true;
|
||||
"git.openRepositoryInParentFolders" = "always";
|
||||
"git.path" = lib.meta.getExe pkgs.git;
|
||||
"mergeEditor.diffAlgorithm" = "advanced";
|
||||
"security.workspace.trust.enabled" = false;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"terminal.external.linuxExec" = "kitty";
|
||||
"terminal.integrated.confirmOnExit" = "hasChildProcesses";
|
||||
"terminal.integrated.copyOnSelection" = true;
|
||||
"terminal.integrated.fontFamily" =
|
||||
builtins.concatStringsSep ", " hmConfig.theme.font.monospace.names;
|
||||
"terminal.integrated.fontSize" = hmConfig.theme.font.size;
|
||||
"update.mode" = "none";
|
||||
"window.autoDetectColorScheme" = true;
|
||||
"window.autoDetectHighContrast" = false;
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"workbench.editor.historyBasedLanguageDetection" = true;
|
||||
"workbench.list.smoothScrolling" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.c.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
ms-vscode.cpptools
|
||||
ms-vscode.cmake-tools
|
||||
];
|
||||
|
@@ -5,5 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.docker.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ ms-azuretools.vscode-docker ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
ms-azuretools.vscode-docker
|
||||
];
|
||||
}
|
||||
|
@@ -5,5 +5,5 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.go.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ golang.go ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ golang.go ];
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.java.enable {
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
extensions =
|
||||
with pkgs;
|
||||
with vscode-extensions;
|
||||
|
@@ -5,5 +5,5 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.jinja.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ wholroyd.jinja ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ wholroyd.jinja ];
|
||||
}
|
||||
|
@@ -5,5 +5,5 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.lua.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ sumneko.lua ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ sumneko.lua ];
|
||||
}
|
||||
|
@@ -5,5 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.markdown.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ yzhang.markdown-all-in-one ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
yzhang.markdown-all-in-one
|
||||
];
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.nix.enable {
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
userSettings = {
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = lib.meta.getExe pkgs.nil;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.python.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
ms-python.python
|
||||
ms-python.vscode-pylance
|
||||
ms-python.debugpy
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.rest.enable {
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions; [ humao.rest-client ];
|
||||
|
||||
userSettings = {
|
||||
|
@@ -5,5 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.python.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ rust-lang.rust-analyzer ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
rust-lang.rust-analyzer
|
||||
];
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.sas.enable {
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions; [ sas.sas-lsp ];
|
||||
|
||||
userSettings = {
|
||||
|
@@ -5,5 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.sops.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ signageos.signageos-vscode-sops ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
signageos.signageos-vscode-sops
|
||||
];
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.svelte.enable {
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
userSettings = {
|
||||
"svelte.enable-ts-plugin" = true;
|
||||
};
|
||||
|
@@ -1,11 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ config, lib, ... }:
|
||||
lib.mkIf config.programs.vscode.languages.typescript.enable {
|
||||
programs.vscode.userSettings = {
|
||||
programs.vscode.profiles.default.userSettings = {
|
||||
"typescript.updateImportsOnFileMove.enabled" = "always";
|
||||
};
|
||||
}
|
||||
|
@@ -5,5 +5,5 @@
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.vscode.languages.yaml.enable {
|
||||
programs.vscode.extensions = with pkgs.vscode-extensions; [ redhat.vscode-yaml ];
|
||||
programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ redhat.vscode-yaml ];
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ in
|
||||
];
|
||||
|
||||
config = {
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
extensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[ ]
|
||||
|
11
hosts/common/shells/default.nix
Normal file
11
hosts/common/shells/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
bun = import ./bun { inherit pkgs; };
|
||||
c = import ./c { inherit pkgs; };
|
||||
go = import ./go { inherit pkgs; };
|
||||
java = import ./java { inherit pkgs; };
|
||||
nix = import ./nix { inherit pkgs; };
|
||||
nodejs = import ./nodejs { inherit pkgs; };
|
||||
python = import ./python { inherit pkgs; };
|
||||
rust = import ./rust { inherit pkgs; };
|
||||
}
|
@@ -27,6 +27,7 @@
|
||||
../common/configs/system/nix-cleanup
|
||||
../common/configs/system/nix-install
|
||||
../common/configs/system/nix-ld
|
||||
../common/configs/system/nix-update
|
||||
../common/configs/system/nixpkgs
|
||||
../common/configs/system/ntp
|
||||
../common/configs/system/pipewire
|
||||
|
@@ -46,7 +46,7 @@
|
||||
};
|
||||
|
||||
programs = {
|
||||
vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||
vscode.profiles.default.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||
|
||||
obs-studio.resolution = {
|
||||
base = {
|
||||
|
@@ -27,6 +27,7 @@
|
||||
../common/configs/system/nix-cleanup
|
||||
../common/configs/system/nix-install
|
||||
../common/configs/system/nix-ld
|
||||
../common/configs/system/nix-update
|
||||
../common/configs/system/nixpkgs
|
||||
../common/configs/system/ntp
|
||||
../common/configs/system/pipewire
|
||||
|
@@ -7,7 +7,7 @@
|
||||
wayland.windowManager.hyprland.settings.monitor = "eDP-1, 1920x1200@60, 0x0, 1";
|
||||
|
||||
programs = {
|
||||
vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||
vscode.profiles.default.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
|
||||
|
||||
obs-studio.resolution = {
|
||||
base = {
|
||||
|
@@ -1,8 +0,0 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "jsonify";
|
||||
version = "0.1.6";
|
||||
|
||||
src = fetchGit {
|
||||
url = "git@github.com:sas-institute-rnd-internal/polaris-jsonify.git";
|
||||
ref = "main";
|
||||
rev = "7b8f8a0f0b3c1bbfb7f814c5a3dae5f696ca38e3";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-sJ3Jc7ZC+1s3m5nH6WtXsGVZfLEW7CZAcNtstUpc9M4=";
|
||||
|
||||
preBuild = ''
|
||||
rm -rf sage
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp "$GOPATH/bin/polaris-jsonify" $out/bin/jsonify
|
||||
'';
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "klog";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchGit {
|
||||
url = "git@gitlab.sas.com:convoy/devops/klog.git";
|
||||
ref = "master";
|
||||
rev = "17629fe278dd23e12bd6f17ee9db0d2fde37bc6c";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-nYlJhGe1Jd3/ct0XpTdMqbgnnoYM0dqVVVfr9nVsu4o=";
|
||||
|
||||
patches = [ ./remove-version-flag.patch ];
|
||||
|
||||
preBuild = ''
|
||||
export GOPROXY="goproxy.unx.sas.com"
|
||||
export GONOSUMDB="*.sas.com,sassoftware.io"
|
||||
'';
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
diff --git a/main.go b/main.go
|
||||
index 6fee5d3..a8d45dd 100644
|
||||
--- a/main.go
|
||||
+++ b/main.go
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
- "runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -27,20 +26,8 @@ func main() {
|
||||
flag.StringVar(&f, "format", "term", "Log output format (one of json|pretty|yaml|line|file|term|logfmt|plain|message|template)")
|
||||
flag.StringVar(&ml, "l", "trace", "Minimum log level to output (in order, one of trace|debug|info|warn|error|fatal|panic|none|disabled)")
|
||||
flag.StringVar(&tz, "t", defaultTimeZone, "Timezone to use for formatting log timestamps - One of UTC, Local, or from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones")
|
||||
- var ver bool
|
||||
- flag.BoolVar(&ver, "version", false, "Show version information")
|
||||
flag.Parse()
|
||||
|
||||
- if ver {
|
||||
- fmt.Printf("Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\n"+
|
||||
- "Command - %s\n"+
|
||||
- "Version - %s+%s\n"+
|
||||
- "Build Date - %s\n"+
|
||||
- "Compiler - %s %s/%s\n",
|
||||
- "klog", BuildVersion, BuildCommit, BuildDate, runtime.Version(), runtime.GOOS, runtime.GOARCH)
|
||||
- os.Exit(0)
|
||||
- }
|
||||
-
|
||||
lf, ok := log.Formatters[f]
|
||||
if !ok {
|
||||
fmt.Fprintf(os.Stderr, "invalid value for format: [%s] - must be one of json|pretty|yaml|line|file|term|logfmt|plain|message|template", f)
|
@@ -1,8 +0,0 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ selfPkgs.viya4-ark ];
|
||||
}
|
@@ -2,8 +2,15 @@
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
@@ -13,7 +20,7 @@ in
|
||||
"viya/orders-api/secret".sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
||||
};
|
||||
|
||||
home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
home.packages = [ selfPkgs.viya4-orders-cli ];
|
||||
|
||||
xdg.configFile."viya4-orders-cli/config.yaml".source =
|
||||
(pkgs.formats.yaml { }).generate "config.yaml"
|
@@ -82,14 +82,14 @@ in
|
||||
(import ./configs/console/kubernetes { inherit user home; })
|
||||
(import ./configs/console/podman { inherit user home; })
|
||||
(import ./configs/console/ssh { inherit user home; })
|
||||
(import ./configs/console/viya4-ark { inherit user home; })
|
||||
(import ./configs/console/viya4-orders-cli { inherit user home; })
|
||||
|
||||
(import ./configs/gui/obsidian { inherit user home; })
|
||||
(import ./configs/gui/vscode { inherit user home; })
|
||||
|
||||
# Private Imports
|
||||
(import ./configs/console/sage { inherit user home; })
|
||||
(import ./configs/console/viya-ark { inherit user home; })
|
||||
(import ./configs/console/viya-orders-cli { inherit user home; })
|
||||
];
|
||||
|
||||
# echo "password" | mkpasswd -s
|
||||
|
@@ -21,6 +21,7 @@
|
||||
../common/configs/system/nix-cleanup
|
||||
../common/configs/system/nix-install
|
||||
../common/configs/system/nix-ld
|
||||
../common/configs/system/nix-update
|
||||
../common/configs/system/nixpkgs
|
||||
../common/configs/system/ntp
|
||||
../common/configs/system/sops
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
lib = {
|
||||
runtime = pkgs.callPackage ./runtime { };
|
||||
runtime = import ./runtime { inherit pkgs; };
|
||||
};
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
merge = pkgs.callPackage ./merge { };
|
||||
merge = import ./merge { inherit pkgs; };
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
keyValue = lib.meta.getExe (
|
||||
keyValue = "${
|
||||
pkgs.writeShellApplication {
|
||||
name = "merge-key-value";
|
||||
runtimeInputs = with pkgs; [
|
||||
@@ -9,5 +9,5 @@
|
||||
];
|
||||
text = builtins.readFile ./key-value.sh;
|
||||
}
|
||||
);
|
||||
}/bin/merge-key-value";
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env -S nix shell nixpkgs#ssh-to-age nixpkgs#age nixpkgs#sops -c bash
|
||||
# shellcheck shell=bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env -S nix shell nixpkgs#ssh-to-age -c bash
|
||||
# shellcheck shell=bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env -S nix shell nixpkgs#sops -c bash
|
||||
# shellcheck shell=bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
@@ -4,28 +4,30 @@ set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
echo "Updating submodules..."
|
||||
|
||||
paths=$(git config --file .gitmodules --name-only --get-regexp path | while read -r line; do
|
||||
path=$(git config --file .gitmodules --get "${line}")
|
||||
path=$(git config --file .gitmodules --get "$line")
|
||||
url=$(git config --file .gitmodules --get "${line%.*}.url")
|
||||
if [[ ${url} == *"karaolidis"* ]]; then
|
||||
echo "${path}"
|
||||
if [[ $url == *"karaolidis"* ]]; then
|
||||
echo "$path"
|
||||
fi
|
||||
done)
|
||||
|
||||
for path in ${paths}; do
|
||||
echo "Processing submodule: ${path}"
|
||||
for path in $paths; do
|
||||
echo "Processing submodule: $path"
|
||||
|
||||
cd "${path}" || exit
|
||||
cd "$path" || exit
|
||||
|
||||
default_branch=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
|
||||
git checkout "${default_branch}"
|
||||
git checkout "$default_branch"
|
||||
git fetch upstream
|
||||
git merge "upstream/${default_branch}"
|
||||
git merge "upstream/$default_branch"
|
||||
|
||||
branches=$(git for-each-ref --format='%(refname:short)' refs/heads/ | grep -v "^${default_branch}$")
|
||||
for branch in ${branches}; do
|
||||
git checkout "${branch}"
|
||||
git rebase "${default_branch}"
|
||||
for branch in $branches; do
|
||||
git checkout "$branch"
|
||||
git rebase "$default_branch"
|
||||
done
|
||||
|
||||
git checkout integration
|
||||
@@ -37,4 +39,16 @@ done
|
||||
|
||||
echo "All submodules updated successfully."
|
||||
|
||||
echo "Updating packages..."
|
||||
|
||||
find packages -type f -name "*.nix" | while read -r file; do
|
||||
update_command=$(grep -oP '^#\s*AUTO-UPDATE:\s*\K.+' "$file" || true)
|
||||
if [[ -n "$update_command" ]]; then
|
||||
echo "Running update command in: $file"
|
||||
eval "$update_command"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "All packages updated successfully."
|
||||
|
||||
nix flake update
|
||||
|
38
packages/darktable/ghost-cms-publish/default.nix
Normal file
38
packages/darktable/ghost-cms-publish/default.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake --version=branch=main darktable-ghost-cms-publish --subpackage npmSrc
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "darktable-ghost-cms-publish";
|
||||
version = "0-unstable-2025-02-23";
|
||||
|
||||
src = pkgs.fetchFromGitLab {
|
||||
domain = "git.karaolidis.com";
|
||||
owner = "karaolidis";
|
||||
repo = pname;
|
||||
rev = "26780273b2a093c6e6a3140d0220d252f0bc709e";
|
||||
hash = "sha256-5aoGkqxMyvyK8EDsSE6kZa+dpExxVH2GRx2n87VusKE=";
|
||||
};
|
||||
|
||||
npmSrc = pkgs.buildNpmPackage ({
|
||||
inherit src pname version;
|
||||
npmDepsHash = "sha256-K/x9ZEMNO8D+SkvVPfqVJtZaDXY5gDApRRocg/POY68=";
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
cp -r . $out
|
||||
'';
|
||||
});
|
||||
|
||||
# FIXME: https://github.com/NixOS/nixpkgs/issues/255890
|
||||
wrapper = pkgs.writeShellApplication {
|
||||
name = pname;
|
||||
runtimeInputs = with pkgs; [ bun ];
|
||||
text = ''
|
||||
bun ${npmSrc}/src/index.ts "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/lib/${pname}
|
||||
cp publish.lua $out/lib/${pname}/
|
||||
cp ${wrapper}/bin/${pname} $out/bin/
|
||||
'';
|
||||
}
|
17
packages/darktable/hald-clut/default.nix
Normal file
17
packages/darktable/hald-clut/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake --version=branch=master darktable-hald-clut
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "darktable-hald-clut";
|
||||
version = "0-unstable-2019-03-21";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "cedeber";
|
||||
repo = "hald-clut";
|
||||
rev = "3b3180f82d4dcea1e6e8c5648473539a910d7f49";
|
||||
hash = "sha256-R8vyYmcsfk49QsSV3v0QblXcO6U0oIfDyxbHPLwSMdo=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r HaldCLUT/. $out
|
||||
'';
|
||||
}
|
17
packages/darktable/lua-scripts/default.nix
Normal file
17
packages/darktable/lua-scripts/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake --version=branch=master darktable-lua-scripts
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "darktable-lua-scripts";
|
||||
version = "release-2.0.0-unstable-2025-02-16";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "darktable-org";
|
||||
repo = "lua-scripts";
|
||||
rev = "926272b1cd338a22fbe421d41a966bd8a8ba4575";
|
||||
hash = "sha256-lU1UkCEqaf2l76un3phOX5o2ypkff8v+i54krq9N1hk=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r $src $out
|
||||
'';
|
||||
}
|
31
packages/default.nix
Normal file
31
packages/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
darktable-ghost-cms-publish = import ./darktable/ghost-cms-publish { inherit pkgs; };
|
||||
darktable-hald-clut = import ./darktable/hald-clut { inherit pkgs; };
|
||||
darktable-lua-scripts = import ./darktable/lua-scripts { inherit pkgs; };
|
||||
|
||||
obsidian-plugin-better-word-count = import ./obsidian/plugins/better-word-count { inherit pkgs; };
|
||||
obsidian-plugin-custom-sort = import ./obsidian/plugins/custom-sort { inherit pkgs; };
|
||||
obsidian-plugin-dataview = import ./obsidian/plugins/dataview { inherit pkgs; };
|
||||
obsidian-plugin-excalidraw = import ./obsidian/plugins/excalidraw { inherit pkgs; };
|
||||
obsidian-plugin-folder-note = import ./obsidian/plugins/folder-note { inherit pkgs; };
|
||||
obsidian-plugin-kanban = import ./obsidian/plugins/kanban { inherit pkgs; };
|
||||
obsidian-plugin-languagetool = import ./obsidian/plugins/languagetool { inherit pkgs; };
|
||||
obsidian-plugin-linter = import ./obsidian/plugins/linter { inherit pkgs; };
|
||||
obsidian-plugin-map-view = import ./obsidian/plugins/map-view { inherit pkgs; };
|
||||
obsidian-plugin-minimal-settings = import ./obsidian/plugins/minimal-settings { inherit pkgs; };
|
||||
obsidian-plugin-outliner = import ./obsidian/plugins/outliner { inherit pkgs; };
|
||||
obsidian-plugin-read-it-later = import ./obsidian/plugins/read-it-later { inherit pkgs; };
|
||||
obsidian-plugin-style-settings = import ./obsidian/plugins/style-settings { inherit pkgs; };
|
||||
obsidian-plugin-tasks = import ./obsidian/plugins/tasks { inherit pkgs; };
|
||||
obsidian-plugin-url-into-selection = import ./obsidian/plugins/url-into-selection { inherit pkgs; };
|
||||
|
||||
obsidian-theme-minimal = import ./obsidian/themes/minimal { inherit pkgs; };
|
||||
|
||||
# SAS
|
||||
viya4-ark = import ./sas/viya4-ark { inherit pkgs; };
|
||||
viya4-orders-cli = import ./sas/viya4-orders-cli { inherit pkgs; };
|
||||
|
||||
# SAS Private
|
||||
sage = import ./sas/sage { inherit pkgs; };
|
||||
}
|
@@ -1,21 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-better-word-count
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.better-word-count";
|
||||
pname = "obsidian-plugin-better-word-count";
|
||||
version = "0.10.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "8ff00d7e9aed03d8cf38215b742a2a2251cc2ea2";
|
||||
# owner = "lukeleppan";
|
||||
owner = "lukeleppan";
|
||||
repo = "better-word-count";
|
||||
# rev = version;
|
||||
hash = "sha256-wA0vycuUHr7icgAJ/d85j3bbwqlefXnSyRUXgCmqyOE=";
|
||||
rev = version;
|
||||
hash = "sha256-qyuZIcZHsUfyUMboE8GP26dIeo37fzhYuGccfQYffL4=";
|
||||
};
|
||||
|
||||
patches = [ ./package-lock.patch ];
|
||||
makeCacheWritable = true;
|
||||
|
||||
npmDepsHash = "sha256-K+NGIKsSNzGHGcAofsl0WcNsTFt/y38zUdGUZL013xg=";
|
||||
makeCacheWritable = true;
|
||||
npmDepsHash = "sha256-2ZIgaMn6esSmB0lg4x42ueg+AFO+UmYbI1NCsxZQr+8=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
installPhase = ''
|
1559
packages/obsidian/plugins/better-word-count/package-lock.patch
Normal file
1559
packages/obsidian/plugins/better-word-count/package-lock.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-custom-sort
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "obsidian.plugins.custom-sort";
|
||||
pname = "obsidian-plugin-custom-sort";
|
||||
version = "3.1.2";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-dataview
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.dataview";
|
||||
pname = "obsidian-plugin-dataview";
|
||||
version = "0.5.67";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-excalidraw --subpackage mathjaxToSVG
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.excalidraw";
|
||||
version = "2.8.3";
|
||||
@@ -13,6 +14,7 @@ pkgs.buildNpmPackage rec {
|
||||
mathjaxToSVG = pkgs.buildNpmPackage {
|
||||
pname = "obsidian.plugins.excalidraw.mathjaxToSVG";
|
||||
version = "1.0.0";
|
||||
|
||||
src = "${pkg}/MathjaxToSVG";
|
||||
npmDepsHash = "sha256-AosKWlX08dpXNQ2YlrfR6jEInmU02Ztf26nmV19Jxok=";
|
||||
|
@@ -1,17 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-folder-note
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.folder-note";
|
||||
pname = "obsidian-plugin-folder-note";
|
||||
version = "0.7.3";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "2d14ccb5179beb48c3df87108170aeda067584ac";
|
||||
# owner = "xpgo";
|
||||
owner = "xpgo";
|
||||
repo = "obsidian-folder-note-plugin";
|
||||
# rev = version;
|
||||
hash = "sha256-Ub0u+hMbkzxeUjzVmA61S0ClXR9E3KrYTqhrJBQj0Wg=";
|
||||
rev = version;
|
||||
hash = "sha256-MGWIMM2zKB6ydP7wV8yVAOS3Qr02xTBIWIEf/2enynU=";
|
||||
};
|
||||
|
||||
patches = [ ./package-lock.patch ];
|
||||
|
||||
npmDepsHash = "sha256-4v6QwwooxsXy+mbiKriylpKa8NOK8pWZixezY+H6wxo=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
549
packages/obsidian/plugins/folder-note/package-lock.patch
Normal file
549
packages/obsidian/plugins/folder-note/package-lock.patch
Normal file
@@ -0,0 +1,549 @@
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index c0aac20..9b2ad6e 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
# npm
|
||||
node_modules
|
||||
-package-lock.json
|
||||
|
||||
# build
|
||||
main.js
|
||||
diff --git a/package-lock.json b/package-lock.json
|
||||
new file mode 100644
|
||||
index 0000000..ed8a9ed
|
||||
--- /dev/null
|
||||
+++ b/package-lock.json
|
||||
@@ -0,0 +1,518 @@
|
||||
+{
|
||||
+ "name": "folder-note-plugin",
|
||||
+ "version": "0.9.7",
|
||||
+ "lockfileVersion": 3,
|
||||
+ "requires": true,
|
||||
+ "packages": {
|
||||
+ "": {
|
||||
+ "name": "folder-note-plugin",
|
||||
+ "version": "0.9.7",
|
||||
+ "license": "MIT",
|
||||
+ "devDependencies": {
|
||||
+ "@rollup/plugin-commonjs": "^15.1.0",
|
||||
+ "@rollup/plugin-node-resolve": "^9.0.0",
|
||||
+ "@rollup/plugin-typescript": "^6.0.0",
|
||||
+ "@types/node": "^14.14.30",
|
||||
+ "@types/yaml": "^1.9.7",
|
||||
+ "obsidian": "^1.6.6",
|
||||
+ "rollup": "^2.39.0",
|
||||
+ "tslib": "^2.0.3",
|
||||
+ "typescript": "^4.1.5",
|
||||
+ "yaml": "^1.10.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@codemirror/state": {
|
||||
+ "version": "6.4.1",
|
||||
+ "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz",
|
||||
+ "integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==",
|
||||
+ "dev": true,
|
||||
+ "peer": true
|
||||
+ },
|
||||
+ "node_modules/@codemirror/view": {
|
||||
+ "version": "6.28.6",
|
||||
+ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.28.6.tgz",
|
||||
+ "integrity": "sha512-bhwB1AZ6zU4M3dNKm8Aa2BXwj5mWDqE9IWpqxYKJoLCnx+AcwcMuLO01tLWgc1mx4vT1IVYVqx86YoqUsATrqQ==",
|
||||
+ "dev": true,
|
||||
+ "peer": true,
|
||||
+ "dependencies": {
|
||||
+ "@codemirror/state": "^6.4.0",
|
||||
+ "style-mod": "^4.1.0",
|
||||
+ "w3c-keyname": "^2.2.4"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@rollup/plugin-commonjs": {
|
||||
+ "version": "15.1.0",
|
||||
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-15.1.0.tgz",
|
||||
+ "integrity": "sha512-xCQqz4z/o0h2syQ7d9LskIMvBSH4PX5PjYdpSSvgS+pQik3WahkQVNWg3D8XJeYjZoVWnIUQYDghuEMRGrmQYQ==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@rollup/pluginutils": "^3.1.0",
|
||||
+ "commondir": "^1.0.1",
|
||||
+ "estree-walker": "^2.0.1",
|
||||
+ "glob": "^7.1.6",
|
||||
+ "is-reference": "^1.2.1",
|
||||
+ "magic-string": "^0.25.7",
|
||||
+ "resolve": "^1.17.0"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">= 8.0.0"
|
||||
+ },
|
||||
+ "peerDependencies": {
|
||||
+ "rollup": "^2.22.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@rollup/plugin-node-resolve": {
|
||||
+ "version": "9.0.0",
|
||||
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz",
|
||||
+ "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@rollup/pluginutils": "^3.1.0",
|
||||
+ "@types/resolve": "1.17.1",
|
||||
+ "builtin-modules": "^3.1.0",
|
||||
+ "deepmerge": "^4.2.2",
|
||||
+ "is-module": "^1.0.0",
|
||||
+ "resolve": "^1.17.0"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">= 10.0.0"
|
||||
+ },
|
||||
+ "peerDependencies": {
|
||||
+ "rollup": "^1.20.0||^2.0.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@rollup/plugin-typescript": {
|
||||
+ "version": "6.1.0",
|
||||
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-6.1.0.tgz",
|
||||
+ "integrity": "sha512-hJxaiE6WyNOsK+fZpbFh9CUijZYqPQuAOWO5khaGTUkM8DYNNyA2TDlgamecE+qLOG1G1+CwbWMAx3rbqpp6xQ==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@rollup/pluginutils": "^3.1.0",
|
||||
+ "resolve": "^1.17.0"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">=8.0.0"
|
||||
+ },
|
||||
+ "peerDependencies": {
|
||||
+ "rollup": "^2.14.0",
|
||||
+ "tslib": "*",
|
||||
+ "typescript": ">=3.4.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@rollup/pluginutils": {
|
||||
+ "version": "3.1.0",
|
||||
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
|
||||
+ "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@types/estree": "0.0.39",
|
||||
+ "estree-walker": "^1.0.1",
|
||||
+ "picomatch": "^2.2.2"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">= 8.0.0"
|
||||
+ },
|
||||
+ "peerDependencies": {
|
||||
+ "rollup": "^1.20.0||^2.0.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@rollup/pluginutils/node_modules/estree-walker": {
|
||||
+ "version": "1.0.1",
|
||||
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
|
||||
+ "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/@types/codemirror": {
|
||||
+ "version": "5.60.8",
|
||||
+ "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz",
|
||||
+ "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@types/tern": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@types/estree": {
|
||||
+ "version": "0.0.39",
|
||||
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||
+ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/@types/node": {
|
||||
+ "version": "14.18.63",
|
||||
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz",
|
||||
+ "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/@types/resolve": {
|
||||
+ "version": "1.17.1",
|
||||
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz",
|
||||
+ "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@types/node": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@types/tern": {
|
||||
+ "version": "0.23.9",
|
||||
+ "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.9.tgz",
|
||||
+ "integrity": "sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@types/estree": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/@types/yaml": {
|
||||
+ "version": "1.9.7",
|
||||
+ "resolved": "https://registry.npmjs.org/@types/yaml/-/yaml-1.9.7.tgz",
|
||||
+ "integrity": "sha512-8WMXRDD1D+wCohjfslHDgICd2JtMATZU8CkhH8LVJqcJs6dyYj5TGptzP8wApbmEullGBSsCEzzap73DQ1HJaA==",
|
||||
+ "deprecated": "This is a stub types definition. yaml provides its own type definitions, so you do not need this installed.",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "yaml": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/balanced-match": {
|
||||
+ "version": "1.0.2",
|
||||
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/brace-expansion": {
|
||||
+ "version": "1.1.11",
|
||||
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "balanced-match": "^1.0.0",
|
||||
+ "concat-map": "0.0.1"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/builtin-modules": {
|
||||
+ "version": "3.3.0",
|
||||
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
|
||||
+ "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": ">=6"
|
||||
+ },
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/sindresorhus"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/commondir": {
|
||||
+ "version": "1.0.1",
|
||||
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
||||
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/concat-map": {
|
||||
+ "version": "0.0.1",
|
||||
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/deepmerge": {
|
||||
+ "version": "4.3.1",
|
||||
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": ">=0.10.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/estree-walker": {
|
||||
+ "version": "2.0.2",
|
||||
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/fs.realpath": {
|
||||
+ "version": "1.0.0",
|
||||
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/fsevents": {
|
||||
+ "version": "2.3.3",
|
||||
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
+ "dev": true,
|
||||
+ "hasInstallScript": true,
|
||||
+ "optional": true,
|
||||
+ "os": [
|
||||
+ "darwin"
|
||||
+ ],
|
||||
+ "engines": {
|
||||
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/function-bind": {
|
||||
+ "version": "1.1.2",
|
||||
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
+ "dev": true,
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/ljharb"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/glob": {
|
||||
+ "version": "7.2.3",
|
||||
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
+ "deprecated": "Glob versions prior to v9 are no longer supported",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "fs.realpath": "^1.0.0",
|
||||
+ "inflight": "^1.0.4",
|
||||
+ "inherits": "2",
|
||||
+ "minimatch": "^3.1.1",
|
||||
+ "once": "^1.3.0",
|
||||
+ "path-is-absolute": "^1.0.0"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": "*"
|
||||
+ },
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/isaacs"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/hasown": {
|
||||
+ "version": "2.0.2",
|
||||
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "function-bind": "^1.1.2"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">= 0.4"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/inflight": {
|
||||
+ "version": "1.0.6",
|
||||
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||
+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "once": "^1.3.0",
|
||||
+ "wrappy": "1"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/inherits": {
|
||||
+ "version": "2.0.4",
|
||||
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/is-core-module": {
|
||||
+ "version": "2.15.0",
|
||||
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz",
|
||||
+ "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "hasown": "^2.0.2"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">= 0.4"
|
||||
+ },
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/ljharb"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/is-module": {
|
||||
+ "version": "1.0.0",
|
||||
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
|
||||
+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/is-reference": {
|
||||
+ "version": "1.2.1",
|
||||
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
|
||||
+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@types/estree": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/magic-string": {
|
||||
+ "version": "0.25.9",
|
||||
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
|
||||
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "sourcemap-codec": "^1.4.8"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/minimatch": {
|
||||
+ "version": "3.1.2",
|
||||
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "brace-expansion": "^1.1.7"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/moment": {
|
||||
+ "version": "2.29.4",
|
||||
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
|
||||
+ "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": "*"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/obsidian": {
|
||||
+ "version": "1.6.6",
|
||||
+ "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.6.6.tgz",
|
||||
+ "integrity": "sha512-GZHzeOiwmw/wBjB5JwrsxAZBLqxGQmqtEKSvJJvT0LtTcqeOFnV8jv0ZK5kO7hBb44WxJc+LdS7mZgLXbb+qXQ==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "@types/codemirror": "5.60.8",
|
||||
+ "moment": "2.29.4"
|
||||
+ },
|
||||
+ "peerDependencies": {
|
||||
+ "@codemirror/state": "^6.0.0",
|
||||
+ "@codemirror/view": "^6.0.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/once": {
|
||||
+ "version": "1.4.0",
|
||||
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "wrappy": "1"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/path-is-absolute": {
|
||||
+ "version": "1.0.1",
|
||||
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": ">=0.10.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/path-parse": {
|
||||
+ "version": "1.0.7",
|
||||
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/picomatch": {
|
||||
+ "version": "2.3.1",
|
||||
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": ">=8.6"
|
||||
+ },
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/jonschlinkert"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/resolve": {
|
||||
+ "version": "1.22.8",
|
||||
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
||||
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
|
||||
+ "dev": true,
|
||||
+ "dependencies": {
|
||||
+ "is-core-module": "^2.13.0",
|
||||
+ "path-parse": "^1.0.7",
|
||||
+ "supports-preserve-symlinks-flag": "^1.0.0"
|
||||
+ },
|
||||
+ "bin": {
|
||||
+ "resolve": "bin/resolve"
|
||||
+ },
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/ljharb"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/rollup": {
|
||||
+ "version": "2.79.1",
|
||||
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
|
||||
+ "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
|
||||
+ "dev": true,
|
||||
+ "bin": {
|
||||
+ "rollup": "dist/bin/rollup"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">=10.0.0"
|
||||
+ },
|
||||
+ "optionalDependencies": {
|
||||
+ "fsevents": "~2.3.2"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/sourcemap-codec": {
|
||||
+ "version": "1.4.8",
|
||||
+ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
|
||||
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
|
||||
+ "deprecated": "Please use @jridgewell/sourcemap-codec instead",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/style-mod": {
|
||||
+ "version": "4.1.2",
|
||||
+ "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.2.tgz",
|
||||
+ "integrity": "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==",
|
||||
+ "dev": true,
|
||||
+ "peer": true
|
||||
+ },
|
||||
+ "node_modules/supports-preserve-symlinks-flag": {
|
||||
+ "version": "1.0.0",
|
||||
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
||||
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": ">= 0.4"
|
||||
+ },
|
||||
+ "funding": {
|
||||
+ "url": "https://github.com/sponsors/ljharb"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/tslib": {
|
||||
+ "version": "2.6.3",
|
||||
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
|
||||
+ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/typescript": {
|
||||
+ "version": "4.9.5",
|
||||
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
+ "dev": true,
|
||||
+ "bin": {
|
||||
+ "tsc": "bin/tsc",
|
||||
+ "tsserver": "bin/tsserver"
|
||||
+ },
|
||||
+ "engines": {
|
||||
+ "node": ">=4.2.0"
|
||||
+ }
|
||||
+ },
|
||||
+ "node_modules/w3c-keyname": {
|
||||
+ "version": "2.2.8",
|
||||
+ "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
|
||||
+ "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==",
|
||||
+ "dev": true,
|
||||
+ "peer": true
|
||||
+ },
|
||||
+ "node_modules/wrappy": {
|
||||
+ "version": "1.0.2",
|
||||
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
+ "dev": true
|
||||
+ },
|
||||
+ "node_modules/yaml": {
|
||||
+ "version": "1.10.2",
|
||||
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
|
||||
+ "dev": true,
|
||||
+ "engines": {
|
||||
+ "node": ">= 6"
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/package.json b/package.json
|
||||
index 469af6f..7d6e514 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -16,7 +16,7 @@
|
||||
"@rollup/plugin-typescript": "^6.0.0",
|
||||
"@types/node": "^14.14.30",
|
||||
"@types/yaml": "^1.9.7",
|
||||
- "obsidian": "https://github.com/obsidianmd/obsidian-api/tarball/master",
|
||||
+ "obsidian": "^1.6.6",
|
||||
"rollup": "^2.39.0",
|
||||
"tslib": "^2.0.3",
|
||||
"typescript": "^4.1.5",
|
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-kanban
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "obsidian.plugins.kanban";
|
||||
pname = "obsidian-plugin-kanban";
|
||||
version = "2.0.51";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
@@ -1,18 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-languagetool
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "obsidian.plugins.languagetool";
|
||||
pname = "obsidian-plugin-languagetool";
|
||||
version = "0.3.7";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "a7bb62f767decbd55b14702c35e24954459e77ca";
|
||||
# owner = "Clemens-E";
|
||||
owner = "Clemens-E";
|
||||
repo = "obsidian-languagetool-plugin";
|
||||
# rev = version;
|
||||
hash = "sha256-LeSK9ctdKW6P3AoOWHxHmGxIlOXDOVd1nhsWXdRSiZY=";
|
||||
rev = version;
|
||||
hash = "sha256-OsdOOrXNoraKuFPqvgn6pj6ZagEbiFCJyQ529eyZXUU=";
|
||||
};
|
||||
|
||||
patches = [ ./settings-notification.patch ];
|
||||
patches = [
|
||||
./settings-notification.patch
|
||||
./variety-typo.patch
|
||||
];
|
||||
|
||||
offlineCache = pkgs.fetchYarnDeps {
|
||||
yarnLock = src + "/yarn.lock";
|
149
packages/obsidian/plugins/languagetool/variety-typo.patch
Normal file
149
packages/obsidian/plugins/languagetool/variety-typo.patch
Normal file
@@ -0,0 +1,149 @@
|
||||
diff --git a/src/SettingsTab.ts b/src/SettingsTab.ts
|
||||
index d0d65bb..2a211b0 100644
|
||||
--- a/src/SettingsTab.ts
|
||||
+++ b/src/SettingsTab.ts
|
||||
@@ -33,10 +33,10 @@ export interface LanguageToolPluginSettings {
|
||||
staticLanguage?: string;
|
||||
motherTongue?: string;
|
||||
|
||||
- englishVeriety?: undefined | 'en-US' | 'en-GB' | 'en-CA' | 'en-AU' | 'en-ZA' | 'en-NZ';
|
||||
- germanVeriety?: undefined | 'de-DE' | 'de-AT' | 'de-CH';
|
||||
- portugueseVeriety?: undefined | 'pt-BR' | 'pt-PT' | 'pt-AO' | 'pt-MZ';
|
||||
- catalanVeriety?: undefined | 'ca-ES' | 'ca-ES-valencia';
|
||||
+ englishVariety?: undefined | 'en-US' | 'en-GB' | 'en-CA' | 'en-AU' | 'en-ZA' | 'en-NZ';
|
||||
+ germanVariety?: undefined | 'de-DE' | 'de-AT' | 'de-CH';
|
||||
+ portugueseVariety?: undefined | 'pt-BR' | 'pt-PT' | 'pt-AO' | 'pt-MZ';
|
||||
+ catalanVariety?: undefined | 'ca-ES' | 'ca-ES-valencia';
|
||||
|
||||
pickyMode: boolean;
|
||||
|
||||
@@ -286,13 +286,13 @@ export class LanguageToolSettingsTab extends PluginSettingTab {
|
||||
component.onChange(async value => {
|
||||
this.plugin.settings.staticLanguage = value;
|
||||
if (value !== 'auto') {
|
||||
- this.plugin.settings.englishVeriety = undefined;
|
||||
+ this.plugin.settings.englishVariety = undefined;
|
||||
englishVarietyDropdown?.setValue('default');
|
||||
- this.plugin.settings.germanVeriety = undefined;
|
||||
+ this.plugin.settings.germanVariety = undefined;
|
||||
germanVarietyDropdown?.setValue('default');
|
||||
- this.plugin.settings.portugueseVeriety = undefined;
|
||||
+ this.plugin.settings.portugueseVariety = undefined;
|
||||
portugueseVarietyDropdown?.setValue('default');
|
||||
- this.plugin.settings.catalanVeriety = undefined;
|
||||
+ this.plugin.settings.catalanVariety = undefined;
|
||||
catalanVarietyDropdown?.setValue('default');
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
@@ -338,14 +338,14 @@ export class LanguageToolSettingsTab extends PluginSettingTab {
|
||||
'en-ZA': 'English (South Africa)',
|
||||
'en-NZ': 'English (New Zealand)',
|
||||
})
|
||||
- .setValue(this.plugin.settings.englishVeriety ?? 'default')
|
||||
+ .setValue(this.plugin.settings.englishVariety ?? 'default')
|
||||
.onChange(async value => {
|
||||
if (value === 'default') {
|
||||
- this.plugin.settings.englishVeriety = undefined;
|
||||
+ this.plugin.settings.englishVariety = undefined;
|
||||
} else {
|
||||
this.plugin.settings.staticLanguage = 'auto';
|
||||
staticLanguageComponent?.setValue('auto');
|
||||
- this.plugin.settings.englishVeriety = value as 'en-US' | 'en-GB' | 'en-CA' | 'en-AU' | 'en-ZA' | 'en-NZ';
|
||||
+ this.plugin.settings.englishVariety = value as 'en-US' | 'en-GB' | 'en-CA' | 'en-AU' | 'en-ZA' | 'en-NZ';
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
@@ -360,14 +360,14 @@ export class LanguageToolSettingsTab extends PluginSettingTab {
|
||||
'de-CH': 'German (Switzerland)',
|
||||
'de-AT': 'German (Austria)',
|
||||
})
|
||||
- .setValue(this.plugin.settings.germanVeriety ?? 'default')
|
||||
+ .setValue(this.plugin.settings.germanVariety ?? 'default')
|
||||
.onChange(async value => {
|
||||
if (value === 'default') {
|
||||
- this.plugin.settings.germanVeriety = undefined;
|
||||
+ this.plugin.settings.germanVariety = undefined;
|
||||
} else {
|
||||
this.plugin.settings.staticLanguage = 'auto';
|
||||
staticLanguageComponent?.setValue('auto');
|
||||
- this.plugin.settings.germanVeriety = value as 'de-DE' | 'de-CH' | 'de-AT';
|
||||
+ this.plugin.settings.germanVariety = value as 'de-DE' | 'de-CH' | 'de-AT';
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
@@ -383,14 +383,14 @@ export class LanguageToolSettingsTab extends PluginSettingTab {
|
||||
'pt-AO': 'Portuguese (Angola)',
|
||||
'pt-MZ': 'Portuguese (Mozambique)',
|
||||
})
|
||||
- .setValue(this.plugin.settings.portugueseVeriety ?? 'default')
|
||||
+ .setValue(this.plugin.settings.portugueseVariety ?? 'default')
|
||||
.onChange(async value => {
|
||||
if (value === 'default') {
|
||||
- this.plugin.settings.portugueseVeriety = undefined;
|
||||
+ this.plugin.settings.portugueseVariety = undefined;
|
||||
} else {
|
||||
this.plugin.settings.staticLanguage = 'auto';
|
||||
staticLanguageComponent?.setValue('auto');
|
||||
- this.plugin.settings.portugueseVeriety = value as 'pt-BR' | 'pt-PT' | 'pt-AO' | 'pt-MZ';
|
||||
+ this.plugin.settings.portugueseVariety = value as 'pt-BR' | 'pt-PT' | 'pt-AO' | 'pt-MZ';
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
@@ -404,14 +404,14 @@ export class LanguageToolSettingsTab extends PluginSettingTab {
|
||||
'ca-ES': 'Catalan',
|
||||
'ca-ES-valencia': 'Catalan (Valencian)',
|
||||
})
|
||||
- .setValue(this.plugin.settings.catalanVeriety ?? 'default')
|
||||
+ .setValue(this.plugin.settings.catalanVariety ?? 'default')
|
||||
.onChange(async value => {
|
||||
if (value === 'default') {
|
||||
- this.plugin.settings.catalanVeriety = undefined;
|
||||
+ this.plugin.settings.catalanVariety = undefined;
|
||||
} else {
|
||||
this.plugin.settings.staticLanguage = 'auto';
|
||||
staticLanguageComponent?.setValue('auto');
|
||||
- this.plugin.settings.catalanVeriety = value as 'ca-ES' | 'ca-ES-valencia';
|
||||
+ this.plugin.settings.catalanVariety = value as 'ca-ES' | 'ca-ES-valencia';
|
||||
}
|
||||
await this.plugin.saveSettings();
|
||||
});
|
||||
diff --git a/src/api.ts b/src/api.ts
|
||||
index 109984c..4cd1700 100644
|
||||
--- a/src/api.ts
|
||||
+++ b/src/api.ts
|
||||
@@ -58,27 +58,27 @@ export async function getDetectionResult(
|
||||
params.disabledRules = settings.ruleOtherDisabledRules;
|
||||
}
|
||||
|
||||
- if (settings.englishVeriety) {
|
||||
+ if (settings.englishVariety) {
|
||||
params.preferredVariants = `${params.preferredVariants ? `${params.preferredVariants},` : ''}${
|
||||
- settings.englishVeriety
|
||||
+ settings.englishVariety
|
||||
}`;
|
||||
}
|
||||
|
||||
- if (settings.germanVeriety) {
|
||||
+ if (settings.germanVariety) {
|
||||
params.preferredVariants = `${params.preferredVariants ? `${params.preferredVariants},` : ''}${
|
||||
- settings.germanVeriety
|
||||
+ settings.germanVariety
|
||||
}`;
|
||||
}
|
||||
|
||||
- if (settings.portugueseVeriety) {
|
||||
+ if (settings.portugueseVariety) {
|
||||
params.preferredVariants = `${params.preferredVariants ? `${params.preferredVariants},` : ''}${
|
||||
- settings.portugueseVeriety
|
||||
+ settings.portugueseVariety
|
||||
}`;
|
||||
}
|
||||
|
||||
- if (settings.catalanVeriety) {
|
||||
+ if (settings.catalanVariety) {
|
||||
params.preferredVariants = `${params.preferredVariants ? `${params.preferredVariants},` : ''}${
|
||||
- settings.catalanVeriety
|
||||
+ settings.catalanVariety
|
||||
}`;
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-linter
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.linter";
|
||||
pname = "obsidian-plugin-linter";
|
||||
version = "1.28.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
28
packages/obsidian/plugins/map-view/default.nix
Normal file
28
packages/obsidian/plugins/map-view/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-map-view
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian-plugin-map-view";
|
||||
version = "5.5.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "esm7";
|
||||
repo = "obsidian-map-view";
|
||||
rev = version;
|
||||
hash = "sha256-HiH6KPLnCNyidp6TI7HJK4aj5SL0B0xO6HOWUgjVdd4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./package-lock.patch
|
||||
./file-api-key.patch
|
||||
];
|
||||
|
||||
npmDepsHash = "sha256-fNvDoMGIlmJ0zum3Qm/eLx5a/UV8rC2JmRYbXUAXgGg=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ./dist/manifest.json $out/manifest.json
|
||||
cp ./dist/main.js $out/main.js
|
||||
cp ./dist/styles.css $out/styles.css
|
||||
'';
|
||||
}
|
230
packages/obsidian/plugins/map-view/file-api-key.patch
Normal file
230
packages/obsidian/plugins/map-view/file-api-key.patch
Normal file
@@ -0,0 +1,230 @@
|
||||
diff --git a/src/geosearch.ts b/src/geosearch.ts
|
||||
index f1b89b9..68fd4c1 100644
|
||||
--- a/src/geosearch.ts
|
||||
+++ b/src/geosearch.ts
|
||||
@@ -2,7 +2,7 @@ import { request, App } from 'obsidian';
|
||||
import * as geosearch from 'leaflet-geosearch';
|
||||
import * as leaflet from 'leaflet';
|
||||
import queryString from 'query-string';
|
||||
-
|
||||
+import { readFileSync } from 'fs';
|
||||
import { type PluginSettings } from 'src/settings';
|
||||
import { UrlConvertor } from 'src/urlConvertor';
|
||||
import { FileMarker } from 'src/markers';
|
||||
@@ -31,12 +31,16 @@ export class GeoSearcher {
|
||||
constructor(app: App, settings: PluginSettings) {
|
||||
this.settings = settings;
|
||||
this.urlConvertor = new UrlConvertor(app, settings);
|
||||
+
|
||||
+ const apiKey =
|
||||
+ settings.geocodingApiMethod === 'key'
|
||||
+ ? settings.geocodingApiKey
|
||||
+ : readFileSync(settings.geocodingApiPath, 'utf-8').trim();
|
||||
+
|
||||
if (settings.searchProvider == 'osm')
|
||||
this.searchProvider = new geosearch.OpenStreetMapProvider();
|
||||
else if (settings.searchProvider == 'google') {
|
||||
- this.searchProvider = new geosearch.GoogleProvider({
|
||||
- apiKey: settings.geocodingApiKey,
|
||||
- });
|
||||
+ this.searchProvider = new geosearch.GoogleProvider({ apiKey });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,10 +123,15 @@ export async function googlePlacesSearch(
|
||||
): Promise<GeoSearchResult[]> {
|
||||
if (settings.searchProvider != 'google' || !settings.useGooglePlaces)
|
||||
return [];
|
||||
- const googleApiKey = settings.geocodingApiKey;
|
||||
+
|
||||
+ const apiKey =
|
||||
+ settings.geocodingApiMethod === 'key'
|
||||
+ ? settings.geocodingApiKey
|
||||
+ : readFileSync(settings.geocodingApiPath, 'utf-8').trim();
|
||||
+
|
||||
const params = {
|
||||
query: query,
|
||||
- key: googleApiKey,
|
||||
+ key: apiKey,
|
||||
};
|
||||
if (centerOfSearch)
|
||||
(params as any)['location'] =
|
||||
diff --git a/src/settings.ts b/src/settings.ts
|
||||
index 44a0464..1cd6015 100644
|
||||
--- a/src/settings.ts
|
||||
+++ b/src/settings.ts
|
||||
@@ -48,7 +48,9 @@ export type PluginSettings = {
|
||||
maxClusterRadiusPixels: number;
|
||||
searchProvider: 'osm' | 'google';
|
||||
searchDelayMs: number;
|
||||
- geocodingApiKey: string;
|
||||
+ geocodingApiMethod?: 'key' | 'path';
|
||||
+ geocodingApiKey?: string;
|
||||
+ geocodingApiPath?: string;
|
||||
useGooglePlaces: boolean;
|
||||
saveHistory: boolean;
|
||||
queryForFollowActiveNote: string;
|
||||
@@ -228,6 +230,7 @@ export const DEFAULT_SETTINGS: PluginSettings = {
|
||||
maxClusterRadiusPixels: 20,
|
||||
searchProvider: 'osm',
|
||||
searchDelayMs: 250,
|
||||
+ geocodingApiMethod: 'key',
|
||||
geocodingApiKey: '',
|
||||
useGooglePlaces: false,
|
||||
mapSources: [
|
||||
diff --git a/src/settingsTab.ts b/src/settingsTab.ts
|
||||
index 7a5994c..ea586fd 100644
|
||||
--- a/src/settingsTab.ts
|
||||
+++ b/src/settingsTab.ts
|
||||
@@ -54,7 +54,10 @@ export class SettingsTab extends PluginSettingTab {
|
||||
});
|
||||
});
|
||||
|
||||
+ let apiMethodControl: Setting = null;
|
||||
let apiKeyControl: Setting = null;
|
||||
+ let apiPathControl: Setting = null;
|
||||
+
|
||||
new Setting(containerEl)
|
||||
.setName('Geocoding search provider')
|
||||
.setDesc(
|
||||
@@ -72,8 +75,19 @@ export class SettingsTab extends PluginSettingTab {
|
||||
this.plugin.settings.searchProvider = value;
|
||||
await this.plugin.saveSettings();
|
||||
this.refreshPluginOnHide = true;
|
||||
- apiKeyControl.settingEl.style.display =
|
||||
+
|
||||
+ apiMethodControl.settingEl.style.display =
|
||||
value === 'google' ? '' : 'none';
|
||||
+ apiKeyControl.settingEl.style.display =
|
||||
+ value === 'google' &&
|
||||
+ this.plugin.settings.geocodingApiMethod === 'key'
|
||||
+ ? ''
|
||||
+ : 'none';
|
||||
+ apiPathControl.settingEl.style.display =
|
||||
+ value === 'google' &&
|
||||
+ this.plugin.settings.geocodingApiMethod === 'path'
|
||||
+ ? ''
|
||||
+ : 'none';
|
||||
googlePlacesControl.settingEl.style.display =
|
||||
this.plugin.settings.searchProvider === 'google'
|
||||
? ''
|
||||
@@ -81,8 +95,37 @@ export class SettingsTab extends PluginSettingTab {
|
||||
});
|
||||
});
|
||||
|
||||
+ apiMethodControl = new Setting(containerEl)
|
||||
+ .setName('Geocoding API Method')
|
||||
+ .setDesc(
|
||||
+ 'Choose whether to provide the API key directly or via a file path.'
|
||||
+ )
|
||||
+ .addDropdown((component) => {
|
||||
+ component
|
||||
+ .addOption('key', 'API Key')
|
||||
+ .addOption('path', 'API Key Path')
|
||||
+ .setValue(this.plugin.settings.geocodingApiMethod || 'key')
|
||||
+ .onChange(async (value: 'key' | 'path') => {
|
||||
+ this.plugin.settings.geocodingApiMethod = value;
|
||||
+ await this.plugin.saveSettings();
|
||||
+ apiKeyControl.settingEl.style.display =
|
||||
+ value === 'key' &&
|
||||
+ this.plugin.settings.searchProvider === 'google'
|
||||
+ ? ''
|
||||
+ : 'none';
|
||||
+ apiPathControl.settingEl.style.display =
|
||||
+ value === 'path' &&
|
||||
+ this.plugin.settings.searchProvider === 'google'
|
||||
+ ? ''
|
||||
+ : 'none';
|
||||
+ });
|
||||
+ });
|
||||
+
|
||||
+ apiMethodControl.settingEl.style.display =
|
||||
+ this.plugin.settings.searchProvider === 'google' ? '' : 'none';
|
||||
+
|
||||
apiKeyControl = new Setting(containerEl)
|
||||
- .setName('Gecoding API key')
|
||||
+ .setName('Geocoding API key')
|
||||
.setDesc(
|
||||
'If using Google as the geocoding search provider, paste the API key here. See the plugin documentation for more details. Changes are applied after restart.',
|
||||
)
|
||||
@@ -101,6 +144,40 @@ export class SettingsTab extends PluginSettingTab {
|
||||
? ''
|
||||
: 'red';
|
||||
});
|
||||
+
|
||||
+ apiKeyControl.settingEl.style.display =
|
||||
+ this.plugin.settings.searchProvider === 'google' &&
|
||||
+ this.plugin.settings.geocodingApiMethod === 'key'
|
||||
+ ? ''
|
||||
+ : 'none';
|
||||
+
|
||||
+ apiPathControl = new Setting(containerEl)
|
||||
+ .setName('Geocoding API key path')
|
||||
+ .setDesc(
|
||||
+ 'If using Google as the geocoding search provider and using a path to the API key, enter the file path here. See the plugin documentation for more details. Changes are applied after restart.'
|
||||
+ )
|
||||
+ .addText((component) => {
|
||||
+ component
|
||||
+ .setValue(this.plugin.settings.geocodingApiPath)
|
||||
+ .onChange(async (value) => {
|
||||
+ this.plugin.settings.geocodingApiPath = value;
|
||||
+ await this.plugin.saveSettings();
|
||||
+ component.inputEl.style.borderColor = value
|
||||
+ ? ''
|
||||
+ : 'red';
|
||||
+ });
|
||||
+ component.inputEl.style.borderColor = this.plugin.settings
|
||||
+ .geocodingApiPath
|
||||
+ ? ''
|
||||
+ : 'red';
|
||||
+ });
|
||||
+
|
||||
+ apiPathControl.settingEl.style.display =
|
||||
+ this.plugin.settings.searchProvider === 'google' &&
|
||||
+ this.plugin.settings.geocodingApiMethod === 'path'
|
||||
+ ? ''
|
||||
+ : 'none';
|
||||
+
|
||||
let googlePlacesControl = new Setting(containerEl)
|
||||
.setName('Use Google Places for searches')
|
||||
.setDesc(
|
||||
@@ -118,9 +195,6 @@ export class SettingsTab extends PluginSettingTab {
|
||||
});
|
||||
});
|
||||
|
||||
- // Display the API key control only if the search provider requires it
|
||||
- apiKeyControl.settingEl.style.display =
|
||||
- this.plugin.settings.searchProvider === 'google' ? '' : 'none';
|
||||
googlePlacesControl.settingEl.style.display =
|
||||
this.plugin.settings.searchProvider === 'google' ? '' : 'none';
|
||||
new Setting(containerEl)
|
||||
diff --git a/src/urlConvertor.ts b/src/urlConvertor.ts
|
||||
index 365f49b..2fdf0b8 100644
|
||||
--- a/src/urlConvertor.ts
|
||||
+++ b/src/urlConvertor.ts
|
||||
@@ -1,6 +1,6 @@
|
||||
import { App, Editor, TFile, request } from 'obsidian';
|
||||
import queryString from 'query-string';
|
||||
-
|
||||
+import { readFileSync } from 'fs';
|
||||
import * as leaflet from 'leaflet';
|
||||
import { type PluginSettings, type UrlParsingRule } from 'src/settings';
|
||||
import * as utils from 'src/utils';
|
||||
@@ -136,10 +136,15 @@ export class UrlConvertor {
|
||||
const placeName = placeNameMatch[1];
|
||||
if (this.settings.debug)
|
||||
console.log('Google link: found place name = ', placeName);
|
||||
- const googleApiKey = settings.geocodingApiKey;
|
||||
+
|
||||
+ const apiKey =
|
||||
+ settings.geocodingApiMethod === 'key'
|
||||
+ ? settings.geocodingApiKey
|
||||
+ : readFileSync(settings.geocodingApiPath, 'utf-8').trim();
|
||||
+
|
||||
const params = {
|
||||
query: placeName,
|
||||
- key: googleApiKey,
|
||||
+ key: apiKey,
|
||||
};
|
||||
const googleUrl =
|
||||
'https://maps.googleapis.com/maps/api/place/textsearch/json?' +
|
3766
packages/obsidian/plugins/map-view/package-lock.patch
Normal file
3766
packages/obsidian/plugins/map-view/package-lock.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-minimal-settings
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.minimal-settings";
|
||||
pname = "obsidian-plugin-minimal-settings";
|
||||
version = "8.1.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "5a69fb195726cc61ae3ca9b14fb1a78862397529";
|
||||
# owner = "kepano";
|
||||
owner = "kepano";
|
||||
repo = "obsidian-minimal-settings";
|
||||
# rev = version;
|
||||
hash = "sha256-FPZMdOcwkCnCN0v3IgiFnhBLrnuqU7DR7XE+qheYdZE=";
|
||||
rev = version;
|
||||
hash = "sha256-JcWqSVgSRJAm0QiLnGuPpv0S9SVZw7UdtuKnvUAKiwQ=";
|
||||
};
|
||||
|
||||
patches = [ ./package-lock.patch ];
|
||||
|
||||
npmDepsHash = "sha256-E8CPsBmuV51GC3N5qxz8haa249vMfm3TZyZVsyPwfkg=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
@@ -0,0 +1,28 @@
|
||||
diff --git a/package-lock.json b/package-lock.json
|
||||
index 1ff5c84..a903c9a 100644
|
||||
--- a/package-lock.json
|
||||
+++ b/package-lock.json
|
||||
@@ -11,7 +11,7 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.6",
|
||||
"esbuild": "0.13.12",
|
||||
- "obsidian": "latest",
|
||||
+ "obsidian": "^1.6.6",
|
||||
"tslib": "2.3.1",
|
||||
"typescript": "^5.5.3"
|
||||
}
|
||||
@@ -325,10 +325,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/obsidian": {
|
||||
- "version": "1.5.7-1",
|
||||
- "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.5.7-1.tgz",
|
||||
- "integrity": "sha512-T5ZRuQ1FnfXqEoakTTHVDYvzUEEoT8zSPnQCW31PVgYwG4D4tZCQfKHN2hTz1ifnCe8upvwa6mBTAP2WUA5Vng==",
|
||||
+ "version": "1.7.2",
|
||||
+ "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.7.2.tgz",
|
||||
+ "integrity": "sha512-k9hN9brdknJC+afKr5FQzDRuEFGDKbDjfCazJwpgibwCAoZNYHYV8p/s3mM8I6AsnKrPKNXf8xGuMZ4enWelZQ==",
|
||||
"dev": true,
|
||||
+ "license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/codemirror": "5.60.8",
|
||||
"moment": "2.29.4"
|
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-outliner
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.outliner";
|
||||
pname = "obsidian-plugin-outliner";
|
||||
version = "4.8.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
@@ -1,6 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-read-it-later
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.read-it-later";
|
||||
pname = "obsidian-plugin-read-it-later";
|
||||
version = "0.11.4";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
@@ -1,19 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-style-settings --src-attr unpatchedSrc
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "obsidian.plugins.style-settings";
|
||||
pname = "obsidian-plugin-style-settings";
|
||||
version = "1.0.9";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "21f29b7aea728d9040ed209cddb7d9f05c68be1f";
|
||||
# owner = "mgmeyers";
|
||||
unpatchedSrc = pkgs.fetchFromGitHub {
|
||||
owner = "mgmeyers";
|
||||
repo = "obsidian-style-settings";
|
||||
# rev = version;
|
||||
hash = "sha256-6xyp5PE4mhKYP3Lc4vKUG/N3aqBhHGwsCuzfVkq1jwM=";
|
||||
rev = version;
|
||||
hash = "sha256-eNbZQ/u3mufwVX+NRJpMSk5uGVkWfW0koXKq7wg9d+I=";
|
||||
};
|
||||
|
||||
# Wrap in applyPatches so that offlineCache below is built correctly
|
||||
src = pkgs.applyPatches {
|
||||
src = unpatchedSrc;
|
||||
patches = [ ./package-lock.patch ];
|
||||
};
|
||||
|
||||
offlineCache = pkgs.fetchYarnDeps {
|
||||
yarnLock = src + "/yarn.lock";
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-tqX09XWI3ZL9bXVdjgsAEuvfCAjnyWj5uSWGFbNApds=";
|
||||
};
|
||||
|
67
packages/obsidian/plugins/style-settings/package-lock.patch
Normal file
67
packages/obsidian/plugins/style-settings/package-lock.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
diff --git a/package.json b/package.json
|
||||
index 2984db3..87e96bd 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -32,7 +32,7 @@
|
||||
"typescript": "4.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
- "@simonwep/pickr": "https://github.com/nothingislost/pickr/archive/a17739f7aa1871b44da778cbb79ae76dae77d839.tar.gz",
|
||||
+ "@simonwep/pickr": "^1.9.1",
|
||||
"@types/chroma-js": "^2.1.3",
|
||||
"@types/js-yaml": "^4.0.3",
|
||||
"chroma-js": "^2.1.2",
|
||||
diff --git a/yarn.lock b/yarn.lock
|
||||
index 6ef7388..9d006fd 100644
|
||||
--- a/yarn.lock
|
||||
+++ b/yarn.lock
|
||||
@@ -336,13 +336,13 @@
|
||||
"@nodelib/fs.scandir" "2.1.5"
|
||||
fastq "^1.6.0"
|
||||
|
||||
-"@simonwep/pickr@https://github.com/nothingislost/pickr/archive/a17739f7aa1871b44da778cbb79ae76dae77d839.tar.gz":
|
||||
- version "1.8.4"
|
||||
- resolved "https://github.com/nothingislost/pickr/archive/a17739f7aa1871b44da778cbb79ae76dae77d839.tar.gz"
|
||||
- integrity sha512-VOphUjenpUXHMrYo+uNREruBB/xhMsvqqnJMUShctn1pQXWMDp41a9NJ6XyhISwlyRNoubkuXEn/7/3MuvAhyg==
|
||||
+"@simonwep/pickr@^1.9.1":
|
||||
+ version "1.9.1"
|
||||
+ resolved "https://registry.yarnpkg.com/@simonwep/pickr/-/pickr-1.9.1.tgz#10d86dab514b8888b2d6b90299a477f254067c43"
|
||||
+ integrity sha512-fR3qmfAcPf/HSFS7GEnTmZLM3+xERv1+jyMBbzT63ilRRM8veYjI7ELvkHHKk0/du3lHp7uh/FqatjM3646X1g==
|
||||
dependencies:
|
||||
- core-js "^3.15.1"
|
||||
- nanopop "^2.1.0"
|
||||
+ core-js "3.37.0"
|
||||
+ nanopop "2.4.2"
|
||||
|
||||
"@trivago/prettier-plugin-sort-imports@4.2.0":
|
||||
version "4.2.0"
|
||||
@@ -607,10 +607,10 @@ concat-map@0.0.1:
|
||||
resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz"
|
||||
integrity "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
|
||||
-core-js@^3.15.1:
|
||||
- version "3.18.2"
|
||||
- resolved "https://registry.npmjs.org/core-js/-/core-js-3.18.2.tgz"
|
||||
- integrity sha512-zNhPOUoSgoizoSQFdX1MeZO16ORRb9FFQLts8gSYbZU5FcgXhp24iMWMxnOQo5uIaIG7/6FA/IqJPwev1o9ZXQ==
|
||||
+core-js@3.37.0:
|
||||
+ version "3.37.0"
|
||||
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.37.0.tgz#d8dde58e91d156b2547c19d8a4efd5c7f6c426bb"
|
||||
+ integrity sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==
|
||||
|
||||
cross-env@^6.0.3:
|
||||
version "6.0.3"
|
||||
@@ -1128,10 +1128,10 @@ ms@2.1.2:
|
||||
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
|
||||
-nanopop@^2.1.0:
|
||||
- version "2.1.0"
|
||||
- resolved "https://registry.npmjs.org/nanopop/-/nanopop-2.1.0.tgz"
|
||||
- integrity sha512-jGTwpFRexSH+fxappnGQtN9dspgE2ipa1aOjtR24igG0pv6JCxImIAmrLRHX+zUF5+1wtsFVbKyfP51kIGAVNw==
|
||||
+nanopop@2.4.2:
|
||||
+ version "2.4.2"
|
||||
+ resolved "https://registry.yarnpkg.com/nanopop/-/nanopop-2.4.2.tgz#b55482135be7e64f2d0f5aa8ef51a58104ac7b13"
|
||||
+ integrity sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==
|
||||
|
||||
natural-compare@^1.4.0:
|
||||
version "1.4.0"
|
@@ -1,7 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-tasks
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "obsidian.plugins.tasks";
|
||||
version = "7.15.0";
|
||||
pname = "obsidian-plugin-tasks";
|
||||
version = "7.17.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "obsidian-tasks-group";
|
@@ -1,17 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-url-into-selection
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.plugins.url-into-selection";
|
||||
pname = "obsidian-plugin-url-into-selection";
|
||||
version = "1.7.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "karaolidis";
|
||||
rev = "9f85d59be28797b7ef16c452fa3c4093f60b3bab";
|
||||
# owner = "denolehov";
|
||||
owner = "denolehov";
|
||||
repo = "obsidian-url-into-selection";
|
||||
# rev = version;
|
||||
hash = "sha256-MQV8CMzCha0MUGLh4c1WuHVXRiCPEwtSgd3Xoj/81hA=";
|
||||
rev = version;
|
||||
hash = "sha256-xmKJOuXirg/LFVK/0925fazW+cm+XUlLpAUgpAS6bZI=";
|
||||
};
|
||||
|
||||
patches = [ ./package-lock.patch ];
|
||||
|
||||
npmDepsHash = "sha256-tThyrhezHZ29JUzx5sy2SfoZIGYP0DOQBctxYB5O1P4=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
3990
packages/obsidian/plugins/url-into-selection/package-lock.patch
Normal file
3990
packages/obsidian/plugins/url-into-selection/package-lock.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-theme-minimal
|
||||
pkgs.buildNpmPackage rec {
|
||||
pname = "obsidian.themes.minimal";
|
||||
version = "7.7.18";
|
||||
pname = "obsidian-theme-minimal";
|
||||
version = "7.7.19";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kepano";
|
||||
repo = "obsidian-minimal";
|
||||
rev = version;
|
||||
hash = "sha256-zOUOE8EQlnnOmEhkWQmT28eH2Yk7fgkNvbxjJzLXio8=";
|
||||
hash = "sha256-1NUnOmQVbikUNcQcPSi0JYxMR6z7s1gZ1iFmR5SOkbM=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-PzsZv/On8ci6EkF3WE4aez3/jQu5AqyJxFUzJk+Pn0c=";
|
||||
npmDepsHash = "sha256-R+XeEkDP0MxNQsFCWmHXKtLBcmiOTv9Nw7t2e27kvQg=";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [ sass ];
|
23
packages/sas/sage/default.nix
Normal file
23
packages/sas/sage/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: echo "Warning: Package from private git repository cannot be automatically updated." >&2
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "sage";
|
||||
version = "1.55.0";
|
||||
|
||||
src = fetchGit {
|
||||
url = "git@github.com:sas-institute-rnd-internal/pipeline-sage.git";
|
||||
ref = "main";
|
||||
rev = "41a07811d8c8002d452dc677151b87dbbeae2b81";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-ye76doo/3bkHxY8l7060ElQlRwY0/C3h7ICJTMmXg5k=";
|
||||
|
||||
preBuild = ''
|
||||
export GOPROXY="goproxy.unx.sas.com"
|
||||
export GONOSUMDB="*.sas.com,sassoftware.io"
|
||||
|
||||
rm -rf cmd/bootstrap python sage
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user