diff --git a/flake.lock b/flake.lock index 1f94a6d..67de5f3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,30 @@ { "nodes": { + "_1password-shell-plugins": { + "inputs": { + "flake-utils": [ + "nixvim", + "devshell", + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1716464653, + "narHash": "sha256-7ABtcvZf8P2axZNVV3m9LiKy1VW0lumu60sSuUOYG0o=", + "owner": "1Password", + "repo": "shell-plugins", + "rev": "d36189bf486ff2c4d9275c9ce29ec1aa92eaa4a7", + "type": "github" + }, + "original": { + "owner": "1Password", + "repo": "shell-plugins", + "type": "github" + } + }, "devshell": { "inputs": { "flake-utils": "flake-utils", @@ -265,6 +290,7 @@ }, "root": { "inputs": { + "_1password-shell-plugins": "_1password-shell-plugins", "flake-parts": "flake-parts", "home-manager": "home-manager", "nix-darwin": "nix-darwin", diff --git a/flake.nix b/flake.nix index 0548fbf..aa5eabe 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,13 @@ }; }; + # https://developer.1password.com/docs/cli/shell-plugins/nix/ + _1password-shell-plugins = { + url = "github:1Password/shell-plugins"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "nixvim/devshell/flake-utils"; + }; + nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; @@ -158,6 +165,7 @@ { imports = [ inputs.nixvim.homeManagerModules.nixvim + inputs._1password-shell-plugins.hmModules.default ]; home.shellAliases = { @@ -305,6 +313,18 @@ ]; }; + programs._1password-shell-plugins = { + enable = true; + + plugins = with pkgs; [ + gh # github + cargo + heroku + tea # gitea + glab # gitlab + ]; + }; + home.packages = with pkgs; [ # TODO: https://gist.github.com/axelbdt/0de9f5f9ba8a2100326b793f7bfb8658?permalink_comment_id=4977667#gistcomment-4977667 asdf-vm