default.nix (1766B)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
{config, ...}: let inherit (config.flake) files; name = "maydayv7"; in { flake.modules.homeManager.v7 = { config, lib, pkgs, ... }: let homeDir = config.home.homeDirectory; github-mcp = config.programs.mcp.servers ? github; in { credentials = { inherit name; fullname = "V7"; mail = "maydayv7@gmail.com"; key = "8C240C0C11293EE56260601CCF616EB19C2765E4"; }; home = { packages = [pkgs.home-manager]; persist.directories = [ "TBD" "Projects" ]; file = { ".face".source = ./profile.png; ".config/goa-1.0/accounts.conf".text = builtins.readFile ./accounts.conf; "Projects/dotfiles".source = config.lib.file.mkOutOfStoreSymlink files.path.system; ".config/gtk-3.0/bookmarks".text = lib.mkBefore '' file://${homeDir}/TBD TBD file://${homeDir}/Projects Projects ''; }; }; sops.templates = let github-token = config.sops.placeholder."github-token.secret"; in { "gh-hosts.yml" = { path = "${homeDir}/.config/gh/hosts.yml"; content = '' github.com: git_protocol: https user: ${name} oauth_token: ${github-token} users: ${name}: oauth_token: ${github-token} ''; }; } // lib.optionalAttrs github-mcp { "github-mcp.sh".content = '' export ${config.programs.mcp.servers.github.bearer_token_env_var}='${github-token}' ''; }; programs.zsh.initContent = lib.mkIf github-mcp (lib.mkAfter '' source ${config.sops.templates."github-mcp.sh".path} ''); }; }