summaryrefslogtreecommitdiff
path: root/user-profiles/core.nix
blob: ea782a4b85a2b23d0c50ce503b2c7b675f7d944c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ flake, flakeInputs, path, userName, config, lib, utils, ... }:

with lib;

{
  config = {
    users.users.${userName} = {}; # Just make sure the user is created

    home-manager.useUserService = true;
    home-manager.extraSpecialArgs = { inherit flake flakeInputs path; };
    home-manager.users.${userName} = {
      imports = lib.attrValues flake.homeModules;

      config = {
        manual.manpages.enable = true;
        systemd.user.startServices = "sd-switch";

        programs.ssh.internallyManaged = mkForce true;
      };
    };

    systemd.services."home-manager-${utils.escapeSystemdPath userName}" = lib.mkIf (!config.home-manager.enableSystemd) {
      restartIfChanged = false; # only run once on startup, deploy to running system with deploy-rs
    };
  };
}