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)
This commit is contained in:
parent
6f498d1da5
commit
2d023fc86d
10 changed files with 282 additions and 0 deletions
28
modules/users/mikl.nix
Normal file
28
modules/users/mikl.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# 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"
|
||||
# ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue