nixos-config-priv/home/laozi/common/core/default.nix

81 lines
2.0 KiB
Nix
Raw Normal View History

2024-06-09 17:11:39 +00:00
{ config, lib, pkgs, outputs, configLib, ... }:
2024-06-07 11:37:13 +00:00
{
2024-06-09 17:11:39 +00:00
imports = (configLib.scanPaths ./.)
++ (builtins.attrValues outputs.homeManagerModules);
2024-06-07 11:37:13 +00:00
2024-06-09 17:11:39 +00:00
services.ssh-agent.enable = true;
2024-06-07 11:37:13 +00:00
home = {
2024-06-09 17:11:39 +00:00
username = lib.mkDefault "ta";
2024-06-07 11:37:13 +00:00
homeDirectory = lib.mkDefault "/home/${config.home.username}";
2024-06-07 12:39:56 +00:00
stateVersion = lib.mkDefault "24.05";
2024-06-07 11:37:13 +00:00
sessionPath = [
"$HOME/.local/bin"
2024-06-09 17:11:39 +00:00
"$HOME/scripts/talon_scripts"
2024-06-07 11:37:13 +00:00
];
sessionVariables = {
2024-06-09 17:11:39 +00:00
FLAKE = "$HOME/src/nix-config";
SHELL = "zsh";
TERM = "foot";
TERMINAL = "foot";
EDITOR = "nvim";
MANPAGER = "batman"; # see ./cli/bat.nix
2024-06-07 11:37:13 +00:00
};
};
home.packages = builtins.attrValues {
inherit (pkgs)
# Packages that don't have custom configs go here
2024-06-09 17:11:39 +00:00
# TODO: spaces before comment are removed by nixpkgs-fmt
# See: https://github.com/nix-community/nixpkgs-fmt/issues/305
borgbackup# backups
btop# resource monitor
coreutils# basic gnu utils
# curl
eza# ls replacement
fd# tree style ls
findutils# find
fzf# fuzzy search
jq# JSON pretty printer and manipulator
nix-tree# nix package tree viewer
ncdu# TUI disk usage
pciutils
pfetch# system info
pre-commit# git hooks
p7zip# compression & encryption
ripgrep# better grep
usbutils
tree# cli dir tree viewer
unzip# zip extraction
unrar# rar extraction
wget# downloader
zstd # zstd compression
zip; # zip compression
2024-06-07 11:37:13 +00:00
};
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = (_: true);
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
2024-06-09 17:11:39 +00:00
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
2024-06-07 11:37:13 +00:00
warn-dirty = false;
};
};
programs = {
home-manager.enable = true;
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
2024-06-09 17:11:39 +00:00
}