nixos-configs/common/vars/default.nix
matt1432 66f415ff5f
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: move common/home to nixosModules/shell
2024-11-22 17:58:24 -05:00

21 lines
372 B
Nix

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