-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from ryan4yin/refactor-vars
refactor: migrate ssh auth keys & hashed password into vars
- Loading branch information
Showing
3 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,23 @@ | |
userfullname = "Ryan Yin"; | ||
useremail = "[email protected]"; | ||
networking = import ./networking.nix {inherit lib;}; | ||
# generated by `mkpasswd -m scrypt` | ||
initialHashedPassword = "$7$CU..../....KDvTIXqLTXpmCaoUy2yC9.$145eM358b7Q0sRXgEBvxctd5EAuEEdao57LmZjc05D."; | ||
# Public Keys that can be used to login to all my PCs, Macbooks, and servers. | ||
# | ||
# Since its authority is so large, we must strengthen its security: | ||
# 1. The corresponding private key must be: | ||
# 1. Generated locally on every trusted client via: | ||
# ```bash | ||
# # KDF: bcrypt with 256 rounds, takes 2s on Apple M2): | ||
# # Passphrase: digits + letters + symbols, 12+ chars | ||
# ssh-keygen -t ed25519 -a 256 -C "ryan@xxx" -f ~/.ssh/xxx` | ||
# ``` | ||
# 2. Never leave the device and never sent over the network. | ||
# 2. Or just use hardware security keys like Yubikey/CanoKey. | ||
sshAuthorizedKeys = [ | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKlN+Q/GxvwxDX/OAjJHaNFEznEN4Tw4E4TwqQu/eD6 ryan@idols-ai" | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoa9uEI/gR5+klqTQwvCgD6CD5vT5iD9YCNx2xNrH3B ryan@fern" | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPwZ9MdotnyhxIJrI4gmVshExHiZOx+FGFhcW7BaYkfR ryan@harmonica" | ||
]; | ||
} |