mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-22 00:49:00 +01:00
refactor: migrate ssh auth keys & hashed password into vars
This commit is contained in:
@@ -74,11 +74,7 @@
|
||||
# ```
|
||||
# 2. Never leave the device and never sent over the network.
|
||||
# 2. Or just use hardware security keys like Yubikey/CanoKey.
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKlN+Q/GxvwxDX/OAjJHaNFEznEN4Tw4E4TwqQu/eD6 ryan@idols-ai"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoa9uEI/gR5+klqTQwvCgD6CD5vT5iD9YCNx2xNrH3B ryan@fern"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPwZ9MdotnyhxIJrI4gmVshExHiZOx+FGFhcW7BaYkfR ryan@harmonica"
|
||||
];
|
||||
openssh.authorizedKeys.keys = myvars.sshAuthorizedKeys;
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
users.users."${myvars.username}" = {
|
||||
# generated by `mkpasswd -m scrypt`
|
||||
# we have to use initialHashedPassword here when using tmpfs for /
|
||||
initialHashedPassword = "$7$CU..../....KDvTIXqLTXpmCaoUy2yC9.$145eM358b7Q0sRXgEBvxctd5EAuEEdao57LmZjc05D.";
|
||||
inherit (myvars) initialHashedPassword;
|
||||
home = "/home/${myvars.username}";
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
||||
Reference in New Issue
Block a user