This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/home.nix
T
2026-07-26 11:42:17 +02:00

85 lines
1.8 KiB
Nix

{ config, pkgs, lib, ... }:
{
home.username = "johannes";
home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/johannes" else "/home/johannes";
home.stateVersion = "24.05";
home.packages = with pkgs; [
git
curl
wget
neovim
ripgrep
fd
nushell
starship
zoxide
lazygit
fastfetch
atuin
zellij
unp
carapace
bun
nodejs
pipx
python3
uv
rustup
cargo-binstall
];
home.file = {
".config" = {
source = ./config;
recursive = true;
};
".local/share" = {
source = ./local_share;
recursive = true;
};
".local/bin" = {
source = ./local_bin;
recursive = true;
};
".agents" = {
source = ./agents;
recursive = true;
};
".pi" = {
source = ./pi;
recursive = true;
};
};
age.identityPaths = [ "${config.home.homeDirectory}/.config/age/keys.txt" ];
age.secrets."git_config" = {
file = ./secrets/git_config.age;
path = "${config.home.homeDirectory}/.config/git/config";
};
age.secrets."jj_config" = {
file = ./secrets/jj_config.age;
path = "${config.home.homeDirectory}/.config/jj/config.toml";
};
home.activation.installFonts = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [ "$(uname)" = "Darwin" ]; then
mkdir -p "$HOME/Library/Fonts"
cp ${./fonts}/*.otf "$HOME/Library/Fonts/"
else
mkdir -p "$HOME/.local/share/fonts"
cp ${./fonts}/*.otf "$HOME/.local/share/fonts/"
${pkgs.fontconfig}/bin/fc-cache -f -v "$HOME/.local/share/fonts"
fi
'';
home.activation.cloneNvim = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [ ! -d "$HOME/.config/nvim" ]; then
${pkgs.git}/bin/git clone https://github.com/jokresner/nvim "$HOME/.config/nvim"
fi
'';
programs.home-manager.enable = true;
}