mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
feat: sops-nix configuration
encrypt personal ssh key for git
This commit is contained in:
parent
f86b032c4c
commit
63a3bb6e98
10 changed files with 98 additions and 91 deletions
|
|
@ -21,8 +21,8 @@
|
|||
./terminal.nix
|
||||
./bat.nix
|
||||
./aerospace.nix
|
||||
# TODO ./browser.nix
|
||||
# TODO ./pass.nix
|
||||
./sops.nix
|
||||
./ssh.nix
|
||||
# TODO ./claude-code.nix
|
||||
# TODO ./codex.nix
|
||||
# TODO ./gemini-cli.nix
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
{
|
||||
programs.gh.enable = true;
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
options = import ./core/options.nix;
|
||||
autocmds = import ./core/autocmds.nix { inherit lib; };
|
||||
|
|
@ -11,7 +15,7 @@ let
|
|||
terminal = import ./plugins/terminal.nix;
|
||||
theme = import ./appearance/theme.nix;
|
||||
lsp = import ./lsp/lsp.nix;
|
||||
treesitter = import ./lsp/treesitter.nix;
|
||||
treesitter = import ./lsp/treesitter.nix { inherit pkgs; };
|
||||
autocomplete = import ./lsp/autocomplete.nix;
|
||||
languages = import ./lsp/languages;
|
||||
in
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# treesitter
|
||||
enable = true;
|
||||
addDefaultGrammars = true;
|
||||
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
nix
|
||||
lua
|
||||
yaml
|
||||
];
|
||||
fold = true;
|
||||
highlight = {
|
||||
enable = true;
|
||||
|
|
|
|||
12
home/sops.nix
Normal file
12
home/sops.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
sops = {
|
||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
|
||||
defaultSopsFile = ../secrets/poby.yaml;
|
||||
|
||||
secrets = {
|
||||
"github_ssh_key" = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
16
home/ssh.nix
Normal file
16
home/ssh.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = { };
|
||||
"github.com" = {
|
||||
host = "github.com";
|
||||
user = "git";
|
||||
identitiesOnly = true;
|
||||
identityFile = [ config.sops.secrets."github_ssh_key".path ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue