mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-18 06:59:43 +02:00
feat: redesign the project structure
This commit is contained in:
44
home/darwin/core.nix
Normal file
44
home/darwin/core.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
{pkgs, ...}:
|
||||
{
|
||||
# MacOS specific configuration
|
||||
home.packages = with pkgs; [
|
||||
|
||||
];
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
# all my ssh private key are generated by `ssh-keygen -t ed25519 -C "ryan@nickname"`
|
||||
# the config's format:
|
||||
# Host — given the pattern used to match against the host name given on the command line.
|
||||
# HostName — specify nickname or abbreviation for host
|
||||
# IdentityFile — the location of your SSH key authentication file for the account.
|
||||
# format in details:
|
||||
# https://www.ssh.com/academy/ssh/config
|
||||
extraConfig = ''
|
||||
Host 192.168.*
|
||||
# allow to securely use local SSH agent to authenticate on the remote machine.
|
||||
# It has the same effect as adding cli option `ssh -A user@host`
|
||||
ForwardAgent yes
|
||||
# romantic holds my homelab~
|
||||
IdentityFile ~/.ssh/romantic
|
||||
# Specifies that ssh should only use the identity file explicitly configured above
|
||||
# required to prevent sending default identity files first.
|
||||
IdentitiesOnly yes
|
||||
|
||||
Host github.com
|
||||
Hostname github.com
|
||||
# github is controlled by gluttony~
|
||||
IdentityFile ~/.ssh/harmonica
|
||||
# Specifies that ssh should only use the identity file explicitly configured above
|
||||
# required to prevent sending default identity files first.
|
||||
IdentitiesOnly yes
|
||||
'';
|
||||
|
||||
# use ssh-agent so we only need to input passphrase once
|
||||
# run `ssh-add /path/to/key` for every identity file
|
||||
# check imported keys by `ssh-add -l`
|
||||
# TODO `ssh-add` can only add keys temporary, use gnome-keyring to unlock all keys after login.
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,33 @@
|
||||
{pkgs, ...}:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
docker-compose
|
||||
kubectl
|
||||
kubernetes-helm
|
||||
terraform
|
||||
pulumi
|
||||
imports = [
|
||||
../common/core.nix
|
||||
../common/alacritty.nix
|
||||
../common/git.nix
|
||||
../common/starship.nix
|
||||
|
||||
./core.nix
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home = {
|
||||
username = "admin";
|
||||
# set homeDirectory make build fail
|
||||
# homeDirectory = "/Users/admin";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "22.11";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user