nixos-configs/common/vars/default.nix

22 lines
372 B
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (lib) mkDefault mkOption types;
cfg = config.vars;
in {
options.vars = {
mainUser = mkOption {
type = types.str;
description = ''
Username that was defined at the initial setup process
'';
};
};
config = {
environment.variables.FLAKE = mkDefault "/home/${cfg.mainUser}/.nix";
};
}