Remove build and build-adoc

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-10-27 23:03:23 +00:00
parent 6236f20202
commit 2c5f5f266f
4 changed files with 38 additions and 78 deletions

View file

@ -1,62 +0,0 @@
{
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "build-adoc";
runtimeInputs = with pkgs; [
asciidoctor-with-extensions
];
excludeShellChecks = [ "SC2034" ];
text = ''
ls book
echo ""
date=$(date '+%Y-%m-%d %H:%M:%S')
echo "The current date is $date."
pwd=$(pwd)
parent=$(basename "$(dirname "$pwd")")
name=$(basename "$pwd")
echo "The parent directory is $parent."
echo "The current directory is $name."
echo ""
echo "Generating the HTML..."
asciidoctor \
-D book \
-a "date=$date" \
-o index.html \
./book/index.adoc
echo ""
echo "Generating the EPUB..."
asciidoctor-epub3 \
-D book \
-a "date=$date" \
-o "$parent-$name.epub" \
./book/index.adoc
echo ""
echo "Generating the PDF..."
asciidoctor-pdf \
-D book \
-a "date=$date" \
-o "$parent-$name.pdf" \
./book/index.adoc
echo ""
ls book
'';
})
];
};
}

View file

@ -1,16 +0,0 @@
{
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "build";
text = ''
test -r book/index.adoc && exec build-adoc "$@"
test -x build && exec ./build "$@"
'';
})
];
};
}

View file

@ -0,0 +1,36 @@
{ withSystem, ... }:
let
name = "tmux-default-startup";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.writeShellApplication {
inherit name;
text = ''
if [[ -x "$PWD/.tmux-sessionizer" ]]; then
"$PWD/.tmux-sessionizer"
fi
if [[ -x "$PWD/.tmux" ]]; then
"$PWD/.tmux"
fi
tmux new-window -d -n scratch
"$EDITOR"
'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}

View file

@ -9,9 +9,11 @@
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
build = "z build";
chmox = "chmod +x";
run = "./run";
tag = "tag-release";
todo = "z todo";
vss = "LC_ALL=C sort --unique ${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/nixos-config/modules/home-manager/cli/neovim/config/spell/en.utf-8.adddotfiles/nvim/spell/en.utf-8.add --output ${config.xdg.userDirs.extraConfig.XDG_REPOS_DIR}/nixos-config/modules/home-manager/cli/neovim/config/spell/en.utf-8.add";
wt = "git worktree";
zet = "z zet";