nix-config-legacy/modules/users/mikl.nix
mikl 2d023fc86d Initial flake: muscari k3s host
- flake.nix: mkHost helper, SOPS-age integration
- hosts/common: locale, sshd, universal packages
- hosts/muscari: k3s host with Cilium flags
- modules/users/mikl: SSH keys via forgejo .keys + sha256 pinning
- modules/services/k3s: k3s daemon with Cilium-compatible flags
- hardware-configuration.nix: placeholder, will be regenerated on real VM

Stack:
- NixOS 25.11
- k3s single-node (Cilium CNI, Traefik ingress)
- SOPS + age for secrets
- Multi-host ready (rosemary planned)
2026-06-25 14:48:03 +03:00

28 lines
No EOL
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# mikl — пользователь с SSH-доступом через forgejo .keys endpoint
# Live-ключи с git.iscg.dev/mikl.keys (sha256-pinned)
# Hardcoded fallback для восстановления если forgejo недоступен
{ pkgs, ... }:
let
# Live-ключи с forgejo — обновляются автоматически при изменении на forgejo
# sha256 защищает от подмены: новое содержимое = явный коммит с новым хэшем
forgejoKeys = pkgs.fetchurl {
url = "https://git.iscg.dev/mikl.keys";
sha256 = "sha256-4n6QLUPozdhHOmsRCuFn7HR9BU3nF0/GR2E7s5Lpz+Q=";
};
in
{
users.users.mikl = {
isNormalUser = true;
extraGroups = [ "wheel" ];
uid = 1000;
openssh.authorizedKeys.keyFiles = [ forgejoKeys ];
# Hardcoded fallback key — НЕ зависит ни от чего
# Вставить сюда свой recovery-ключ когда сгенерируешь (например, YubiKey)
# openssh.authorizedKeys = [
# "ssh-ed25519 AAAA... my-recovery-key"
# ];
};
}