diff --git a/flake.lock b/flake.lock index 4bcca11..e469a91 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1720402389, - "narHash": "sha256-zJv6euDOrJWMHBhxfp/ay+Dvjwpe8YtMuEI5b09bxmo=", + "lastModified": 1720661479, + "narHash": "sha256-nsGgA14vVn0GGiqEfomtVgviRJCuSR3UEopfP8ixW1I=", "owner": "nix-community", "repo": "disko", - "rev": "f1a00e7f55dc266ef286cc6fc8458fa2b5ca2414", + "rev": "786965e1b1ed3fd2018d78399984f461e2a44689", "type": "github" }, "original": { @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1720443333, - "narHash": "sha256-VS0HCv6M2Fr+XpCYpqkUNm74GboXlK2mPLWvSPsGMBg=", + "lastModified": 1720880905, + "narHash": "sha256-HTQhSHuLeVAcUqmYyYggHjinR9ZMfoMja3chp/5uCJw=", "owner": "karaolidis", "repo": "home-manager", - "rev": "178325dcb3e4afbf725d21cdc7f366f1c7f1a448", + "rev": "d60b0a5ff6e8a3004016f072e4d110033c2c7d06", "type": "github" }, "original": { @@ -79,27 +79,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720031269, - "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "lastModified": 1720966710, + "narHash": "sha256-cHBkUqyRAW+hxKTnAmDp83prQzRiF8fdIdz5QwpwL6w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "rev": "37566db10b2b3da434d9ce2a01088efd76f72200", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "master", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1720282526, - "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=", + "lastModified": 1720915306, + "narHash": "sha256-6vuViC56+KSr+945bCV8akHK+7J5k6n/epYg/W3I5eQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927", + "rev": "74348da2f3a312ee25cea09b98cdba4cb9fa5d5d", "type": "github" }, "original": { @@ -127,11 +127,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1720321395, - "narHash": "sha256-kcI8q9Nh8/CSj0ygfWq1DLckHl8IHhFarL8ie6g7OEk=", + "lastModified": 1720926522, + "narHash": "sha256-eTpnrT6yu1vp8C0B5fxHXhgKxHoYMoYTEikQx///jxY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c184aca4db5d71c3db0c8cbfcaaec337a5d065ea", + "rev": "0703ba03fd9c1665f8ab68cc3487302475164617", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 27cd3b9..8d26cdb 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ owner = "NixOS"; # owner = "karaolidis"; repo = "nixpkgs"; - ref = "nixos-unstable"; + ref = "master"; # ref = "integration"; # url = "git+file:./submodules/nixpkgs"; }; diff --git a/hosts/common/system/configs/nix/default.nix b/hosts/common/system/configs/nix/default.nix index 1d8574b..3393186 100644 --- a/hosts/common/system/configs/nix/default.nix +++ b/hosts/common/system/configs/nix/default.nix @@ -1,5 +1,7 @@ -{ inputs, ... }: +{ config, inputs, ... }: { + sops.secrets."nix/accessTokens/github".group = "users"; + nix = { settings = { use-xdg-base-directories = true; @@ -12,6 +14,10 @@ registry.self.flake = inputs.self; gc.automatic = true; optimise.automatic = true; + + extraOptions = '' + !include ${config.sops.secrets."nix/accessTokens/github".path} + ''; }; nixpkgs.config.allowUnfree = true; diff --git a/hosts/common/system/configs/system/default.nix b/hosts/common/system/configs/system/default.nix index fdadd42..82965b6 100644 --- a/hosts/common/system/configs/system/default.nix +++ b/hosts/common/system/configs/system/default.nix @@ -12,6 +12,6 @@ dates = "02:00"; }; - stateVersion = "24.05"; + stateVersion = "24.11"; }; } diff --git a/hosts/common/user/configs/console/home-manager/default.nix b/hosts/common/user/configs/console/home-manager/default.nix index 04468f7..c932aa5 100644 --- a/hosts/common/user/configs/console/home-manager/default.nix +++ b/hosts/common/user/configs/console/home-manager/default.nix @@ -15,7 +15,7 @@ useGlobalPkgs = true; users.${username} = { - home.stateVersion = "24.05"; + home.stateVersion = "24.11"; systemd.user.startServices = "sd-switch"; nix.settings = config.nix.settings; nixpkgs.config = config.nixpkgs.config; diff --git a/hosts/common/user/configs/console/pipewire/default.nix b/hosts/common/user/configs/console/pipewire/default.nix index f53c4ea..2b9fc19 100644 --- a/hosts/common/user/configs/console/pipewire/default.nix +++ b/hosts/common/user/configs/console/pipewire/default.nix @@ -8,6 +8,7 @@ wireplumber playerctl ]; + services.playerctld.enable = true; }; } diff --git a/hosts/common/user/configs/gui/ags/config/default.nix b/hosts/common/user/configs/gui/ags/config/default.nix index b737604..33ceb4b 100644 --- a/hosts/common/user/configs/gui/ags/config/default.nix +++ b/hosts/common/user/configs/gui/ags/config/default.nix @@ -3,7 +3,8 @@ ... }: pkgs.stdenv.mkDerivation { - name = "ags.config"; + pname = "ags.config"; + version = "0.0.1"; src = ./.; diff --git a/hosts/common/user/configs/gui/firefox/default.nix b/hosts/common/user/configs/gui/firefox/default.nix index 4074420..3f25952 100644 --- a/hosts/common/user/configs/gui/firefox/default.nix +++ b/hosts/common/user/configs/gui/firefox/default.nix @@ -127,6 +127,16 @@ in }; }; + xdg.mimeApps.defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + + home.sessionVariables.DEFAULT_BROWSER = lib.meta.getExe pkgs.firefox; + wayland.windowManager.hyprland.settings.bind = [ "$mod, b, exec, ${lib.meta.getExe pkgs.firefox}" ]; home.persistence = { diff --git a/hosts/common/user/configs/gui/obsidian/.stignore b/hosts/common/user/configs/gui/obsidian/.stignore index 1298f8d..d5d41dc 100644 --- a/hosts/common/user/configs/gui/obsidian/.stignore +++ b/hosts/common/user/configs/gui/obsidian/.stignore @@ -1,13 +1,4 @@ -// Declared -*/.obsidian/app.json -*/.obsidian/appearance.json -*/.obsidian/core-plugins*.json -*/.obsidian/snippets +!*/.obsidian/bookmarks.json -// Dynamic -*/.obsidian/graph.json -*/.obsidian/workspace.json -*/.obsidian/workspace-mobile.json - -// Android +*/.obsidian .nomedia diff --git a/hosts/common/user/configs/gui/obsidian/default.nix b/hosts/common/user/configs/gui/obsidian/default.nix index aa5992d..59c8e9a 100644 --- a/hosts/common/user/configs/gui/obsidian/default.nix +++ b/hosts/common/user/configs/gui/obsidian/default.nix @@ -54,19 +54,376 @@ in ]; plugins = [ - (import ./plugins/style-settings.nix { inherit pkgs; }) { - pkg = import ./plugins/minimal-settings.nix { inherit pkgs; }; + pkg = import ./plugins/custom-sort { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + suspended = false; + statusBarEntryEnabled = false; + notificationsEnabled = false; + mobileNotificationsEnabled = true; + customSortContextSubmenu = false; + bookmarksGroupToConsumeAsOrderingReference = "Sort"; + bookmarksContextMenus = false; + }; + } + { + pkg = import ./plugins/dataview { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + enableDataviewJs = true; + enableInlineDataviewJs = true; + warnOnEmptyResult = false; + defaultDateFormat = "dd/MM/yyyy"; + defaultDateTimeFormat = "HH:mm - dd/MM/yyyy"; + }; + } + { + pkg = import ./plugins/excalidraw { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + folder = "Inbox"; + templateFilePath = "Templates"; + scriptFolderPath = "Scripts"; + compress = false; + drawingFilenamePrefix = ""; + drawingEmbedPrefixWithFilename = false; + drawingFilenameDateTime = "YYYY-MM-DD-HH.mm.ss"; + previewImageType = "SVG"; + previewMatchObsidianTheme = true; + defaultPenMode = "mobile"; + parseTODO = true; + focusOnFileTab = true; + pngExportScale = 2; + exportWithTheme = false; + exportWithBackground = false; + exportEmbedScene = true; + showReleaseNotes = false; + showNewVersionNotification = false; + }; + } + { + pkg = import ./plugins/kanban { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + move-tags = true; + move-dates = true; + date-display-format = "DD/MM/YYYY"; + show-relative-date = true; + date-picker-week-start = 1; + inline-metadata-position = "footer"; + move-task-metadata = true; + show-archive-all = false; + show-board-settings = false; + }; + } + { + pkg = import ./plugins/linter { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + lintOnSave = true; + displayChanged = false; + lintOnFileChange = true; + ruleConfigs = { + add-blank-line-after-yaml.enabled = true; + dedupe-yaml-array-values.enabled = true; + escape-yaml-special-characters = { + enabled = true; + try-to-escape-single-line-arrays = true; + }; + format-tags-in-yaml.enabled = true; + format-yaml-array = { + enabled = true; + default-array-style = "multi-line"; + }; + sort-yaml-array-values.enabled = true; + yaml-key-sort = { + enabled = true; + yaml-sort-order-for-other-keys = "Ascending Alphabetical"; + }; + capitalize-headings = { + enabled = true; + ignore-words = ""; + }; + header-increment = { + enabled = true; + start-at-h2 = true; + }; + headings-start-line.enabled = true; + remove-trailing-punctuation-in-heading.enabled = true; + auto-correct-common-misspellings.enabled = true; + blockquote-style.enabled = true; + convert-bullet-list-markers.enabled = true; + emphasis-style = { + enabled = true; + style = "asterisk"; + }; + no-bare-urls = { + enabled = true; + no-bare-uris = true; + }; + ordered-list-style.enabled = true; + quote-style.enabled = true; + remove-consecutive-list-markers.enabled = true; + remove-empty-list-markers.enabled = true; + remove-hyphenated-line-breaks.enabled = true; + remove-multiple-spaces.enabled = true; + strong-style = { + enabled = true; + style = "asterisk"; + }; + two-spaces-between-lines-with-content.enabled = true; + unordered-list-style = { + enabled = true; + list-style = "-"; + }; + compact-yaml = { + enabled = true; + inner-new-lines = true; + }; + consecutive-blank-lines.enabled = true; + empty-line-around-blockquotes.enabled = true; + empty-line-around-code-fences.enabled = true; + empty-line-around-math-blocks.enabled = true; + empty-line-around-tables.enabled = true; + heading-blank-lines.enabled = true; + line-break-at-document-end.enabled = true; + move-math-block-indicators-to-their-own-line.enabled = true; + paragraph-blank-lines.enabled = true; + remove-empty-lines-between-list-markers-and-checklists.enabled = true; + remove-link-spacing.enabled = true; + space-after-list-markers.enabled = true; + trailing-spaces.enabled = true; + add-blockquote-indentation-on-paste.enabled = true; + prevent-double-checklist-indicator-on-paste.enabled = true; + prevent-double-list-item-indicator-on-paste.enabled = true; + remove-hyphens-on-paste.enabled = true; + remove-leading-or-trailing-whitespace-on-paste.enabled = true; + remove-leftover-footnotes-from-quote-on-paste.enabled = true; + remove-multiple-blank-lines-on-paste.enabled = true; + }; + customRegexes = [ + { + label = "Open Double Quote"; + find = "“"; + replace = "\""; + flags = "gm"; + } + { + label = "Close Double Quote"; + find = "”"; + replace = "\""; + flags = "gm"; + } + { + label = "Elipsis"; + find = "…"; + replace = "..."; + flags = "gm"; + } + { + label = "Open Quote"; + find = "‘"; + replace = "'"; + flags = "gm"; + } + { + label = "Close Quote"; + find = "’"; + replace = "'"; + flags = "gm"; + } + { + label = "Long Dash"; + find = "—"; + replace = "---"; + flags = "gm"; + } + { + label = "Short Dash"; + find = "–"; + replace = "--"; + flags = "gm"; + } + { + label = "Long Dash with Text"; + find = "([^\\s])---([^\\s])"; + replace = "$1 --- $2"; + flags = "gm"; + } + { + label = "Short Dash with Text"; + find = "([^\\s])--([^\\s])"; + replace = "$1 -- $2"; + flags = "gm"; + } + ]; + commonStyles = { + removeUnnecessaryEscapeCharsForMultiLineArrays = true; + }; + }; + } + { + pkg = import ./plugins/minimal-settings { inherit pkgs; }; extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { - labeledNav = true; editorFont = "var(--font-monospace)"; }; } + { + pkg = import ./plugins/outliner { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + styleLists = false; + stickCursor = "never"; + }; + } + (import ./plugins/style-settings { inherit pkgs; }) + { + pkg = import ./plugins/tasks { inherit pkgs; }; + extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" { + globalQuery = "short mode"; + globalFilter = "#todo"; + removeGlobalFilter = true; + setCreatedDate = true; + statusSettings = { + coreStatuses = [ + { + symbol = " "; + name = "to-do"; + nextStatusSymbol = "/"; + type = "TODO"; + } + { + symbol = "x"; + name = "done"; + nextStatusSymbol = " "; + type = "DONE"; + } + ]; + customStatuses = [ + { + symbol = "/"; + name = "in-progress"; + nextStatusSymbol = "x"; + type = "IN_PROGRESS"; + } + { + symbol = "-"; + name = "canceled"; + nextStatusSymbol = " "; + type = "CANCELLED"; + } + { + symbol = ">"; + name = "forwarded"; + nextStatusSymbol = "/"; + type = "IN_PROGRESS"; + } + { + symbol = "<"; + name = "scheduling"; + nextStatusSymbol = "/"; + type = "TODO"; + } + { + symbol = "?"; + name = "question"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "!"; + name = "important"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "*"; + name = "star"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "\""; + name = "quote"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "l"; + name = "location"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "b"; + name = "bookmark"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "i"; + name = "information"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "S"; + name = "savings"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "I"; + name = "idea"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "p"; + name = "pros"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "c"; + name = "cons"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "f"; + name = "fire"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "k"; + name = "key"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "w"; + name = "win"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "u"; + name = "up"; + nextStatusSymbol = " "; + type = "TODO"; + } + { + symbol = "d"; + name = "down"; + nextStatusSymbol = " "; + type = "TODO"; + } + ]; + }; + }; + } ]; cssSnippets = [ ./snippets/file-explorer-separators.css ]; - themes = [ (import ./themes/minimal.nix { inherit pkgs; }) ]; + themes = [ (import ./themes/minimal { inherit pkgs; }) ]; }; }; diff --git a/hosts/common/user/configs/gui/obsidian/options.nix b/hosts/common/user/configs/gui/obsidian/options.nix index f159bbe..6787d3f 100644 --- a/hosts/common/user/configs/gui/obsidian/options.nix +++ b/hosts/common/user/configs/gui/obsidian/options.nix @@ -123,6 +123,7 @@ in extraFiles = mkOption { type = attrsOf (submodule pluginsExtraFilesOptions); description = "Additional files to include in the plugin directory."; + default = { }; }; }; }; diff --git a/hosts/common/user/configs/gui/obsidian/plugins/custom-sort/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/custom-sort/default.nix new file mode 100644 index 0000000..44bfb80 --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/custom-sort/default.nix @@ -0,0 +1,33 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.stdenv.mkDerivation rec { + pname = "obsidian.plugins.custom-sort"; + version = "2.1.12"; + + src = pkgs.fetchFromGitHub { + owner = "SebastianMC"; + repo = "obsidian-custom-sort"; + rev = "${version}"; + hash = "sha256-i+Ckh1sqUqFGY5xPQLOCd0sq9kmxsN276wLbhEMAt5g="; + }; + + offlineCache = pkgs.fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-RdR+S6WQj2AAoxJnAowNa1etr/Xfp6HnhM7rMYJh8o8="; + }; + + nativeBuildInputs = with pkgs; [ + nodejs + yarnConfigHook + yarnBuildHook + npmHooks.npmInstallHook + ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./dist/main.js $out/main.js + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/dataview/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/dataview/default.nix new file mode 100644 index 0000000..9ea2f1e --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/dataview/default.nix @@ -0,0 +1,28 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.buildNpmPackage rec { + pname = "obsidian.plugins.dataview"; + version = "0.5.67"; + + src = pkgs.fetchFromGitHub { + owner = "blacksmithgu"; + repo = "obsidian-dataview"; + rev = "${version}"; + hash = "sha256-AbK1J1a8bqkPCe9dqADAfR/q/j/kRGa8qouj9GJQErc="; + }; + + patches = [ ./package-lock.patch ]; + makeCacheWritable = true; + + npmDepsHash = "sha256-FsPLpWcS27VWrDm5G1ZT6zvfOfYmKNLHzmjiXEmpGKE="; + npmPackFlags = [ "--ignore-scripts" ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./build/main.js $out/main.js + cp ./styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/dataview/package-lock.patch b/hosts/common/user/configs/gui/obsidian/plugins/dataview/package-lock.patch new file mode 100644 index 0000000..4b8ed7e --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/dataview/package-lock.patch @@ -0,0 +1,90 @@ +diff --git a/package-lock.json b/package-lock.json +index 0c1b0bd..df26135 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -1,15 +1,15 @@ + { + "name": "obsidian-dataview", +- "version": "0.5.66", ++ "version": "0.5.67", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "obsidian-dataview", +- "version": "0.5.66", ++ "version": "0.5.67", + "license": "MIT", + "dependencies": { +- "@codemirror/language": "https://github.com/lishid/cm-language", ++ "@codemirror/language": "https://github.com/karaolidis/cm-language#package-lock", + "@codemirror/state": "^6.0.1", + "@codemirror/view": "^6.0.1", + "emoji-regex": "^10.0.0", +@@ -687,29 +687,28 @@ + "dev": true + }, + "node_modules/@codemirror/language": { +- "version": "6.6.0", +- "resolved": "git+ssh://git@github.com/lishid/cm-language.git#1aadcc247f20ccfda76424a9f853dbb4ee203fdc", +- "license": "MIT", ++ "version": "6.10.1", ++ "resolved": "git+ssh://git@github.com/karaolidis/cm-language.git#d6238f0a9e17e20d604cee67a47d3a93b00dd41c", + "dependencies": { + "@codemirror/state": "^6.0.0", +- "@codemirror/view": "^6.0.0", +- "@lezer/common": "^1.0.0", ++ "@codemirror/view": "^6.23.0", ++ "@lezer/common": "^1.1.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/state": { +- "version": "6.2.1", +- "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.2.1.tgz", +- "integrity": "sha512-RupHSZ8+OjNT38zU9fKH2sv+Dnlr8Eb8sl4NOnnqz95mCFTZUaiRP8Xv5MeeaG0px2b8Bnfe7YGwCV3nsBhbuw==" ++ "version": "6.4.1", ++ "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.4.1.tgz", ++ "integrity": "sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==" + }, + "node_modules/@codemirror/view": { +- "version": "6.19.0", +- "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.19.0.tgz", +- "integrity": "sha512-XqNIfW/3GaaF+T7Q1jBcRLCPm1NbrR2DBxrXacSt1FG+rNsdsNn3/azAfgpUoJ7yy4xgd8xTPa3AlL+y0lMizQ==", ++ "version": "6.28.4", ++ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.28.4.tgz", ++ "integrity": "sha512-QScv95fiviSQ/CaVGflxAvvvDy/9wi0RFyDl4LkHHWiMr/UPebyuTspmYSeN5Nx6eujcPYwsQzA6ZIZucKZVHQ==", + "dependencies": { +- "@codemirror/state": "^6.1.4", ++ "@codemirror/state": "^6.4.0", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } +@@ -1133,9 +1132,9 @@ + } + }, + "node_modules/@lezer/common": { +- "version": "1.0.4", +- "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.4.tgz", +- "integrity": "sha512-lZHlk8p67x4aIDtJl6UQrXSOP6oi7dQR3W/geFVrENdA1JDaAJWldnVqVjPMJupbTKbzDfFcePfKttqVidS/dg==" ++ "version": "1.2.1", ++ "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.2.1.tgz", ++ "integrity": "sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==" + }, + "node_modules/@lezer/highlight": { + "version": "1.1.6", +diff --git a/package.json b/package.json +index db15b53..d3605a0 100644 +--- a/package.json ++++ b/package.json +@@ -47,7 +47,7 @@ + "rollup-plugin-web-worker-loader": "^1.6.1" + }, + "dependencies": { +- "@codemirror/language": "https://github.com/lishid/cm-language", ++ "@codemirror/language": "https://github.com/karaolidis/cm-language#package-lock", + "@codemirror/state": "^6.0.1", + "@codemirror/view": "^6.0.1", + "emoji-regex": "^10.0.0", diff --git a/hosts/common/user/configs/gui/obsidian/plugins/excalidraw/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/excalidraw/default.nix new file mode 100644 index 0000000..d924f3d --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/excalidraw/default.nix @@ -0,0 +1,31 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.buildNpmPackage rec { + pname = "obsidian.plugins.excalidraw"; + version = "2.2.8"; + + src = pkgs.fetchFromGitHub { + owner = "karaolidis"; + rev = "9f5811b0f849b0f1a6a842945a81b605f65a9bdb"; + # owner = "zsviczian"; + repo = "obsidian-excalidraw-plugin"; + # rev = "${version}"; + hash = "sha256-/YbbGFYWkzBxdIFpFNn85D8oXJsFrgndq3KZmMSxcvw="; + }; + + npmDepsHash = "sha256-KgsmcGj8WbWLCxaXMNA8anGcmOq0BzuDtdeNqS8ra8E="; + npmPackFlags = [ "--ignore-scripts" ]; + + configurePhase = '' + mkdir dist + ''; + + 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 + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/kanban/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/kanban/default.nix new file mode 100644 index 0000000..0e0f67c --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/kanban/default.nix @@ -0,0 +1,34 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.stdenv.mkDerivation rec { + pname = "obsidian.plugins.kanban"; + version = "2.0.51"; + + src = pkgs.fetchFromGitHub { + owner = "mgmeyers"; + repo = "obsidian-kanban"; + rev = "${version}"; + hash = "sha256-NahypggwPrub2KxRBAn54ZpEInP1V+6l/xmUKUt6myA="; + }; + + offlineCache = pkgs.fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-eof2W9Ja4RlmjQ0SnaF/jadHX3GRkCRrMwZU2z0M/Jk="; + }; + + nativeBuildInputs = with pkgs; [ + nodejs + yarnConfigHook + yarnBuildHook + npmHooks.npmInstallHook + ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./main.js $out/main.js + cp ./styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/linter/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/linter/default.nix new file mode 100644 index 0000000..6f83dda --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/linter/default.nix @@ -0,0 +1,25 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.buildNpmPackage rec { + pname = "obsidian.plugins.linter"; + version = "1.25.0"; + + src = pkgs.fetchFromGitHub { + owner = "platers"; + repo = "obsidian-linter"; + rev = "${version}"; + hash = "sha256-jf3tIE6zDD5VCrkWWgxpANqrYUqJunESD08bVJB2H54="; + }; + + npmDepsHash = "sha256-Bln8cD04ACdj73xXrcG6RVlET1D1bfMsRZqaejbAedo="; + npmPackFlags = [ "--ignore-scripts" ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./main.js $out/main.js + cp ./src/styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/minimal-settings.nix b/hosts/common/user/configs/gui/obsidian/plugins/minimal-settings.nix deleted file mode 100644 index aced05d..0000000 --- a/hosts/common/user/configs/gui/obsidian/plugins/minimal-settings.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - pkgs ? import { }, - ... -}: -let - version = "8.0.2"; - author = "kepano"; - repo = "obsidian-minimal-settings"; - - css = builtins.fetchurl { - url = "https://github.com/${author}/${repo}/releases/download/${version}/styles.css"; - sha256 = "sha256:07nkr3sm7dkg8hbmqn45zyaafcblbbvh2s5qlhjh2x0zmi6kmx45"; - }; - - js = builtins.fetchurl { - url = "https://github.com/${author}/${repo}/releases/download/${version}/main.js"; - sha256 = "sha256:0s935p4890mk2b15ffqxyggfcp9p60y1k1121ayni4hh1iinnkcv"; - }; -in -pkgs.stdenv.mkDerivation { - name = "obsidian.plugins.minimal-settings"; - - src = builtins.fetchurl { - url = "https://github.com/${author}/${repo}/releases/download/${version}/manifest.json"; - sha256 = "sha256:1akim1ymm3za9h3h2jy82gc7wviwxvv9kc8rqmp69v9y3h1dn10z"; - }; - - phases = [ "installPhase" ]; - - installPhase = '' - mkdir -p $out - cp $src $out/manifest.json - cp ${css} $out/styles.css - cp ${js} $out/main.js - ''; -} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/minimal-settings/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/minimal-settings/default.nix new file mode 100644 index 0000000..11d581a --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/minimal-settings/default.nix @@ -0,0 +1,27 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.buildNpmPackage rec { + pname = "obsidian.plugins.minimal-settings"; + version = "8.0.2"; + + src = pkgs.fetchFromGitHub { + owner = "karaolidis"; + rev = "2bdab8f00be4b98600e40d6a2ecac8be359c99dd"; + # owner = "kepano"; + repo = "obsidian-minimal-settings"; + # rev = "${version}"; + hash = "sha256-JI7I1n6ZiWdzemoLFGt7C3RF+HQgh9BmmI3owZNm944="; + }; + + npmDepsHash = "sha256-N9wfFsbpcO53Lno6sM4OvXywUqn9L2DpS4HfmjL1Ld4="; + npmPackFlags = [ "--ignore-scripts" ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./main.js $out/main.js + cp ./styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/outliner/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/outliner/default.nix new file mode 100644 index 0000000..97b7252 --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/outliner/default.nix @@ -0,0 +1,25 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.buildNpmPackage rec { + pname = "obsidian.plugins.outliner"; + version = "4.8.1"; + + src = pkgs.fetchFromGitHub { + owner = "vslinko"; + repo = "obsidian-outliner"; + rev = "${version}"; + hash = "sha256-LfkK1c3khA75UZQMJStvV2bccHTz4eMqtEIC8jPFKBM="; + }; + + npmDepsHash = "sha256-EVSunBtuOo93Zhq95u80j/MArRZaAyKdcwUz61qHXiQ="; + npmPackFlags = [ "--ignore-scripts" ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./main.js $out/main.js + cp ./styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/style-settings.nix b/hosts/common/user/configs/gui/obsidian/plugins/style-settings.nix deleted file mode 100644 index 1ad14b7..0000000 --- a/hosts/common/user/configs/gui/obsidian/plugins/style-settings.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - pkgs ? import { }, - ... -}: -let - version = "1.0.8"; - author = "mgmeyers"; - repo = "obsidian-style-settings"; - - css = builtins.fetchurl { - url = "https://github.com/${author}/${repo}/releases/download/${version}/styles.css"; - sha256 = "sha256:029kza0ja1hgw8fmknnphr65gvkanykhx9wb4ig05n8ybrg3aqdl"; - }; - - js = builtins.fetchurl { - url = "https://github.com/${author}/${repo}/releases/download/${version}/main.js"; - sha256 = "sha256:15wdwv50wfhk7h1wgl4wjk975pihsjjrzlyh9a30hjpjc15sh9xy"; - }; -in -pkgs.stdenv.mkDerivation { - name = "obsidian.plugins.style-settings"; - - src = builtins.fetchurl { - url = "https://github.com/${author}/${repo}/releases/download/${version}/manifest.json"; - sha256 = "sha256:14bkhnh13cgph51c029jy95dm70cvj1yxqmchkmv1pz46ws2r7hf"; - }; - - phases = [ "installPhase" ]; - - installPhase = '' - mkdir -p $out - cp $src $out/manifest.json - cp ${css} $out/styles.css - cp ${js} $out/main.js - ''; -} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/style-settings/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/style-settings/default.nix new file mode 100644 index 0000000..0c1b9cd --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/style-settings/default.nix @@ -0,0 +1,38 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.stdenv.mkDerivation rec { + pname = "obsidian.plugins.style-settings"; + version = "1.0.8"; + + src = pkgs.fetchFromGitHub { + # owner = "karaolidis"; + # rev = "d4bbe50b8d4c481bfe72650e1c76bf643738e177"; + owner = "mgmeyers"; + repo = "obsidian-style-settings"; + rev = "${version}"; + hash = "sha256-7IpJQxKnu4ST84bJSDcJ9CsieamboGhO59meNS53f10="; + }; + + patches = [ ./yarn-lock.patch ]; + + offlineCache = pkgs.fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-z14W+dIK0VGggvzh5dichJHdbgKOu3bIA8uhnQJE7xU="; + }; + + nativeBuildInputs = with pkgs; [ + nodejs + yarnConfigHook + yarnBuildHook + npmHooks.npmInstallHook + ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./main.js $out/main.js + cp ./styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/plugins/style-settings/yarn-lock.patch b/hosts/common/user/configs/gui/obsidian/plugins/style-settings/yarn-lock.patch new file mode 100644 index 0000000..e379714 --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/style-settings/yarn-lock.patch @@ -0,0 +1,87 @@ +diff --git a/package.json b/package.json +index 7fb1d8f..3d1f473 100644 +--- a/package.json ++++ b/package.json +@@ -11,8 +11,8 @@ + "lint:fix": "eslint ./src --fix", + "clean": "yarn prettier && yarn lint:fix", + "rlnotes": "git log $(git describe --tags --abbrev=0)..HEAD --oneline > release-notes.md && git add release-notes.md", +- "bump": "node version-bump.mjs && git add manifest.json versions.json package.json && yarn rlnotes", +- "release": "git commit -m $npm_package_version && git tag $npm_package_version && git push && git push --tags" ++ "bump": "node version-bump.mjs && git add manifest.json versions.json package.json && yarn rlnotes", ++ "release": "git commit -m $npm_package_version && git tag $npm_package_version && git push && git push --tags" + }, + "keywords": [], + "author": "", +@@ -31,7 +31,7 @@ + "typescript": "^4.0.3" + }, + "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", + "@typescript-eslint/eslint-plugin": "^5.50.0", +diff --git a/yarn.lock b/yarn.lock +index 7eaa833..08d5c1d 100644 +--- a/yarn.lock ++++ b/yarn.lock +@@ -259,13 +259,13 @@ + estree-walker "^1.0.1" + picomatch "^2.2.2" + +-"@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" +@@ -524,7 +524,7 @@ chalk@^2.4.2: + + chalk@^4.0.0: + version "4.1.2" +- resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" ++ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" +@@ -576,10 +576,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" +@@ -1157,10 +1157,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-lite@^1.4.0: + version "1.4.0" diff --git a/hosts/common/user/configs/gui/obsidian/plugins/tasks/default.nix b/hosts/common/user/configs/gui/obsidian/plugins/tasks/default.nix new file mode 100644 index 0000000..f6018f2 --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/plugins/tasks/default.nix @@ -0,0 +1,34 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.stdenv.mkDerivation rec { + pname = "obsidian.plugins.tasks"; + version = "7.6.1"; + + src = pkgs.fetchFromGitHub { + owner = "obsidian-tasks-group"; + repo = "obsidian-tasks"; + rev = "${version}"; + hash = "sha256-7VvoaX2WkKrg2WpR+JQcpT73rAhZXJ3FXr2BBUIwrmA="; + }; + + offlineCache = pkgs.fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-3ReJNZKgecKTbXTWZGSY2hBLHysdbr/iKFS9tgCJvW0="; + }; + + nativeBuildInputs = with pkgs; [ + nodejs + yarnConfigHook + yarnBuildHook + npmHooks.npmInstallHook + ]; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./main.js $out/main.js + cp ./styles.css $out/styles.css + ''; +} diff --git a/hosts/common/user/configs/gui/obsidian/themes/minimal.nix b/hosts/common/user/configs/gui/obsidian/themes/minimal.nix deleted file mode 100644 index f8298c5..0000000 --- a/hosts/common/user/configs/gui/obsidian/themes/minimal.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - pkgs ? import { }, - ... -}: -let - version = "7.7.7"; - - css = builtins.fetchurl { - url = "https://github.com/kepano/obsidian-minimal/releases/download/${version}/theme.css"; - sha256 = "sha256:1j7w6dsl20fbpzy9ldplf658qhg5ka1bkd2a8ac9q4n15lbqnp3a"; - }; -in -pkgs.stdenv.mkDerivation { - name = "obsidian.themes.minimal"; - - src = builtins.fetchurl { - url = "https://github.com/kepano/obsidian-minimal/releases/download/${version}/manifest.json"; - sha256 = "sha256:1hcp8kpzkb2hdj520mqdaar9dh0fcaqwcgji7dd1ws37yzw44kc5"; - }; - - phases = [ "installPhase" ]; - - installPhase = '' - mkdir -p $out - cp $src $out/manifest.json - cp ${css} $out/theme.css - ''; -} diff --git a/hosts/common/user/configs/gui/obsidian/themes/minimal/default.nix b/hosts/common/user/configs/gui/obsidian/themes/minimal/default.nix new file mode 100644 index 0000000..de85f66 --- /dev/null +++ b/hosts/common/user/configs/gui/obsidian/themes/minimal/default.nix @@ -0,0 +1,30 @@ +{ + pkgs ? import { }, + ... +}: +pkgs.buildNpmPackage rec { + pname = "obsidian.themes.minimal"; + version = "7.7.7"; + + src = pkgs.fetchFromGitHub { + owner = "kepano"; + repo = "obsidian-minimal"; + rev = "${version}"; + hash = "sha256-Atb9ZVou4EkfppV7VvTEMG/UruKlADctbXL1M8vvhxQ="; + }; + + npmDepsHash = "sha256-PzsZv/On8ci6EkF3WE4aez3/jQu5AqyJxFUzJk+Pn0c="; + npmPackFlags = [ "--ignore-scripts" ]; + + nativeBuildInputs = with pkgs; [ sass ]; + + buildPhase = '' + npx grunt cssmin + ''; + + installPhase = '' + mkdir -p $out + cp ./manifest.json $out/manifest.json + cp ./theme.css $out/theme.css + ''; +}