diff options
-rw-r--r-- | linux.nix | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -1,11 +1,26 @@ { pkgs, lib, ... }: let - solarized-xresources = ./xresources; homedir = builtins.getEnv "HOME"; - theme = lib.removeSuffix "\n" - (builtins.readFile "${homedir}/.local/share/xtheme"); - colors = { + + base16-scheme = "solarized"; + base16 = pkgs.stdenv.mkDerivation { + name = "base16-builder"; + src = builtins.fetchTarball { + url = "https://github.com/auduchinok/base16-builder/archive/51e3ad4d447fc3f1f539d0bfe33c851728fb6b5f.tar.gz"; + sha256 = "1qir689h38c6jr7fbbqbc3029544zgv41lrrqdcq26kcwxcwjrz1"; + }; + nativeBuildInputs = [pkgs.ruby]; + buildPhase = "${pkgs.ruby}/bin/ruby base16 -s schemes/${base16-scheme}.yml"; + installPhase = '' + mkdir -p $out + cp -r output/* $out + ''; + }; + theme = lib.removeSuffix "\n" (builtins.readFile "${homedir}/.local/share/xtheme"); + xresources = "${base16}/xresources/base16-${base16-scheme}.${theme}.xresources"; + + colors = { # derived from spacemacs "dark" = { highlight = "#5d4d7a"; background = "#292b2e"; @@ -38,7 +53,7 @@ in #"Xautolock.notify:" = 30; #"Xautolock.notifier:" = "notify-send -u critical -t 10000 -- 'Locking screen in 30 seconds'"; }; - extraConfig = builtins.readFile(solarized-xresources + "/Xresources." + theme); + extraConfig = builtins.readFile(xresources); }; services = { |