From 0c25e7fd345272bd9f2a9e520c9d2d372c5febe8 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 19 Feb 2026 18:05:49 +0100 Subject: [PATCH] home-manager: Use minimal module set and import everything else manually --- modules/home/de/hyprland/default.nix | 6 ++++++ modules/home/programs/btop.nix | 9 ++++++++- modules/home/programs/firefox.nix | 3 +++ modules/home/programs/git.nix | 19 ++++++++++++++++++- modules/home/programs/hyprlock.nix | 3 +++ modules/home/programs/kitty.nix | 3 +++ modules/home/programs/shell/aliases.nix | 3 +++ modules/home/programs/shell/atuin.nix | 3 +++ modules/home/programs/shell/direnv.nix | 9 ++++++++- modules/home/programs/shell/zsh/default.nix | 6 ++++++ modules/home/programs/ssh.nix | 3 +++ modules/home/programs/vscode.nix | 3 +++ modules/home/services/cliphist.nix | 3 +++ modules/home/services/hypridle.nix | 3 +++ modules/home/services/hyprpaper.nix | 9 ++++++++- modules/home/services/waybar.nix | 9 ++++++++- modules/home/services/wpaperd.nix | 9 ++++++++- profiles/workstation.nix | 1 + 18 files changed, 98 insertions(+), 6 deletions(-) diff --git a/modules/home/de/hyprland/default.nix b/modules/home/de/hyprland/default.nix index 972ac3f..f7cd16a 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/de/hyprland/default.nix @@ -1,11 +1,17 @@ { config, osConfig, + modulesPath, pkgs, lib, ... }: { + imports = [ + "${modulesPath}/services/window-managers/hyprland.nix" + "${modulesPath}/services/dunst.nix" + ]; + options.custom.de.hyprland.enable = lib.mkEnableOption "" // { default = osConfig.custom.de.hyprland.enable; }; diff --git a/modules/home/programs/btop.nix b/modules/home/programs/btop.nix index 41dd253..481ba0d 100644 --- a/modules/home/programs/btop.nix +++ b/modules/home/programs/btop.nix @@ -1,5 +1,12 @@ -{ config, lib, ... }: { + config, + modulesPath, + lib, + ... +}: +{ + imports = [ "${modulesPath}/programs/btop.nix" ]; + options.custom.programs.btop.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.btop.enable { diff --git a/modules/home/programs/firefox.nix b/modules/home/programs/firefox.nix index 0f78491..0c21f86 100644 --- a/modules/home/programs/firefox.nix +++ b/modules/home/programs/firefox.nix @@ -1,5 +1,6 @@ { config, + modulesPath, inputs, pkgs, lib, @@ -27,6 +28,8 @@ let }; in { + imports = [ "${modulesPath}/programs/firefox" ]; + options.custom.programs.firefox = { enable = lib.mkEnableOption ""; extensions = lib.mkOption { diff --git a/modules/home/programs/git.nix b/modules/home/programs/git.nix index a2488f7..edcf3cb 100644 --- a/modules/home/programs/git.nix +++ b/modules/home/programs/git.nix @@ -1,5 +1,22 @@ -{ config, lib, ... }: { + config, + modulesPath, + lib, + ... +}: +{ + imports = [ + "${modulesPath}/programs/git.nix" + "${modulesPath}/programs/lazygit.nix" + "${modulesPath}/programs/delta.nix" + "${modulesPath}/programs/jujutsu.nix" + "${modulesPath}/programs/diff-highlight.nix" + "${modulesPath}/programs/diff-so-fancy.nix" + "${modulesPath}/programs/difftastic.nix" + "${modulesPath}/programs/patdiff.nix" + "${modulesPath}/programs/riff.nix" + ]; + options.custom.programs.git.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.git.enable { diff --git a/modules/home/programs/hyprlock.nix b/modules/home/programs/hyprlock.nix index a27fcae..9930232 100644 --- a/modules/home/programs/hyprlock.nix +++ b/modules/home/programs/hyprlock.nix @@ -1,6 +1,7 @@ { config, osConfig, + modulesPath, pkgs-unstable, lib, ... @@ -9,6 +10,8 @@ let cfg = config.custom.programs.hyprlock; in { + imports = [ "${modulesPath}/programs/hyprlock.nix" ]; + options.custom.programs.hyprlock = { enable = lib.mkEnableOption ""; fprintAuth = lib.mkEnableOption "" // { diff --git a/modules/home/programs/kitty.nix b/modules/home/programs/kitty.nix index 50cf79e..6e3ce32 100644 --- a/modules/home/programs/kitty.nix +++ b/modules/home/programs/kitty.nix @@ -1,10 +1,13 @@ { config, + modulesPath, pkgs, lib, ... }: { + imports = [ "${modulesPath}/programs/kitty.nix" ]; + options.custom.programs.kitty.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.kitty.enable { diff --git a/modules/home/programs/shell/aliases.nix b/modules/home/programs/shell/aliases.nix index 8a3d799..3b4a58e 100644 --- a/modules/home/programs/shell/aliases.nix +++ b/modules/home/programs/shell/aliases.nix @@ -1,10 +1,13 @@ { config, + modulesPath, pkgs, lib, ... }: { + imports = [ "${modulesPath}/programs/zoxide.nix" ]; + options.custom.programs.shell.aliases.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.shell.aliases.enable { diff --git a/modules/home/programs/shell/atuin.nix b/modules/home/programs/shell/atuin.nix index 7ca5b03..b66ba98 100644 --- a/modules/home/programs/shell/atuin.nix +++ b/modules/home/programs/shell/atuin.nix @@ -1,11 +1,14 @@ { config, osConfig, + modulesPath, pkgs, lib, ... }: { + imports = [ "${modulesPath}/programs/atuin.nix" ]; + options.custom.programs.shell.atuin.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.shell.atuin.enable { diff --git a/modules/home/programs/shell/direnv.nix b/modules/home/programs/shell/direnv.nix index 3c81ad6..5a1ef0c 100644 --- a/modules/home/programs/shell/direnv.nix +++ b/modules/home/programs/shell/direnv.nix @@ -1,5 +1,12 @@ -{ config, lib, ... }: { + config, + modulesPath, + lib, + ... +}: +{ + imports = [ "${modulesPath}/programs/direnv.nix" ]; + options.custom.programs.shell.direnv.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.shell.direnv.enable { diff --git a/modules/home/programs/shell/zsh/default.nix b/modules/home/programs/shell/zsh/default.nix index 58fbeb7..60f4718 100644 --- a/modules/home/programs/shell/zsh/default.nix +++ b/modules/home/programs/shell/zsh/default.nix @@ -1,10 +1,16 @@ { config, + modulesPath, pkgs, lib, ... }: { + imports = [ + "${modulesPath}/programs/fish.nix" + "${modulesPath}/programs/fzf.nix" + "${modulesPath}/programs/man.nix" + ]; options.custom.programs.shell.zsh.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.shell.zsh.enable { diff --git a/modules/home/programs/ssh.nix b/modules/home/programs/ssh.nix index 0592d04..5c1ac6c 100644 --- a/modules/home/programs/ssh.nix +++ b/modules/home/programs/ssh.nix @@ -1,11 +1,14 @@ { config, osConfig, + modulesPath, self, lib, ... }: { + imports = [ "${modulesPath}/programs/ssh.nix" ]; + options.custom.programs.ssh = { enable = lib.mkEnableOption ""; publicKeyPath = lib.mkOption { diff --git a/modules/home/programs/vscode.nix b/modules/home/programs/vscode.nix index 50c8231..269fde5 100644 --- a/modules/home/programs/vscode.nix +++ b/modules/home/programs/vscode.nix @@ -1,11 +1,14 @@ { config, + modulesPath, inputs, pkgs, lib, ... }: { + imports = [ "${modulesPath}/programs/vscode" ]; + options.custom.programs.vscode.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.programs.vscode.enable { diff --git a/modules/home/services/cliphist.nix b/modules/home/services/cliphist.nix index f12b310..05e1715 100644 --- a/modules/home/services/cliphist.nix +++ b/modules/home/services/cliphist.nix @@ -1,10 +1,13 @@ { config, + modulesPath, pkgs, lib, ... }: { + imports = [ "${modulesPath}/services/cliphist.nix" ]; + options.custom.services.cliphist.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.services.cliphist.enable { diff --git a/modules/home/services/hypridle.nix b/modules/home/services/hypridle.nix index 8a31c11..9e67998 100644 --- a/modules/home/services/hypridle.nix +++ b/modules/home/services/hypridle.nix @@ -1,10 +1,13 @@ { config, + modulesPath, pkgs-unstable, lib, ... }: { + imports = [ "${modulesPath}/services/hypridle.nix" ]; + options.custom.services.hypridle.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.services.hypridle.enable { diff --git a/modules/home/services/hyprpaper.nix b/modules/home/services/hyprpaper.nix index 400f4ae..baa8f1f 100644 --- a/modules/home/services/hyprpaper.nix +++ b/modules/home/services/hyprpaper.nix @@ -1,5 +1,12 @@ -{ config, lib, ... }: { + config, + modulesPath, + lib, + ... +}: +{ + imports = [ "${modulesPath}/services/hyprpaper.nix" ]; + options.custom.services.hyprpaper.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.services.hyprpaper.enable { diff --git a/modules/home/services/waybar.nix b/modules/home/services/waybar.nix index c6847e9..d7ad335 100644 --- a/modules/home/services/waybar.nix +++ b/modules/home/services/waybar.nix @@ -1,5 +1,12 @@ -{ config, lib, ... }: { + config, + modulesPath, + lib, + ... +}: +{ + imports = [ "${modulesPath}/programs/waybar.nix" ]; + options.custom.services.waybar.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.services.waybar.enable { diff --git a/modules/home/services/wpaperd.nix b/modules/home/services/wpaperd.nix index ad16d31..5a0dcaa 100644 --- a/modules/home/services/wpaperd.nix +++ b/modules/home/services/wpaperd.nix @@ -1,5 +1,12 @@ -{ config, lib, ... }: { + config, + modulesPath, + lib, + ... +}: +{ + imports = [ "${modulesPath}/services/wpaperd.nix" ]; + options.custom.services.wpaperd.enable = lib.mkEnableOption ""; config = lib.mkIf config.custom.services.wpaperd.enable { diff --git a/profiles/workstation.nix b/profiles/workstation.nix index 9aac853..f4356ea 100644 --- a/profiles/workstation.nix +++ b/profiles/workstation.nix @@ -34,6 +34,7 @@ users.users.seb.shell = pkgs.zsh; home-manager = { + minimal = true; useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { inherit inputs self pkgs-unstable; };