Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-11 15:49:10 +00:00
parent 76552af3af
commit 54ec0d98cb
13 changed files with 8046 additions and 96 deletions

5
.gitmodules vendored
View File

@@ -2,8 +2,11 @@
path = submodules/nixpkgs path = submodules/nixpkgs
url = git@github.com:karaolidis/nixpkgs.git url = git@github.com:karaolidis/nixpkgs.git
branch = integration branch = integration
[submodule "submodules/home-manager"] [submodule "submodules/home-manager"]
path = submodules/home-manager path = submodules/home-manager
url = git@github.com:karaolidis/home-manager.git url = git@github.com:karaolidis/home-manager.git
branch = integration branch = integration
[submodule "submodules/spicetify-nix"]
path = submodules/spicetify-nix
url = git@github.com:karaolidis/spicetify-nix.git
branch = integration

70
flake.lock generated
View File

@@ -10,11 +10,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736090999, "lastModified": 1738087375,
"narHash": "sha256-B5CJuHqfJrzPa7tObK0H9669/EClSHpa/P7B9EuvElU=", "narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=",
"owner": "aylur", "owner": "aylur",
"repo": "ags", "repo": "ags",
"rev": "5527c3c07d92c11e04e7fd99d58429493dba7e3c", "rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -30,11 +30,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736497508, "lastModified": 1739233175,
"narHash": "sha256-murrCQMYKtZ8rkZ5O726ZCsCDee1l3ZdmV8yC9gRaIc=", "narHash": "sha256-ZH9J3PtGi1iHoKbn6U1NHxTFU3+eJfRQRjKdvKGJDuQ=",
"owner": "aylur", "owner": "aylur",
"repo": "astal", "repo": "astal",
"rev": "ef4f95608481414053ecdbe4de29bd86fb452813", "rev": "ee91402cabc994bb4fb7c3f5405a218ad0b57fd3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -50,11 +50,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736437680, "lastModified": 1738765162,
"narHash": "sha256-9Sy17XguKdEU9M5peTrkWSlI/O5IAqjHzdzxbXnc30g=", "narHash": "sha256-3Z40qHaFScWUCVQrGc4Y+RdoPsh1R/wIh+AN4cTXP0I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "4d5d07d37ff773338e40a92088f45f4f88e509c8", "rev": "ff3568858c54bd306e9e1f2886f0f781df307dff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -63,22 +63,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@@ -127,11 +111,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736504054, "lastModified": 1739271045,
"narHash": "sha256-Mb0aIdOIg5ge0Lju1zogdAcfklRciR8G0NY6R423oek=", "narHash": "sha256-02+HKJ3izgR4jPOEQE9NnOGEEzXJCCeC30JKNFS5mhU=",
"owner": "karaolidis", "owner": "karaolidis",
"repo": "home-manager", "repo": "home-manager",
"rev": "baa0e7a14088ff1ed891afe4c6457faf40aa30a6", "rev": "6b4318aba9df23942593931dae1da39d5e963b85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -143,11 +127,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1736505015, "lastModified": 1739278786,
"narHash": "sha256-bY3JTStgCgUZa6cE1GAc+c9ZCExCGvpjmPb7ANanhsc=", "narHash": "sha256-QpthHTHPRUrPx94Ztxgmv82BhvMPzNbDQBuhH7G3XPM=",
"owner": "karaolidis", "owner": "karaolidis",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "43ed29dceb72a444d29ec4b0b980deae63ea9791", "rev": "c8ebcc73bb583ea45ec0f0f116aba587b471020e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -166,11 +150,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1736500613, "lastModified": 1739229047,
"narHash": "sha256-OCEXlRyOIMzxrhmnzoX32e241A7+Z+zsuyR7i6AG608=", "narHash": "sha256-sSTgA86wdk8d544c2+gzrfvVPHQF4mbsomvLOW2thn0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "d51e847f68700c38f850a62c2b3e728864a38cde", "rev": "8348d89f30598a73fee7efb4b5d34c3de201e71b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -200,11 +184,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736203741, "lastModified": 1739262228,
"narHash": "sha256-eSjkBwBdQk+TZWFlLbclF2rAh4JxbGg8az4w/Lfe7f4=", "narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c9c88f08e3ee495e888b8d7c8624a0b2519cb773", "rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -215,7 +199,6 @@
}, },
"spicetify-nix": { "spicetify-nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@@ -224,15 +207,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1736482561, "lastModified": 1739278675,
"narHash": "sha256-f4hvN4MF26NIYeFA/H1sVW6KU5X9/jy9l95WrMsNUIU=", "narHash": "sha256-7sqrkaNAf3pNNk97ivLUqqsHRUJjsTRh4gBF+6UHdz0=",
"owner": "Gerg-L", "owner": "karaolidis",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "77fb1ae39e0f5c60a7d0bd6ce078b9c56e3356cb", "rev": "cc6aa601c01c3402624abcb61bce290ee5078faf",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Gerg-L", "owner": "karaolidis",
"ref": "integration",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"type": "github" "type": "github"
} }

View File

@@ -72,7 +72,19 @@
}; };
spicetify-nix = { spicetify-nix = {
url = "github:Gerg-L/spicetify-nix"; # --- Official
# type = "github";
# owner = "Gerg-L";
# repo = "spicetify-nix";
# ref = "master";
# --- Fork
type = "github";
owner = "karaolidis";
repo = "spicetify-nix";
ref = "integration";
# --- Local
# url = "git+file:./submodules/spicetify-nix";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
systems.follows = "systems"; systems.follows = "systems";

View File

@@ -1,13 +1,13 @@
{ pkgs, ... }: { pkgs, ... }:
pkgs.stdenv.mkDerivation rec { pkgs.stdenv.mkDerivation rec {
pname = "obsidian.plugins.custom-sort"; pname = "obsidian.plugins.custom-sort";
version = "3.0.1"; version = "3.1.2";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "SebastianMC"; owner = "SebastianMC";
repo = "obsidian-custom-sort"; repo = "obsidian-custom-sort";
rev = version; rev = version;
hash = "sha256-mIHAqSAIa7nYy1V96WRKhq2ALAT1mGW6ae3hQmzYyXE="; hash = "sha256-a6t0+mzzXQsgUwZ3m3UvF3N83ajGmxalsnD8beAVAr0=";
}; };
offlineCache = pkgs.fetchYarnDeps { offlineCache = pkgs.fetchYarnDeps {

View File

@@ -1,21 +1,20 @@
{ pkgs, ... }: { pkgs, ... }:
pkgs.buildNpmPackage rec { pkgs.buildNpmPackage rec {
pname = "obsidian.plugins.excalidraw"; pname = "obsidian.plugins.excalidraw";
version = "2.2.8"; version = "2.8.3";
pkg = pkgs.fetchFromGitHub { pkg = pkgs.fetchFromGitHub {
rev = "fa46f8c39df2e9646de63bc610a842659c896005";
owner = "zsviczian"; owner = "zsviczian";
repo = "obsidian-excalidraw-plugin"; repo = "obsidian-excalidraw-plugin";
# rev = version; rev = version;
hash = "sha256-kbFJjHPHPIuecZYK5zQ3thgTC45g4g9W9xSNiZd+wPM="; hash = "sha256-vfswTT+FzzcddUQSoy6xseE+PzsWtRx8RkYzqGn6wFQ=";
}; };
mathjaxToSVG = pkgs.buildNpmPackage { mathjaxToSVG = pkgs.buildNpmPackage {
pname = "obsidian.plugins.excalidraw.mathjaxToSVG"; pname = "obsidian.plugins.excalidraw.mathjaxToSVG";
version = "1.0.0"; version = "1.0.0";
src = "${pkg}/MathjaxToSVG"; src = "${pkg}/MathjaxToSVG";
npmDepsHash = "sha256-Q1kLsw1Lu6DVddXNaVAY2CRZ0z2MSSW+tc9VpXljDO4="; npmDepsHash = "sha256-AosKWlX08dpXNQ2YlrfR6jEInmU02Ztf26nmV19Jxok=";
configurePhase = '' configurePhase = ''
mkdir dist mkdir dist
@@ -28,7 +27,9 @@ pkgs.buildNpmPackage rec {
}; };
src = pkg; src = pkg;
npmDepsHash = "sha256-/82kYaDe0ixe6FO0EDHe2h0vGZiE1IrSNos+yKYca/8="; patches = [ ./package-lock.patch ];
npmDepsHash = "sha256-6Y22TD6BMljRGrL/qT54F7bFXcQbY1bQ5GuKEqAXIwY=";
npmPackFlags = [ "--ignore-scripts" ]; npmPackFlags = [ "--ignore-scripts" ];
configurePhase = '' configurePhase = ''

View File

@@ -1,16 +1,16 @@
{ pkgs, ... }: { pkgs, ... }:
pkgs.buildNpmPackage rec { pkgs.buildNpmPackage rec {
pname = "obsidian.plugins.read-it-later"; pname = "obsidian.plugins.read-it-later";
version = "0.10.1"; version = "0.11.4";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "DominikPieper"; owner = "DominikPieper";
repo = "obsidian-ReadItLater"; repo = "obsidian-ReadItLater";
rev = version; rev = version;
hash = "sha256-E+GeTvXD72PNDdge8qoaQvaJ2mcUV+tJpLyIpUBA4sU="; hash = "sha256-Favp5YhRTYhMGsLuPWiFwmU3zA3vwZkkdXABBVy7NNs=";
}; };
npmDepsHash = "sha256-MQAFJjRhKqVlhGbQ79gob8/PwUtIkxRbjukrK6zfa84="; npmDepsHash = "sha256-PUQc3qM/pjJkkO3zpCmga8eO8XaNxyeZAw+0GNPg5Ro=";
npmPackFlags = [ "--ignore-scripts" ]; npmPackFlags = [ "--ignore-scripts" ];
installPhase = '' installPhase = ''

View File

@@ -1,18 +1,18 @@
{ pkgs, ... }: { pkgs, ... }:
pkgs.stdenv.mkDerivation rec { pkgs.stdenv.mkDerivation rec {
pname = "obsidian.plugins.tasks"; pname = "obsidian.plugins.tasks";
version = "7.14.0"; version = "7.15.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "obsidian-tasks-group"; owner = "obsidian-tasks-group";
repo = "obsidian-tasks"; repo = "obsidian-tasks";
rev = version; rev = version;
hash = "sha256-vAYeCNgDF0aheN9ff3fFPyW21g4N4gyYo/Y6axTi7Yc="; hash = "sha256-BF9ye4ocE6vZh+ChkmuLkQpNWtH425EX0EHQs+wbTZc=";
}; };
offlineCache = pkgs.fetchYarnDeps { offlineCache = pkgs.fetchYarnDeps {
yarnLock = src + "/yarn.lock"; yarnLock = src + "/yarn.lock";
hash = "sha256-hXZ/BVmqtOsBa1G+7YulYOSk8GLJZ2hJ4kWrhf80MSY="; hash = "sha256-Tf1K048Ox+hImIfrdBWQHsiDe+3FGUQLFBcf/Bbbo1U=";
}; };
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [

View File

@@ -33,10 +33,6 @@ in
{ {
enable = true; enable = true;
spicetifyPackage = pkgs.spicetify-cli.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches or [ ] ++ [ ./user-colors.patch ];
});
theme = spicePkgs.themes.sleek // { theme = spicePkgs.themes.sleek // {
extraCommands = '' extraCommands = ''
export COLORS_CSS_PATH="${home}/.config/spotify/colors.css" export COLORS_CSS_PATH="${home}/.config/spotify/colors.css"

View File

@@ -1,31 +0,0 @@
diff --git a/src/apply/apply.go b/src/apply/apply.go
index 47f1346..47badab 100644
--- a/src/apply/apply.go
+++ b/src/apply/apply.go
@@ -2,6 +2,7 @@ package apply
import (
"fmt"
+ "errors"
"os"
"path/filepath"
"strings"
@@ -65,10 +66,17 @@ func AdditionalOptions(appsFolderPath string, flags Flag) {
// To not use custom css, set `themeFolder` to blank string
// To use default color scheme, set `scheme` to `nil`
func UserCSS(appsFolderPath, themeFolder string, scheme map[string]string) {
+ colorsSrc := os.Getenv("COLORS_CSS_PATH")
colorsDest := filepath.Join(appsFolderPath, "xpui", "colors.css")
- if err := os.WriteFile(colorsDest, []byte(getColorCSS(scheme)), 0700); err != nil {
+
+ if len(colorsSrc) == 0 {
+ utils.Fatal(errors.New("COLORS_CSS_PATH environment variable is not set"))
+ }
+
+ if err := os.Symlink(colorsSrc, colorsDest); err != nil {
utils.Fatal(err)
}
+
cssDest := filepath.Join(appsFolderPath, "xpui", "user.css")
if err := os.WriteFile(cssDest, []byte(getUserCSS(themeFolder)), 0700); err != nil {
utils.Fatal(err)