summaryrefslogtreecommitdiff
path: root/user-profiles/core.nix
blob: 57fb762857ba2ebd5e6b833597b5a6db6e1a7113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ flake, flakeInputs, path, userName, config, lib, utils, ... }:

with lib;

{
  config = {
    users.users.${userName} = {}; # Just make sure the user is created
    home-manager.users.${userName} = let sysConfig = config; in { config, ... }: {
      config.nix.settings = {
        inherit (sysConfig.nix.settings) use-xdg-base-directories;
      };
    };

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