Files
nix-config-v2/home/default.nix

59 lines
1.2 KiB
Nix

{ lib
, pkgs
, userName
, userEmail
, ghostty
, isNixOS ? true
, role
, ...
}:
let
# Have a file structure that holds all the configuration files that can't be configured by Nix
dirs = {
defaults = ../defaults;
};
in
{
# Import sub modules
imports = [
./packages
];
home = lib.mkMerge [
{
username = userName;
homeDirectory =
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
stateVersion = "24.11";
}
(lib.mkIf isNixOS {
sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "sway";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_CACHE_HOME = "$HOME/.cache";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
NIXOS_OZONE_WL = "1";
};
})
(lib.mkIf pkgs.stdenv.isLinux {
pointerCursor = {
gtk.enable = true;
package = pkgs.catppuccin-cursors.mochaDark;
name = "catppuccin-mocha-dark-cursors";
size = 22;
};
})
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}