nix-config/home/global.nix

73 lines
1.6 KiB
Nix

{ inputs, lib, pkgs, config, outputs, ... }: {
imports = [
# home-manager
inputs.nix-index-database.hmModules.nix-index
# Basic CLI tools and environment
./features/cli
./features/devel
] ++ (builtins.attrValues outputs.homeManagerModules);
# Configure nixpkgs
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
# Configure nix
nix = {
package = lib.mkDefault pkgs.nixVersions.nix_2_22;
settings = {
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
};
};
# Add some additional packages for Nix-centric development
home.packages = with pkgs; [
# formatting
nixpkgs-fmt
nixfmt-classic
# inspecting derivations
nix-tree
# lsps
nil
nixd
# once-off command execution
comma
];
programs = { home-manager.enable = true; };
programs.git = {
enable = true;
userEmail = "shadows@with.al";
userName = "liv";
extraConfig = {
init.defaultBranch = "main";
pull.rebase = true;
};
};
programs.jujutsu = {
enable = true;
settings = {
user.name = "liv";
user.email = "shadows@with.al";
ui.paginate = "never";
};
};
home = {
username = lib.mkDefault "lu";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "24.05";
sessionPath = [ "$HOME/.local/bin" ];
sessionVariables = { FLAKE = "$HOME/nix-config"; };
};
systemd.user.startServices = "sd-switch";
xdg.mime.enable = true;
}