dotfiles/home-manager/default.nix

61 lines
1.9 KiB
Nix

{ config, pkgs, lib, username, ... }:
{
imports = [
./packages.nix
./sh.nix
./dconf.nix
./vscode.nix
./git.nix
./fonts.nix
./nvim.nix
];
home.username = "watzon";
home.homeDirectory = "/home/watzon";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
home.stateVersion = "23.11";
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
".config/httpie/config.json".source = ../dotconfig/httpie/config.json;
".config/ghostty/config".source = ../dotconfig/ghostty/config;
};
home.sessionVariables = {
EDITOR = "nvim";
SUDO_EDITOR = "nvim";
SHELL = "${pkgs.zsh}/bin/zsh";
};
# Temporary fix for https://github.com/nix-community/home-manager/issues/1439
home.activation = {
linkDesktopApplications = {
after = [ "writeBoundary" "createXdgUserDirectories" ];
before = [ ];
data = ''
rm -rf ${config.xdg.dataHome}/"applications/home-manager"
mkdir -p ${config.xdg.dataHome}/"applications/home-manager"
cp -Lr ${config.home.homeDirectory}/.nix-profile/share/applications/* ${config.xdg.dataHome}/"applications/home-manager/"
'';
};
};
services.ssh-agent.enable = true;
programs.home-manager.enable = true;
}