diff --git a/modules/scripts/build-adoc.nix b/modules/scripts/build-adoc.nix deleted file mode 100644 index 703adf51..00000000 --- a/modules/scripts/build-adoc.nix +++ /dev/null @@ -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 - ''; - }) - ]; - }; -} diff --git a/modules/scripts/build.nix b/modules/scripts/build.nix deleted file mode 100644 index c04f4664..00000000 --- a/modules/scripts/build.nix +++ /dev/null @@ -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 "$@" - ''; - }) - ]; - }; -} diff --git a/modules/scripts/tmux-default-startup.nix b/modules/scripts/tmux-default-startup.nix new file mode 100644 index 00000000..0264a8ea --- /dev/null +++ b/modules/scripts/tmux-default-startup.nix @@ -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})) + ]; + }; +} diff --git a/modules/zsh/aliases.nix b/modules/zsh/aliases.nix index 1995f1c4..6d587de6 100644 --- a/modules/zsh/aliases.nix +++ b/modules/zsh/aliases.nix @@ -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";