add pubkey
This commit is contained in:
parent
73992afd4f
commit
857d6943f9
2 changed files with 4 additions and 1 deletions
|
|
@ -35,6 +35,9 @@
|
||||||
|
|
||||||
users.users.yanlin = {
|
users.users.yanlin = {
|
||||||
extraGroups = [ "networkmanager" "wheel" "video" "audio" "input" ];
|
extraGroups = [ "networkmanager" "wheel" "video" "audio" "input" ];
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGmKZ0FbXhYRHVkVTeSmpPrvuG8sC8La3Yx2gWb4ncuc yanlin@imac"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
function image2webp() {
|
function image2webp() {
|
||||||
local dir="''${1:-.}"
|
local dir="''${1:-.}"
|
||||||
find "$dir" -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.gif' \) | while read -r img; do
|
find "$dir" -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.gif' -o -iname '*.heic' -o -iname '*.heif' \) | while read -r img; do
|
||||||
outfile="''${img%.*}.webp"
|
outfile="''${img%.*}.webp"
|
||||||
${pkgs.imagemagick}/bin/magick "$img" -resize '1800>' -quality 82 "$outfile"
|
${pkgs.imagemagick}/bin/magick "$img" -resize '1800>' -quality 82 "$outfile"
|
||||||
echo "Converted: $img -> $outfile"
|
echo "Converted: $img -> $outfile"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue