diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-08 08:30:17 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-08 08:30:17 -0700 |
commit | 2aa3e62136109c5c4762e951525d68aff3e1ac5a (patch) | |
tree | 0f508cad82717ac70c7da5fd402c9555ce9166d1 /home/pass | |
parent | home: fix for yt-dlp configuration (diff) | |
download | world-2aa3e62136109c5c4762e951525d68aff3e1ac5a.tar.gz |
home: add more configurations for home-manager
Diffstat (limited to 'home/pass')
-rw-r--r-- | home/pass/default.nix | 40 | ||||
-rw-r--r-- | home/pass/git-pass-mapping.ini | 9 |
2 files changed, 49 insertions, 0 deletions
diff --git a/home/pass/default.nix b/home/pass/default.nix new file mode 100644 index 0000000..3ea7892 --- /dev/null +++ b/home/pass/default.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: +let cfg = config.my.home.pass; +in { + options.my.home.pass = with lib; { + enable = mkEnableOption "pass configuration"; + }; + config = lib.mkIf cfg.enable { + programs.password-store = { + enable = true; + settings = { + PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store"; + PASSWORD_STORE_GENERATED_LENGTH = "30"; + PASSWORD_STORE_CHARACTER_SET = "a-zA-Z0-9~!@#$%^&*()-_=+[]{};:,.<>?"; + PASSWORD_STORE_KEY = config.programs.gpg.settings.default-key; + }; + }; + + programs.git = { + signing = { + key = config.programs.gpg.settings.default-key; + signByDefault = true; + }; + extraConfig = { + credential = { + helper = "${pkgs.gitAndTools.pass-git-helper}/bin/pass-git-helper"; + useHttpPath = true; + }; + }; + }; + + xdg.configFile."pass-git-helper/git-pass-mapping.ini" = { + source = ./git-pass-mapping.ini; + }; + + services.password-store-sync.enable = true; + + # Ensure the password store things are in the systemd session + systemd.user.sessionVariables = config.programs.password-store.settings; + }; +} diff --git a/home/pass/git-pass-mapping.ini b/home/pass/git-pass-mapping.ini new file mode 100644 index 0000000..5c5177b --- /dev/null +++ b/home/pass/git-pass-mapping.ini @@ -0,0 +1,9 @@ +[DEFAULT] +line_username=1 +skip_username=10 + +[github.com/*] +target=git/github.com + +[git.fcuny.net*] +target=git/git.fcuny.net |