nix-config/hosts/common/default.nix
mikl 411a8ba689 heather/common: passwordless sudo for mikl + fix deprecated options
- common/default.nix: add mikl to wheel + security.sudo.wheelNeedsPassword=false.
  Without this, root is unreachable on a fresh NixOS-yc image (no root password,
  no rescue channel) — nixos-rebuild switch is impossible. Mirrors the
  NOPASSWD:ALL that old YC boxes got via cloud-config user-data.
- home/server.nix: programs.git.extraConfig -> .settings, programs.git.delta
  -> programs.delta with enableGitIntegration=true (deprecated warnings).
- image.nix: boot.loader.grub.timeout -> boot.loader.timeout (renamed option).
2026-07-11 22:55:00 +03:00

31 lines
No EOL
854 B
Nix
Raw Permalink 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.

{ pkgs, ... }:
{
# flake + nix-command
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Required when using zsh as user shell
programs.zsh.enable = true;
users.users.mikl = {
isNormalUser = true;
shell = pkgs.zsh;
home = "/home/mikl";
extraGroups = [ "wheel" ]; # для passwordless sudo (см. ниже)
};
# Passwordless sudo для mikl на NixOS-серверах.
# На старых YC-боксах это приходило через cloud-config user-data
# (NOPASSWD:ALL); в NixOS задаём декларативно. Без этого админить
# сервер вслепую (kubectl, journalctl, nixos-rebuild) невозможно.
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
environment.systemPackages = [
pkgs.vim
];
}