nix/home/home.nix
Barrett Ruth 653ee7dcf5 cleanup
2026-02-09 14:00:41 -05:00

59 lines
1.4 KiB
Nix

{
lib,
config,
pkgs,
...
}:
let
isNixOS = builtins.pathExists /etc/NIXOS;
in
{
imports = [
./modules/bootstrap.nix
./modules/theme.nix
./modules/shell.nix
./modules/terminal.nix
./modules/git.nix
./modules/editor.nix
./modules/ui.nix
./modules/packages.nix
];
config = {
theme = "midnight";
home.username = "barrett";
home.homeDirectory = "/home/${config.home.username}";
home.stateVersion = "24.11";
xdg.enable = true;
targets.genericLinux.enable = !isNixOS;
news.display = "silent";
home.activation.linkScripts = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD mkdir -p "${config.home.homeDirectory}/.local/bin"
$DRY_RUN_CMD ln -sfn "${config.home.homeDirectory}/nix-config/scripts" "${config.home.homeDirectory}/.local/bin/scripts"
'';
programs.home-manager.enable = true;
systemd.user.services.nix-flake-update = {
Unit.Description = "Update nix flake inputs";
Service = {
Type = "oneshot";
WorkingDirectory = "%h/nix-config";
ExecStart = "${pkgs.nix}/bin/nix flake update";
};
};
systemd.user.timers.nix-flake-update = {
Unit.Description = "Auto-update nix flake inputs";
Timer = {
OnCalendar = "daily";
Persistent = true;
};
Install.WantedBy = [ "timers.target" ];
};
};
}