summaryrefslogtreecommitdiff
path: root/user-profiles/core.nix
blob: acd61b9a402bdb0f03974dcab9f105443b852f62 (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
{ flake, userName, config, lib, utils, ... }:

with lib;

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

    home-manager.useUserService = true;
    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
    };
  };
}