feat: refactor

This commit is contained in:
Barrett Ruth 2026-02-13 21:34:53 -05:00
parent 332a7dbfbe
commit 30286dbedb
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
13 changed files with 231 additions and 151 deletions

View file

@ -2,39 +2,45 @@
lib,
config,
pkgs,
isNixOS,
hostConfig,
...
}:
{
imports = [
./modules/bootstrap.nix
./modules/theme.nix
./modules/shell.nix
./modules/terminal.nix
./modules/git.nix
./modules/editor.nix
./modules/hyprland.nix
./modules/ui.nix
./modules/packages.nix
];
imports =
[
./modules/bootstrap.nix
./modules/theme.nix
./modules/shell.nix
./modules/terminal.nix
./modules/git.nix
./modules/editor.nix
./modules/packages.nix
]
++ lib.optionals hostConfig.isLinux [
./modules/hyprland.nix
./modules/ui.nix
];
config = {
theme = "midnight";
home.username = "barrett";
home.homeDirectory = "/home/${config.home.username}";
home.homeDirectory =
if hostConfig.isDarwin
then "/Users/${config.home.username}"
else "/home/${config.home.username}";
home.stateVersion = "24.11";
xdg.enable = true;
targets.genericLinux.enable = !isNixOS;
targets.genericLinux.enable = hostConfig.isLinux && !hostConfig.isNixOS;
news.display = "silent";
home.sessionPath = [ "${config.home.homeDirectory}/.config/nix/scripts" ];
programs.home-manager.enable = true;
systemd.user.services.nix-flake-update = {
systemd.user.services.nix-flake-update = lib.mkIf hostConfig.isLinux {
Unit.Description = "Update nix flake inputs";
Service = {
Type = "oneshot";
@ -43,7 +49,7 @@
};
};
systemd.user.timers.nix-flake-update = {
systemd.user.timers.nix-flake-update = lib.mkIf hostConfig.isLinux {
Unit.Description = "Auto-update nix flake inputs";
Timer = {
OnCalendar = "daily";
@ -52,7 +58,7 @@
Install.WantedBy = [ "timers.target" ];
};
systemd.user.services.theme-apply = {
systemd.user.services.theme-apply = lib.mkIf hostConfig.isLinux {
Unit = {
Description = "Apply theme on login";
After = [ "graphical-session.target" ];
@ -64,7 +70,7 @@
Install.WantedBy = [ "graphical-session.target" ];
};
systemd.user.services.cliphist-wipe = {
systemd.user.services.cliphist-wipe = lib.mkIf hostConfig.isLinux {
Unit.Description = "Clear clipboard history on session end";
Service = {
Type = "oneshot";