refactor(home/modules): use module discovery

This commit is contained in:
2026-08-23 00:29:58 +02:00
parent 4b98ff5abe
commit e2301c7682
3 changed files with 2 additions and 11 deletions
+2 -1
View File
@@ -2,13 +2,14 @@
config, config,
lib, lib,
pkgs, pkgs,
myUtils,
... ...
}: }:
{ {
imports = imports =
let let
dirs = lib.attrNames (lib.filterAttrs (_: v: v == "directory") (builtins.readDir ./.)); dirs = myUtils.dirNames ./.;
hasDef = name: builtins.pathExists ./${name}/default.nix; hasDef = name: builtins.pathExists ./${name}/default.nix;
in in
map (name: ./${name}) (builtins.filter hasDef dirs); map (name: ./${name}) (builtins.filter hasDef dirs);
-9
View File
@@ -6,15 +6,6 @@
}: }:
{ {
imports = [
../../clipboard
../../fuzzel
../../mako
../../shikane
../../swayidle
../../waybar
];
options.desktop.niri.enable = lib.mkEnableOption "niri desktop"; options.desktop.niri.enable = lib.mkEnableOption "niri desktop";
config = lib.mkIf config.desktop.niri.enable { config = lib.mkIf config.desktop.niri.enable {
-1
View File
@@ -9,7 +9,6 @@
./bash.nix ./bash.nix
./utils.nix ./utils.nix
./prompt.nix ./prompt.nix
../tmux
]; ];
options.shell.enable = lib.mkEnableOption "shell"; options.shell.enable = lib.mkEnableOption "shell";