~euandreh/dotfiles

316939aa215181b1d22b69e94241eef757add98d — EuAndreh 1 year, 4 months ago c197a36
Rename public/static/README.css -> docs/README.css

Adapt utils.nix to point to it instead.

Include README.css in fake-symlinks.sh.

BONUS:
Use "${VARIABLE}" instead of "$VARIABLE" in fake-symlinks.sh.
3 files changed, 13 insertions(+), 15 deletions(-)

M bash/fake-symlinks.sh
R public/static/{README.css => s}
M utils.nix
M bash/fake-symlinks.sh => bash/fake-symlinks.sh +12 -10
@@ 1,26 1,28 @@
#!/usr/bin/env bash

if [[ -n "$GITHUB_TOKEN" ]]; then
  envsubst < "$DOTFILES/git/gitconfig.ini" > ~/.gitconfig
if [[ -n "${GITHUB_TOKEN}" ]]; then
  envsubst < "${DOTFILES}/git/gitconfig.ini" > ~/.gitconfig
fi

SRHT_REPOS=(website cement dotfiles)
SRHT_REPOS_PATH="$HOME/dev/libre"
SRHT_REPOS_PATH="${HOME}/dev/libre"

for repo in "${SRHT_REPOS[@]}"; do
  REPO="$repo" envsubst < "$DOTFILES/templates/sr-ht-build.yaml" > "$SRHT_REPOS_PATH/$repo/.build.yml"
  if [[ "$repo" != "dotfiles" ]]; then
    cp "$DOTFILES/utils.nix" "$SRHT_REPOS_PATH/$repo/utils.nix"
  REPO="${repo}" envsubst < "${DOTFILES}/templates/sr-ht-build.yaml" > "${SRHT_REPOS_PATH}/${repo}/.build.yml"
  if [[ "${repo}" != "dotfiles" ]]; then
    cp "${DOTFILES}/utils.nix" "${SRHT_REPOS_PATH}/${repo}/utils.nix"
    mkdir -p "${SRHT_REPOS_PATH}/${repo}/docs"
    cp "${DOTFILES}/docs/README.css" "${SRHT_REPOS_PATH}/${repo}/docs/README.css"
  fi
  if [[ "$repo" != "website" ]]; then
    REPO="$repo" envsubst < "$DOTFILES/templates/env.sh" > "$SRHT_REPOS_PATH/$repo/env.sh"
  if [[ "${repo}" != "website" ]]; then
    REPO="${repo}" envsubst < "${DOTFILES}/templates/env.sh" > "${SRHT_REPOS_PATH}/${repo}/env.sh"
  fi
done

mkdir -p ~/.tmuxinator

for template in "$DOTFILES"/tmux/projects/*; do
  cp "$template" "$HOME/.tmuxinator/$(basename "$template")"
for template in "${DOTFILES}"/tmux/projects/*; do
  cp "${template}" "${HOME}/.tmuxinator/$(basename "$template")"
done

# DHALL_BUILD_REPOS=(website)

R public/static/README.css => docs/README.css +0 -0

M utils.nix => utils.nix +1 -5
@@ 61,16 61,12 @@ in rec {
      exit 1
    '';
  });
  readmeCss = builtins.fetchurl {
    url = "https://euandre.org/dotfiles/static/README.css";
    sha256 = "1r7ak92zsbhjm1qxz0r3dig0yxb41l43zl0yai63izha2s5r54d4";
  };
  readmeOrg = title:
  baseTask.overrideAttrs (baseAttrs: {
    name = "${baseAttrs.name}-readme-docs";
    buildInputs = [ pkgs.pandoc ];
    buildPhase = ''
      pandoc README.org -o $out --css ${readmeCss} --to=html5 --self-contained --metadata title="${title}"
      pandoc README.org -o $out --css docs/README.css --to=html5 --self-contained --metadata title="${title}"
    '';
  });
  test = testDerivations: