Added Github Private key; Added SSH Config
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
{ config, primaryUser, inputs, self, lib, isDarwin, ... }: {
|
||||
{
|
||||
config,
|
||||
primaryUser,
|
||||
inputs,
|
||||
self,
|
||||
lib,
|
||||
isDarwin,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./packages.nix
|
||||
./git.nix
|
||||
@@ -11,7 +20,9 @@
|
||||
./floorp.nix
|
||||
./obsidian.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
] ++ lib.optionals (!isDarwin) [ ./desktop ] ++ lib.optionals isDarwin [
|
||||
]
|
||||
++ lib.optionals (!isDarwin) [ ./desktop ]
|
||||
++ lib.optionals isDarwin [
|
||||
./desktop/sketchybar
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
];
|
||||
@@ -97,19 +108,21 @@
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = if isDarwin then
|
||||
"/Users/${primaryUser}/.config/nix/secrets/keys.txt"
|
||||
else
|
||||
"/home/${primaryUser}/.config/nix/secrets/keys.txt";
|
||||
age.keyFile =
|
||||
if isDarwin then
|
||||
"/Users/${primaryUser}/.config/nix/secrets/keys.txt"
|
||||
else
|
||||
"/home/${primaryUser}/.config/nix/secrets/keys.txt";
|
||||
|
||||
secrets = {
|
||||
GROQ_API_KEY = { };
|
||||
OPENWEATHER_API_KEY = { };
|
||||
ssh_private_key = {
|
||||
path = if isDarwin then
|
||||
"/Users/${primaryUser}/.ssh/ssh"
|
||||
else
|
||||
"/home/${primaryUser}/.ssh/ssh";
|
||||
path = if isDarwin then "/Users/${primaryUser}/.ssh/ssh" else "/home/${primaryUser}/.ssh/ssh";
|
||||
mode = "0600";
|
||||
};
|
||||
ssh_github_key = {
|
||||
path = if isDarwin then "/Users/${primaryUser}/.ssh/github" else "/home/${primaryUser}/.ssh/github";
|
||||
mode = "0600";
|
||||
};
|
||||
};
|
||||
|
||||
31
home/git.nix
31
home/git.nix
@@ -1,13 +1,25 @@
|
||||
{ primaryUser, pkgs, ... }: {
|
||||
{
|
||||
primaryUser,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [ gh gnupg ];
|
||||
home.packages = with pkgs; [
|
||||
gh
|
||||
gnupg
|
||||
];
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
github = { user = primaryUser; };
|
||||
init = { defaultBranch = "main"; };
|
||||
github = {
|
||||
user = primaryUser;
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
user = {
|
||||
name = "DerGrumpf"; # TODO replace
|
||||
email = "phil.keier@hotmail.com"; # TODO replace
|
||||
@@ -15,8 +27,15 @@
|
||||
};
|
||||
|
||||
lfs.enable = true;
|
||||
ignores = [ "**/.DS_STORE" "result" ];
|
||||
ignores = [
|
||||
"**/.DS_STORE"
|
||||
"result"
|
||||
];
|
||||
};
|
||||
lazygit = { enable = true; };
|
||||
|
||||
lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs;
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
# dev tools
|
||||
curl
|
||||
@@ -29,10 +31,12 @@
|
||||
zstd
|
||||
gnutar
|
||||
unrar
|
||||
sops
|
||||
|
||||
# Nix tools
|
||||
nix-index
|
||||
] ++ lib.optionals (!pkgs.stdenv.isDarwin) [
|
||||
]
|
||||
++ lib.optionals (!pkgs.stdenv.isDarwin) [
|
||||
# dev tools
|
||||
pciutils
|
||||
usbutils
|
||||
@@ -60,6 +64,7 @@
|
||||
xonotic
|
||||
irssi
|
||||
blender
|
||||
] ++ lib.optionals pkgs.stdenv.isDarwin [ graphite-cli ];
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.isDarwin [ graphite-cli ];
|
||||
};
|
||||
}
|
||||
|
||||
18
home/ssh.nix
Normal file
18
home/ssh.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ primaryUser, isDarwin, ... }:
|
||||
{
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlock = {
|
||||
"*.cyperpunk.de" = {
|
||||
identityFile =
|
||||
if isDarwin then "/Users/${primaryUser}/.ssh/ssh" else "/home/${primaryUser}/.ssh/ssh";
|
||||
user = primaryUser;
|
||||
};
|
||||
"github.com" = {
|
||||
identityFile =
|
||||
if isDarwin then "/Users/${primaryUser}/.ssh/github" else "/home/${primaryUser}/.ssh/github";
|
||||
user = "git";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user