Skip to content

About

Module to manage identities

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

137 Commits

Folders and files

header.png

Identities

These modules keep my identity data in one place and only emit the small config fragments that each tool needs.

They do not enable git, jj, or sl for you. They only write identity snippets, so you can drop them into an existing Home Manager setup without pulling in a full tool configuration.

What It Gives You

  • git includes with fixed SSH signing
  • jj config fragments with SSH signing
  • SOPS-backed secrets for names, emails, and signing keys

Quick Start

Import the shared module once, then enable the identities you want:

{
  inputs.identities.url = "github:shikanime/identities";
  inputs.sops-nix.url = "github:mic92/sops-nix";

  outputs = { home-manager, identities, sops-nix, ... }: {
    homeConfigurations.user = home-manager.lib.homeConfiguration {
      modules = [
        sops-nix.homeModules.default
        identities.homeModules.default

        {
          identities = {
            shikanime.enable = true;

            gouv = {
              enable = true;
              git.condition = "gitpath:/home/shika/Source/Repos/github.com/cloud-pi-native";
              jj.extraConfig."--when".repositories = [
                "/home/shika/Source/Repos/github.com/cloud-pi-native"
              ];
            };

            automata = {
              enable = true;
              git.condition = "gitpath:/home/shika/Source/Repos/github.com/yohra-operator";
              jj.extraConfig."--when".repositories = [
                "/home/shika/Source/Repos/github.com/yohra-operator"
              ];
            };
          };
        }
      ];
    };
  };
}

Option Shape

The design is intentionally small:

  • identities.enable turns on the identity system
  • identities.git.enable, identities.jj.enable, and
  • identities.ghstack.enable and identities.glab.enable control the global defaults for shikanime ghstack and glab config
  • identities.<name>.enable turns a specific identity on or off
  • identities.<name>.git.enable and .jj.enable control that identity's tool output
  • identities.shikanime.ghstack.enable and .glab.enable control whether those config fragments are emitted for shikanime
  • identities.<name>.git.extraConfig merges into the generated Git include
  • identities.<name>.git.condition sets the Git include condition
  • identities.<name>.jj.extraConfig merges into the generated JJ config
  • identities.shikanime.ghstack.extraConfig merges into the generated ghstackrc
  • identities.shikanime.glab.extraConfig merges into the generated glab config

SSH signing is fixed in the modules. extraConfig is only for the remaining tool settings.

Generated Files

  • shikanime
    • jj/conf.d/shikanime.toml
  • gouv
    • jj/conf.d/gouv.toml
  • automata
    • jj/conf.d/automata.toml

Git identity snippets are written through programs.git.includes.

Secrets

The encrypted values live in:

  • secrets/shikanime.enc.yaml
  • secrets/gouv.enc.yaml
  • secrets/automata.enc.yaml

The repo ships a SOPS-enabled dev shell. Edit secrets in the identities repository with:

sops secrets/<name>.enc.yaml

Development

direnv allow   # or: nix develop
nix fmt
nix flake check

Notes

  • The modules are meant to be composable.
  • They only emit identity fragments.
  • If you enable multiple identities, each one stays isolated by its own git.condition and JJ repository scoping.

See AGENTS.md for the full module contract and coding conventions.

About

Module to manage identities

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages