From 1e14c57dc1fdf296c97e6591e289b4c4111ae936 Mon Sep 17 00:00:00 2001 From: Joao Porta Date: Tue, 28 Jul 2026 16:59:51 -0300 Subject: [PATCH] bitwarden --- hosts/jpporta-nixos/home.nix | 3 ++- .../home-manager/bitwarden-cli/default.nix | 24 +++++++++++++++++++ .../nvim/nvim/lua/plugins/obsidian.lua | 23 +++++++++++++++++- modules/home-manager/zshrc/default.nix | 2 +- 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 modules/home-manager/bitwarden-cli/default.nix diff --git a/hosts/jpporta-nixos/home.nix b/hosts/jpporta-nixos/home.nix index 3aeceed..780682d 100644 --- a/hosts/jpporta-nixos/home.nix +++ b/hosts/jpporta-nixos/home.nix @@ -35,6 +35,7 @@ ../../modules/home-manager/ntfy-notify ../../modules/home-manager/pinentry ../../modules/home-manager/swaync + ../../modules/home-manager/bitwarden-cli inputs.zen-browser.homeModules.beta ]; @@ -95,7 +96,7 @@ openspec.enable = true; power-profiles.enable = true; ntfy-notify.enable = true; - + bitwarden.enable = true; }; home.packages = let diff --git a/modules/home-manager/bitwarden-cli/default.nix b/modules/home-manager/bitwarden-cli/default.nix new file mode 100644 index 0000000..4b3706d --- /dev/null +++ b/modules/home-manager/bitwarden-cli/default.nix @@ -0,0 +1,24 @@ +{ + lib, + config, + pkgs, + ... +}: +{ + + options.custom = { + bitwarden.enable = lib.mkEnableOption "enable bitwarden - CLI password manager"; + }; + + config = lib.mkIf config.custom.bitwarden.enable { + programs.rbw = { + enable = true; + settings = { + email = "me@joaoporta.com"; + lock_timeout = 7200; + pinentry = pkgs.pinentry-gnome3; + base_url = "https://pass.joaoporta.com"; + }; + }; + }; +} diff --git a/modules/home-manager/nvim/nvim/lua/plugins/obsidian.lua b/modules/home-manager/nvim/nvim/lua/plugins/obsidian.lua index 8006edd..04809d3 100644 --- a/modules/home-manager/nvim/nvim/lua/plugins/obsidian.lua +++ b/modules/home-manager/nvim/nvim/lua/plugins/obsidian.lua @@ -130,7 +130,7 @@ return { }, { name = "hermes", - path = "/mnt/obsidian", + path = "/mnt/documents/journal", }, }, daily_notes = { @@ -148,6 +148,27 @@ return { subdir = "Templates", date_format = "%Y-%m-%d", time_format = "%H:%M", + substitutions = { + week = function() + return os.date("%W", os.time()) + end, + day = function() + local d = os.date("%w", os.time()) + local r = { + ["0"] = "Sunday", + ["1"] = "Monday", + ["2"] = "Tuesday", + ["3"] = "Wednesday", + ["4"] = "Thursday", + ["5"] = "Friday", + ["6"] = "Saturday", + } + return r[d] + end, + full_date = function() + return os.date("%A, %B %d, %Y", os.time()) + end, + }, }, picker = { name = "telescope.nvim", diff --git a/modules/home-manager/zshrc/default.nix b/modules/home-manager/zshrc/default.nix index 58f3b40..d00baae 100644 --- a/modules/home-manager/zshrc/default.nix +++ b/modules/home-manager/zshrc/default.nix @@ -29,7 +29,7 @@ oh-my-zsh = { enable = true; - plugins = [ "git" "jj" ]; + plugins = [ "git" "jj" "rbw" ]; theme = ""; };