2026-02-02 14:04:56 +02:00
|
|
|
{ lib, pkgs, ... }:
|
2026-02-01 19:54:28 +02:00
|
|
|
|
|
|
|
|
{
|
2026-02-03 07:41:19 +02:00
|
|
|
users.groups = {
|
|
|
|
|
docker = {};
|
|
|
|
|
podman = {};
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-01 19:54:28 +02:00
|
|
|
users.users.admin = {
|
|
|
|
|
isNormalUser = true;
|
2026-02-03 07:41:19 +02:00
|
|
|
extraGroups = [
|
|
|
|
|
"wheel"
|
|
|
|
|
"networkmanager"
|
|
|
|
|
"podman"
|
|
|
|
|
"docker"
|
|
|
|
|
];
|
2026-02-01 19:54:28 +02:00
|
|
|
hashedPassword = "$6$HrwFoHtYRwiTZsYo$gKNOvkQhjalczOLgoTXvVu1MaihYP4BdBnVpWkdoAf.5MAiV2mMPRibYyGv9ti1Q63AhGK7n4wOPjAU0O74mK0";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
security.sudo.wheelNeedsPassword = lib.mkDefault true;
|
2026-02-02 14:04:56 +02:00
|
|
|
|
|
|
|
|
# Bootstrap Home Manager for admin on first login (per-user, standalone)
|
|
|
|
|
systemd.user.services.hm-bootstrap = {
|
|
|
|
|
description = "One-time Home Manager bootstrap for admin";
|
|
|
|
|
unitConfig = {
|
|
|
|
|
ConditionPathExists = "!%h/.config/home-manager/.hm_bootstrap_done";
|
|
|
|
|
After = [ "graphical-session.target" ];
|
|
|
|
|
Wants = [ "graphical-session.target" ];
|
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
|
};
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
Type = "simple";
|
|
|
|
|
TimeoutStartSec = "30min";
|
|
|
|
|
Environment = [ "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/%u/bin" ];
|
|
|
|
|
StandardOutput = "journal";
|
|
|
|
|
StandardError = "journal";
|
|
|
|
|
ExecStart = pkgs.writeShellScript "hm-bootstrap.sh" (builtins.readFile ../../scripts/hm-bootstrap.sh);
|
|
|
|
|
};
|
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
|
};
|
2026-02-01 19:54:28 +02:00
|
|
|
}
|