NixOSConfig/lib/utils/user-module.nix

18 lines
430 B
Nix
Raw Normal View History

2024-05-11 19:35:13 +00:00
{ lib, pkgs, machine, user }:
let
hostname = machine.name;
username = user.name;
getUserConfig = pkgs.callPackage (import ./user-config.nix);
userConfigPath = getUserConfig { inherit hostname username; };
in { pkgs, ... }: {
imports = lib.optional (userConfigPath != null) userConfigPath;
config = {
_module.args = {
inherit
machine
user
;
};
};
}