95 lines
3.6 KiB
Nix
95 lines
3.6 KiB
Nix
{ config, pkgs, identity, dotfilesPath, ...}: {
|
|
imports = [ ./nix/hm-micro-editor.nix ];
|
|
|
|
home.username = identity.username;
|
|
home.homeDirectory = "/home/${identity.username}";
|
|
home.stateVersion = "26.05";
|
|
|
|
# From https://github.com/NixOS/nixpkgs/blob/nixos-26.05/pkgs/top-level/unixtools.nix#L17-L19
|
|
# You should always try to use single binaries when available. For
|
|
# instance, if your program needs to use "ps", just list it as a build
|
|
# input, not "procps" which requires Linux.
|
|
# idk... it uses one more level of redirection and it makes it harder for me to
|
|
# determine the ultimate source for some of these otherwise
|
|
|
|
home.packages = with pkgs; [
|
|
# TODO: I need to find a better way to audit the transitive dependencies
|
|
# Luckily on most that I saw the (runtime) dependencies are quite minimal
|
|
|
|
# zip
|
|
# Built from source from ftp://ftp.info-zip.org or https://src.fedoraproject.org
|
|
zip
|
|
# unzip
|
|
# Build from source from mirror://sourceforge/infozip/unzip
|
|
unzip
|
|
# fd
|
|
# Built from source from github, sharkdp/fd
|
|
fd
|
|
# micro
|
|
# Built from source from github, micro-editor/micro
|
|
micro
|
|
# curl
|
|
# Built from... source? from https://curl.haxx.se/download or https://github.com/curl/curl
|
|
curl
|
|
# p7zip
|
|
# Built from source from github p7zip-project/p7zip and builds it
|
|
p7zip
|
|
# less - pager
|
|
# Built from source from https://www.greenwoodsoftware.com
|
|
less
|
|
# procps - /proc utilities, specifically for ps
|
|
# Built from source from mirror://sourceforge/procps-ng/procps-ng-...
|
|
procps
|
|
# iputils - ping and others
|
|
# Built from source from github iputils/iputils
|
|
iputils
|
|
|
|
# git - This is added below by the git configuration
|
|
# bash - This should already be installed on any machine I'd be using
|
|
|
|
# TODO: Add dig
|
|
];
|
|
programs.home-manager.enable = true;
|
|
|
|
# Bash
|
|
# DO NOT USE programs.bash. I find it annoying to disable all the defaults
|
|
# when I can't configure it in the same way my .bashrc does (with the very
|
|
# specific history config). I also dont want to translate all of this into
|
|
# nix-y specifications, when the underlying format is very non-nix.
|
|
|
|
# Reminder:
|
|
# Bash has 2 dimensions
|
|
# * non-interactive vs interactive - `bash -c ...` vs just using a tty
|
|
# * login vs non-login - First shell after sshing or opening a tty is the login shell
|
|
|
|
# .bashrc is run for every NON-LOGIN shell (but we run it for _every_ shell using .profile, see below)
|
|
home.file.".bashrc".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.bashrc";
|
|
# .profile is run only in the LOGIN shell (but is also run for sh and others...)
|
|
# .profile has a line that, if running with bash, run the .bashrc
|
|
# Does not run if .bash_profile exists!
|
|
# TODO: I need to make sure .bash_profile gets deleted!!
|
|
# TODO: I need to maybe thing about /etc/bash.bashrc and all these other fucking shell files litered around the system??
|
|
home.file.".profile".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.profile";
|
|
|
|
# Git
|
|
programs.git = {
|
|
enable = true;
|
|
package = pkgs.gitMinimal;
|
|
settings = {
|
|
user.name = identity.git.name;
|
|
user.email = identity.git.email;
|
|
core.excludesfile = "${dotfilesPath}/.gitignore";
|
|
core.editor = "micro";
|
|
init.defaultBranch = identity.git.defaultBranch;
|
|
};
|
|
};
|
|
|
|
# Fd
|
|
home.file.".config/fd/ignore".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/fd/ignore";
|
|
|
|
# Override locales to only include EN (this fixes the 200MB include)
|
|
# i18n.glibcLocales = pkgs.glibcLocales.override {
|
|
# allLocales = false;
|
|
# locales = [ "en_US.UTF-8/UTF-8" ];
|
|
# };
|
|
}
|