nixos/home/modules/user.nix

32 lines
668 B
Nix

{ lib, config, ... }:
let
cfg = config.snowhawk.user;
in
{
options.snowhawk.user = {
enable = lib.mkEnableOption "user";
username = lib.mkOption {
default = "ravenshade";
example = "zynh";
description = "the username to use. also defines the default home folder as /home/\${username}";
type = lib.types.str;
};
};
config = lib.mkIf cfg.enable {
home.username = lib.mkDefault cfg.username;
home.homeDirectory = lib.mkDefault "/home/${cfg.username}";
home.sessionPath = [
"${config.home.homeDirectory}/.cargo/bin"
];
snowhawk.tmux.sessionizer.paths = [
"~"
"~/.config"
];
};
}