Add HM bootstrap script and tidy installer workflow
This commit is contained in:
parent
dd15c09fdd
commit
d1713bdc99
10 changed files with 184 additions and 43 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.admin = {
|
||||
|
|
@ -8,4 +8,24 @@
|
|||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = lib.mkDefault true;
|
||||
|
||||
# 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" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue