nixos/modules/home/default.nix

50 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2023-01-11 20:22:35 +00:00
{ pkgs, lib, config, ... }:
{
imports = [
2023-01-21 20:08:05 +00:00
./git.nix
2024-10-26 00:39:35 +01:00
./neovim.nix
2023-01-11 20:22:35 +00:00
./tmux/default.nix
];
options.custom.home.defaults = lib.mkEnableOption "home";
config = lib.mkIf config.custom.home.defaults {
home-manager =
let
stateVersion = if (builtins.compareVersions config.system.stateVersion "24.05") > 0 then config.system.stateVersion else "22.11";
in
{
users.root.home = {
inherit stateVersion;
2023-05-11 21:12:57 +01:00
## Set an empty ZSH config and defer to the global one
file.".zshrc".text = "";
};
2023-05-11 21:12:57 +01:00
2024-10-31 21:59:07 +00:00
users."${config.custom.user}" = {
home = {
inherit stateVersion;
};
2023-05-11 21:12:57 +01:00
2024-10-31 21:59:07 +00:00
services = {
ssh-agent.enable = true;
};
programs = {
2024-10-31 22:38:16 +00:00
zoxide = {
enable = true;
options = [ "--cmd cd" ];
};
2024-10-31 21:59:07 +00:00
zsh.enable = true;
};
};
2023-05-11 21:12:57 +01:00
};
# Delegation
custom.home.git.enable = true;
2024-10-26 00:39:35 +01:00
custom.home.neovim.enable = true;
custom.home.tmux.enable = true;
2023-05-11 21:12:57 +01:00
};
2023-01-11 20:22:35 +00:00
}