1
0
mirror of https://github.com/tboerger/nixos-config synced 2025-02-22 23:31:08 +01:00
github.com-tboerger-nixos-c.../profiles/thomas/programs/github.nix
2024-11-24 16:13:14 +01:00

49 lines
864 B
Nix

{ pkgs, lib, config, options, ... }:
with lib;
let
cfg = config.profile.programs.github;
in
{
options = {
profile = {
programs = {
github = {
enable = mkEnableOption "GitHub";
};
};
};
};
config = mkIf cfg.enable {
programs = {
gh = {
enable = true;
extensions = with pkgs; [
gh-dash
gh-markdown-preview
gh-poi
];
};
zsh = {
sessionVariables = {
GH_TOKEN = "$(cat ${config.home.homeDirectory}/.ghtoken)";
GITHUB_TOKEN = "$(cat ${config.home.homeDirectory}/.ghtoken)";
};
};
};
age = {
secrets = {
github = {
file = ../secrets/github.age;
path = "${config.home.homeDirectory}/.ghtoken";
mode = "0600";
};
};
};
};
}