ssh and vscode

This commit is contained in:
2024-11-07 17:24:17 +01:00
parent 9a63e0423e
commit a551e28e24
10 changed files with 179 additions and 12 deletions

7
home/configs/keys.nix Normal file
View File

@@ -0,0 +1,7 @@
{ lib }: {
options.local.keys = lib.mkOption { };
config.local.keys = {
senpai = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBehbdWBTyhs8Tqnc7w172XhWcPAcAM6BC9Gny3i8An";
};
}

View File

@@ -19,6 +19,8 @@
# ./programs/yazi.nix
# ./programs/zathura.nix
# ./configs/keys.nix
./system/dunst.nix
./system/hyprland.nix
./system/rofi.nix

View File

@@ -1,4 +1,4 @@
{
{ pkgs, config, ... }: {
programs.git = {
enable = true;
@@ -15,6 +15,17 @@
branch.sort = "-committerdate";
pull.rebase = "false";
rerere.enabled = true;
# gpg = {
# format = "ssh";
# ssh.defaultKeyCommand = pkgs.writeShellScript "git_key" ''
# if ssh-add -L | grep -vq '${config.local.keys.senpai}'; then
# ssh-add -t 1m ~/.ssh/id_ed25519
# fi
# echo 'key::${config.local.keys.senpai}'
# '';
# };
push.gpgsign = "if-asked";
};
};
}

View File

@@ -2,6 +2,16 @@
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
# enableSshSupport = true;
};
# programs.ssh = {
# startAgent = true;
# # agentTimeout = "1h";
# extraConfig = ''
# AddKeysToAgent yes
# IdentityFile ~/.ssh/senpai_ed25519;
# '';
# };
}

View File

@@ -77,5 +77,6 @@
vim
nixfmt-rfc-style
nemo
nix-direnv
];
}

View File

@@ -1,15 +1,24 @@
{ pkgs, ... }: {
programs.vscode = {
enable = true;
package = pkgs.vscodium-fhs;
package = pkgs.vscodium.fhsWithPackages (ps: with ps; [
rustup
zlib
openssl.dev
pkg-config
nixfmt-rfc-style
python3
]);
extensions = with pkgs.vscode-extensions; [
ms-python.python
ms-python.debugpy
jnoortheen.nix-ide
mkhl.direnv
arrterian.nix-env-selector
mvllow.rose-pine
github.copilot
github.copilot-chat
# github.copilot-chat
ms-vsliveshare.vsliveshare
rust-lang.rust-analyzer
];