mirror of
https://github.com/elitak/nixos-infect
synced 2024-11-10 05:54:20 +00:00
automatically trim keys (#165)
This commit is contained in:
parent
d52253d559
commit
b8a97173e0
1 changed files with 5 additions and 3 deletions
|
@ -40,9 +40,11 @@ makeConf() {
|
||||||
networking.hostName = "$(hostname -s)";
|
networking.hostName = "$(hostname -s)";
|
||||||
networking.domain = "$(hostname -d)";
|
networking.domain = "$(hostname -d)";
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keys = [$(while read -r line; do echo -n "
|
users.users.root.openssh.authorizedKeys.keys = [$(while read -r line; do
|
||||||
''$line'' "; done <<< "$keys")
|
line=$(echo -n "$line" | sed 's/\r//g')
|
||||||
];
|
trimmed_line=$(echo -n "$line" | tr -d '[:space:]')
|
||||||
|
echo -n "''$trimmed_line'' "
|
||||||
|
done <<< "$keys")];
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue