summaryrefslogtreecommitdiff
path: root/user-profiles/core.nix
blob: 29891d12e34a2fd5985f683fac1ac0ee8765097c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ flake, userName, config, lib, utils, ... }:
{ 
  config = {
    users.users.${userName} = {}; # Just make sure the user is created

    home-manager.users.${userName} = {
      imports = lib.attrValues flake.homeModules;

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

    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
    };
  };
}