Added Github Private key; Added SSH Config
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
{ pkgs, inputs, self, primaryUser, ... }: {
|
||||
imports = [ ./homebrew.nix ./settings.nix ./yabai.nix ];
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
self,
|
||||
primaryUser,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./homebrew.nix
|
||||
./settings.nix
|
||||
./yabai.nix
|
||||
];
|
||||
|
||||
# nix config
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
max-jobs = "auto"; # Use all CPU cores
|
||||
cores = 0; # Use all cores per build
|
||||
# disabled due to https://github.com/NixOS/nix/issues/7273
|
||||
@@ -15,7 +29,9 @@
|
||||
# Garbage collection
|
||||
gc = {
|
||||
automatic = true;
|
||||
interval = { Weekday = 7; }; # Run weekly
|
||||
interval = {
|
||||
Weekday = 7;
|
||||
}; # Run weekly
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
};
|
||||
@@ -28,7 +44,9 @@
|
||||
info.enable = false; # Skip info pages
|
||||
};
|
||||
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
# homebrew installation manager
|
||||
nix-homebrew = {
|
||||
user = primaryUser;
|
||||
@@ -43,6 +61,7 @@
|
||||
users.users.${primaryUser} = {
|
||||
home = "/Users/${primaryUser}";
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keyFiles = [ ../secrets/ssh-key ];
|
||||
};
|
||||
environment = {
|
||||
systemPath = [ "/opt/homebrew/bin" ];
|
||||
|
||||
@@ -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,7 +108,8 @@
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = if isDarwin then
|
||||
age.keyFile =
|
||||
if isDarwin then
|
||||
"/Users/${primaryUser}/.config/nix/secrets/keys.txt"
|
||||
else
|
||||
"/home/${primaryUser}/.config/nix/secrets/keys.txt";
|
||||
@@ -106,10 +118,11 @@
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
_: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
@@ -7,6 +6,7 @@
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
authorizedKeys.keyFiles = [ ../secrets/ssh-key ];
|
||||
};
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
GROQ_API_KEY: ENC[AES256_GCM,data:OyuC4jfw67sCDa0XBGr78S6pzPV1ruy7KiIqPMgWWcOCVm3Y/khXEYPMjUTGrq9YLOw1MLso0OE=,iv:0y9klMYVtGsqAaLc2JidjZYSLhhbcbWbnBf8sZiC3rM=,tag:r6G2pzZn2d9JIaS+ozKnmg==,type:str]
|
||||
OPENWEATHER_API_KEY: ENC[AES256_GCM,data:bcuLz70u40nZfNgPTaeNRXdR/zjx0SQjwMbMNNFqROI=,iv:VCzse1a1/k1ZDIpFPL1QhjuS6YaDyohWi61JZaoc0Ws=,tag:UJSNyniNNLfGGRY/uiJcRA==,type:str]
|
||||
ssh_private_key: ENC[AES256_GCM,data:R511mVFVk1ogAd5CKk/2P6rtT4NnHIFfKyqeCen545QgcvDqDFmW0rFBmPJyipaya2srJNoWvKJbnvxWtTYeJh2tPAybRMoUicStIFMUn3FPNfjx/WuQFLhKLoU3UOHHPJnkFqkQ9MBqLq2k5K7MVsNNFTxIDCKS1jPgkTmAWjRZ0EFiRXLa+Gvnz3GP5ltgfjDwdPeb5xp0/AqKPD8jea9w5ClR6ckr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,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age10pyhca0jy75wtqv5hrn0gf0jcam5272zx9h73a8xwwaxyfq89c0qs5dr9t
|
||||
@@ -12,7 +13,7 @@ sops:
|
||||
N3I5dzUwc3JtYzczMUhyT04vSHlZamMKT+FzYcDLmlEFYxm/XoBpJb8XaZzBH1v9
|
||||
6fuez+zApathZfl14w41kAUojPWBznnxDqYtNvzVVLXwnpp3BMx+7w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2026-03-27T10:23:01Z"
|
||||
mac: ENC[AES256_GCM,data:mRI5VLjUDMhRpR5fmN6MMxaJdbXuMBNcXFX7ItDe1U3H3px+4k0hxhx/anO+VX+Qq4i9kTrqEVkkRY4rzQBEqZaSIlGgzpj4nwdC8469/PBVUCqZ6X47pc+TfG6PP8Iv9nyN+zk4whS+O6c2ZTGVQ+Cok+KIa6r5tlNu/3r85u0=,iv:eK/TDEJctNiMp1eW4b605bvvNHAqBBf6Ybgdg4jQyR4=,tag:D4oW5lTBd1z8Ey0EKhTvmQ==,type:str]
|
||||
lastmodified: "2026-04-05T18:43:43Z"
|
||||
mac: ENC[AES256_GCM,data:iWEd+beMs10MBc8v7EPo3W2uPKsWtlgePsq195T6FpYjNP5BMfW4p6yo2HG2VEzSFWoi16HR1aB+oUUGSSlctaurjCifGsKyB4rKSk5gAyin9G7qTJ1KPC1SZfTVlj75RLyV9r/wtEGd4Arom2UiYk0A2NWWdKx+CUGgESQyt0c=,iv:6sb0ejM5Y9iFSr2MtoV94tvFu0Hrt/5aiEoNKBqQKr8=,tag:6lmkvQQFzItR91x0Yuj1aA==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
version: 3.12.2
|
||||
|
||||
2
secrets/ssh-github
Normal file
2
secrets/ssh-github
Normal file
@@ -0,0 +1,2 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIInrZgSE/iECNt+SrzmFXU32QdAeNplV1sax5c94gstr p.keier@beyerstedt-it.de
|
||||
|
||||
Reference in New Issue
Block a user