From 9f3a99a42e6047161c0d5af5125517b795b048cd Mon Sep 17 00:00:00 2001 From: Hermes Date: Wed, 16 Sep 2026 13:12:01 -0400 Subject: [PATCH] vault-cli: extract to standalone repo, add flake.nix, move one-off scripts to scripts/one-off/ --- flake.nix | 33 +++++++++++++++++++ .../one-off/add_short_aliases.py | 0 .../one-off/find_unresolved_links.py | 0 .../one-off/fix_wikilinks.py | 0 .../one-off/sort_unsorted.py | 0 .../one-off/sort_unsorted_final.py | 0 6 files changed, 33 insertions(+) create mode 100644 flake.nix rename add_short_aliases.py => scripts/one-off/add_short_aliases.py (100%) rename find_unresolved_links.py => scripts/one-off/find_unresolved_links.py (100%) rename fix_wikilinks.py => scripts/one-off/fix_wikilinks.py (100%) rename sort_unsorted.py => scripts/one-off/sort_unsorted.py (100%) rename sort_unsorted_final.py => scripts/one-off/sort_unsorted_final.py (100%) diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d7fdbcc --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "vault CLI + Librarian tooling for Ryan's R/J/F/I Obsidian vault"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" "aarch64-linux" ]; + forAllSystems = nixpkgs.lib.genAttrs systems; + in + { + packages = forAllSystems (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + vault-cli = pkgs.callPackage ./package.nix { }; + in + { + default = vault-cli; + vault-cli = vault-cli; + }); + + # Convenience module for consumers (e.g. nixos-config) that just want + # `vault` on $PATH for hosts playing a vault role. Mirrors the shape + # nixos-config's modules/hosts/core/vault.nix expects: import this and + # add `environment.systemPackages = [ pkgs.vault-cli ]` (or reference + # `self.packages.${system}.default` directly via a flake input). + nixosModules.default = { pkgs, ... }: { + environment.systemPackages = [ self.packages.${pkgs.system}.default ]; + }; + }; +} diff --git a/add_short_aliases.py b/scripts/one-off/add_short_aliases.py similarity index 100% rename from add_short_aliases.py rename to scripts/one-off/add_short_aliases.py diff --git a/find_unresolved_links.py b/scripts/one-off/find_unresolved_links.py similarity index 100% rename from find_unresolved_links.py rename to scripts/one-off/find_unresolved_links.py diff --git a/fix_wikilinks.py b/scripts/one-off/fix_wikilinks.py similarity index 100% rename from fix_wikilinks.py rename to scripts/one-off/fix_wikilinks.py diff --git a/sort_unsorted.py b/scripts/one-off/sort_unsorted.py similarity index 100% rename from sort_unsorted.py rename to scripts/one-off/sort_unsorted.py diff --git a/sort_unsorted_final.py b/scripts/one-off/sort_unsorted_final.py similarity index 100% rename from sort_unsorted_final.py rename to scripts/one-off/sort_unsorted_final.py