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