diff --git a/flake.lock b/flake.lock index 84095d6..c362065 100644 --- a/flake.lock +++ b/flake.lock @@ -202,11 +202,11 @@ ] }, "locked": { - "lastModified": 1773419163, - "narHash": "sha256-3dZnUQ9CON+w7zm6WSlqjQUUKOKipLKJlPBLe6xmXu4=", + "lastModified": 1773624348, + "narHash": "sha256-TMr51otfujj9MXHDmN3o37xbkuStzAq+STPnkOZLon4=", "owner": "AvengeMedia", "repo": "dms-plugin-registry", - "rev": "2327eede74ccc23b9006dc39414485dd7280f164", + "rev": "8c189157a3b8851ae05db1a27a3f3de0801dab77", "type": "github" }, "original": { @@ -374,11 +374,11 @@ ] }, "locked": { - "lastModified": 1773264488, - "narHash": "sha256-rK0507bDuWBrZo+0zts9bCs/+RRUEHuvFE5DHWPxX/Q=", + "lastModified": 1773607598, + "narHash": "sha256-nPV/IE0NwQjYcXkEGOmCIEsX9i8HFMeq2RupYzfVdiI=", "owner": "nix-community", "repo": "home-manager", - "rev": "5c0f63f8d55040a7eed69df7e3fcdd15dfb5a04c", + "rev": "1f8f9e001235652cf54f9c1f7983f9c0e920944a", "type": "github" }, "original": { @@ -413,11 +413,11 @@ }, "import-tree": { "locked": { - "lastModified": 1772999353, - "narHash": "sha256-dPb0WxUhFaz6wuR3B6ysqFJpsu8txKDPZvS47AT2XLI=", + "lastModified": 1773554199, + "narHash": "sha256-6apV5N1F5tTD8JY9AUGnkWmy56HqDPn4MNFRsq4Rg+s=", "owner": "vic", "repo": "import-tree", - "rev": "545a4df146fce44d155573e47f5a777985acf912", + "rev": "c6ebc59c85ee54cfb68163d06d1a3149ce0fe431", "type": "github" }, "original": { @@ -448,11 +448,11 @@ ] }, "locked": { - "lastModified": 1773498847, - "narHash": "sha256-93jTY0A0uOJJRn3qPWbPUaE7J5l0MVhTwuyy2vZzBi8=", + "lastModified": 1773585334, + "narHash": "sha256-GJV6Bm/C1+3cq2L0uK0dE7F6EB6dz5N/H1GuOiwadtc=", "owner": "numtide", "repo": "llm-agents.nix", - "rev": "de71dddfdd172ab4892ab0b56841e81c45ee8cc7", + "rev": "0aa0a9a068beb125b148bf47ac45daf266dd0af3", "type": "github" }, "original": { @@ -468,11 +468,11 @@ ] }, "locked": { - "lastModified": 1773501540, - "narHash": "sha256-Bz+4nN6+wrV2w4JLBlZEN4wl57E0RIs1VYI6R1kwyVg=", + "lastModified": 1773624209, + "narHash": "sha256-KbmCjRujYcfLlgu2TK+OnPoEJl0NkSOM8h8plkVccIw=", "owner": "natsukium", "repo": "mcp-servers-nix", - "rev": "1f4a6d4c5bc1349a0c95f8e4c8c819e6e10c3701", + "rev": "bfb4a5b6565dc07de81121f09231e963d4349b56", "type": "github" }, "original": { @@ -537,11 +537,11 @@ ] }, "locked": { - "lastModified": 1773501701, - "narHash": "sha256-+0LBAEm8F5h9Nm+hdS07aoS1W4oTtW6c8lltb66oOYQ=", + "lastModified": 1773625790, + "narHash": "sha256-lbdP/l8p/h003/ZtvfCOPGjuAZwC72omd4NTA8u11UU=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "39ac039250a4a32bf8691405cac04864fc66a70d", + "rev": "9794fb620fd3099ffc9e5445f85a325c9e8f349c", "type": "github" }, "original": { @@ -640,11 +640,11 @@ ] }, "locked": { - "lastModified": 1773369317, - "narHash": "sha256-AeJgLJp0UxO5CDnIa9+dkK9/SeB2dDpBF4dYIf38Yng=", + "lastModified": 1773542803, + "narHash": "sha256-EjxdnUGP9Ym4EqAa2qmSOnQR6QTNtQThaJAyN7Kv0u8=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "62286299d8059a8cd357188c1b807d126bc691ed", + "rev": "0fbf5fd80b87d9de87e0961735fac8faacd4b00e", "type": "github" }, "original": { @@ -660,11 +660,11 @@ ] }, "locked": { - "lastModified": 1772945408, - "narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=", + "lastModified": 1773552174, + "narHash": "sha256-mHSRNrT1rjeYBgkAlj07dW3+1nFEgAd8Gu6lgyfT9DU=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "1c1d8ea87b047788fd7567adf531418c5da321ec", + "rev": "8faeb68130df077450451b6734a221ba0d6cde42", "type": "github" }, "original": { @@ -689,11 +689,11 @@ ] }, "locked": { - "lastModified": 1773449015, - "narHash": "sha256-7Q4MsuktyGzRC5B+RuTITnZaDT5JqUq19P7wNFL+7ac=", + "lastModified": 1773597570, + "narHash": "sha256-A6KsirR9kxR1wVFTr8aagk5vUT3rvKTf79Qht6YkxUA=", "owner": "kaylorben", "repo": "nixcord", - "rev": "3e0fc6c4baba8d1a63e11a6d8977a0f92c859801", + "rev": "1cc0ddb766e459b7187e6aeb8b2e046d37361dc4", "type": "github" }, "original": { @@ -749,11 +749,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1773375660, - "narHash": "sha256-C/pSy3nRByzeKFcdtv4pNc8uYuT02pBdQB4BE3knKus=", - "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", + "lastModified": 1773524153, + "narHash": "sha256-VGqRw+oieGCm1faMzDMK+Unt7YRYjsZgoejmcgNmeAQ=", + "rev": "e9f278faa1d0c2fc835bd331d4666b59b505a410", "type": "tarball", - "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.7516.3e20095fe3c6/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.7608.e9f278faa1d0/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -783,11 +783,11 @@ ] }, "locked": { - "lastModified": 1773500884, - "narHash": "sha256-I8lZHLqVYmlq3bviRlVNR+LEy7GME76QT9Bl791j3XI=", + "lastModified": 1773626145, + "narHash": "sha256-Y+JOO7HrFEBkcg8tmBg+RujYt4RxToMUG1/8PA+A9WU=", "owner": "nix-community", "repo": "NUR", - "rev": "ab3ef50aa7a2c6ab5d6dd443c1dd9ec9df9bb40a", + "rev": "53e789a3ea4b0d402c10426f2b5e4c1ceb8cb8a2", "type": "github" }, "original": { @@ -917,11 +917,11 @@ ] }, "locked": { - "lastModified": 1773096132, - "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=", + "lastModified": 1773550941, + "narHash": "sha256-wa/++bL2QeMUreNFBZEWluQfOYB0MnQIeGNMuaX9sfs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", + "rev": "c469b6885f0dcd5c7c56bd935a0f08dbcd9e79e1", "type": "github" }, "original": { diff --git a/nix/flake/per-system/args/default.nix b/nix/flake/per-system/args/default.nix index 58fe805..05058df 100644 --- a/nix/flake/per-system/args/default.nix +++ b/nix/flake/per-system/args/default.nix @@ -1,10 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./lib.nix - ./pkgs.nix - ]; + imports = collectImports ./.; } diff --git a/nix/flake/per-system/default.nix b/nix/flake/per-system/default.nix index c0dbdbf..05058df 100644 --- a/nix/flake/per-system/default.nix +++ b/nix/flake/per-system/default.nix @@ -1,13 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./apps - ./args - ./checks - ./dev-shells.nix - ./pre-commit.nix - ]; + imports = collectImports ./.; } diff --git a/nix/hosts/mephistopheles/boot/default.nix b/nix/hosts/mephistopheles/boot/default.nix index c78a206..cdb63a2 100644 --- a/nix/hosts/mephistopheles/boot/default.nix +++ b/nix/hosts/mephistopheles/boot/default.nix @@ -1,14 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./plymouth.nix - ./regdomain.nix - ./zswap.nix - ]; + imports = collectImports ./.; boot = { initrd.systemd.enable = true; diff --git a/nix/hosts/mephistopheles/default.nix b/nix/hosts/mephistopheles/default.nix index c892941..1aea8ce 100644 --- a/nix/hosts/mephistopheles/default.nix +++ b/nix/hosts/mephistopheles/default.nix @@ -1,29 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./android.nix - ./bluetooth.nix - ./boot - ./disk-config.nix - ./display-manager.nix - ./file-systems.nix - ./fonts.nix - ./gaming.nix - ./gnome.nix - ./hardware - ./impermanence.nix - ./input.nix - ./locale.nix - ./multimedia.nix - ./networking - ./nix - ./security.nix - ./sops.nix - ./users.nix - ]; + imports = collectImports ./.; services = { gvfs.enable = true; # required for "Trash" diff --git a/nix/hosts/mephistopheles/hardware/configuration.nix b/nix/hosts/mephistopheles/hardware/configuration.nix index 56038b0..e31ad9b 100644 --- a/nix/hosts/mephistopheles/hardware/configuration.nix +++ b/nix/hosts/mephistopheles/hardware/configuration.nix @@ -11,6 +11,7 @@ { imports = [ inputs'.nixpkgs.nixosModules.notDetected + inputs'.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 ]; boot.initrd.availableKernelModules = [ diff --git a/nix/hosts/mephistopheles/hardware/default.nix b/nix/hosts/mephistopheles/hardware/default.nix index 4ffd4a0..b1d0e22 100644 --- a/nix/hosts/mephistopheles/hardware/default.nix +++ b/nix/hosts/mephistopheles/hardware/default.nix @@ -1,22 +1,17 @@ { config, - inputs', + lib, userConfig, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./battery.nix - ./configuration.nix - ./graphics.nix - ./keyboard.nix - ./monitor.nix - ./mouse.nix - ./printer.nix - ./thunderbolt.nix - inputs'.nixos-hardware.nixosModules.lenovo-thinkpad-e14-intel-gen7 - ]; + imports = collectImports ./.; # TODO switch to facter after NixOS 26.05 # hardware.facter.reportPath = ./facter.json; diff --git a/nix/hosts/mephistopheles/networking/default.nix b/nix/hosts/mephistopheles/networking/default.nix index b7f8266..0ce575e 100644 --- a/nix/hosts/mephistopheles/networking/default.nix +++ b/nix/hosts/mephistopheles/networking/default.nix @@ -10,6 +10,10 @@ let optional ; + inherit (lib.my) + collectImports + ; + # https://userbase.kde.org/KDEConnect#I_have_two_devices_running_KDE_Connect_on_the_same_network,_but_they_can't_see_each_other kdeConnectPortRange = { from = 1714; @@ -18,10 +22,7 @@ let in { - imports = [ - ./secure-shell.nix - ./synchronization.nix - ]; + imports = collectImports ./.; networking = { hostName = "mephistopheles"; diff --git a/nix/hosts/mephistopheles/nix/default.nix b/nix/hosts/mephistopheles/nix/default.nix index 0ca1630..ba4babb 100644 --- a/nix/hosts/mephistopheles/nix/default.nix +++ b/nix/hosts/mephistopheles/nix/default.nix @@ -12,15 +12,13 @@ let imap1 mkForce ; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./angrr.nix - ./envfs.nix - ./nix-ld.nix - ./nixos-cli.nix - ./nixseparatedebuginfod2.nix - ]; + imports = collectImports ./.; nix = { package = pkgs.unstable.nixVersions.latest; diff --git a/nix/lib/my.nix b/nix/lib/my.nix index be0e1cb..10ddb27 100644 --- a/nix/lib/my.nix +++ b/nix/lib/my.nix @@ -4,13 +4,17 @@ let inherit (builtins) + attrNames baseNameOf convertHash + pathExists readDir hashString ; inherit (lib) + filterAttrs + hasSuffix id isAttrs isPath @@ -28,6 +32,19 @@ let INFINITY = 1.0e308 * 2; in { + collectImports = + dir: + let + isImportable = + name: type: + if type == "directory" then + pathExists (dir + "/${name}/default.nix") + else + hasSuffix ".nix" name && name != "default.nix"; + entries = filterAttrs isImportable (readDir dir); + in + map (name: dir + "/${name}") (attrNames entries); + flakeInputStorePath = { narHash, ... }: let diff --git a/nix/modules/flake/default.nix b/nix/modules/flake/default.nix index e76b06e..05058df 100644 --- a/nix/modules/flake/default.nix +++ b/nix/modules/flake/default.nix @@ -1,12 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./cachix-push.nix - ./flint-git-hook.nix - ./gitleaks-git-hook.nix - ./per-system-flake-inputs.nix - ]; + imports = collectImports ./.; } diff --git a/nix/modules/home-manager/default.nix b/nix/modules/home-manager/default.nix index d23adf9..05058df 100644 --- a/nix/modules/home-manager/default.nix +++ b/nix/modules/home-manager/default.nix @@ -1,10 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./default-shell.nix - ./xdg-bin-home.nix - ]; + imports = collectImports ./.; } diff --git a/nix/modules/nixos/default.nix b/nix/modules/nixos/default.nix index 8e9a28a..05058df 100644 --- a/nix/modules/nixos/default.nix +++ b/nix/modules/nixos/default.nix @@ -1,9 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./fix-automatic-timezoned.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/appearence/default.nix b/nix/users/ilkecan/appearence/default.nix index 9d52736..3502583 100644 --- a/nix/users/ilkecan/appearence/default.nix +++ b/nix/users/ilkecan/appearence/default.nix @@ -1,13 +1,17 @@ { config, + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./fonts.nix - ]; + imports = collectImports ./.; stylix = { enable = true; diff --git a/nix/users/ilkecan/command-line/default.nix b/nix/users/ilkecan/command-line/default.nix index 84aea86..8beea61 100644 --- a/nix/users/ilkecan/command-line/default.nix +++ b/nix/users/ilkecan/command-line/default.nix @@ -1,12 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./shells - ]; + imports = collectImports ./.; home = { sessionVariables = { diff --git a/nix/users/ilkecan/command-line/shells/default.nix b/nix/users/ilkecan/command-line/shells/default.nix index 6fe8f61..3f181c1 100644 --- a/nix/users/ilkecan/command-line/shells/default.nix +++ b/nix/users/ilkecan/command-line/shells/default.nix @@ -1,13 +1,16 @@ { config, + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./nushell.nix - ./zsh - ]; + imports = collectImports ./.; home.defaultShell = config.programs.zsh.package; } diff --git a/nix/users/ilkecan/command-line/shells/zsh/default.nix b/nix/users/ilkecan/command-line/shells/zsh/default.nix index 26ad980..5dac459 100644 --- a/nix/users/ilkecan/command-line/shells/zsh/default.nix +++ b/nix/users/ilkecan/command-line/shells/zsh/default.nix @@ -13,6 +13,10 @@ let mkOrder ; + inherit (lib.my) + collectImports + ; + inherit (config.xdg) cacheHome configHome @@ -34,13 +38,7 @@ let }; in { - imports = [ - ./autosuggestion.nix - ./history.nix - ./options.nix - ./powerlevel10k.nix - ./syntax-highlighting.nix - ]; + imports = collectImports ./.; programs.zsh = { enable = true; diff --git a/nix/users/ilkecan/default.nix b/nix/users/ilkecan/default.nix index 5ea88b0..95f6515 100644 --- a/nix/users/ilkecan/default.nix +++ b/nix/users/ilkecan/default.nix @@ -1,41 +1,20 @@ { config, + lib, pkgs, ... }: let cfg = config.home; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./appearence - ./command-line - ./development - ./file-managers - ./flatpak.nix - ./gaming - ./gtk.nix - ./hardware - ./home-manager.nix - ./input - ./internet - ./llm - ./multimedia - ./networking - ./nix - ./office.nix - ./packaging.nix - ./qt.nix - ./security - ./sops.nix - ./text-editors - ./utilities - ./virtualization - ./wayland - ./xdg - ]; + imports = collectImports ./.; # Home Manager needs a bit of information about you and the # paths it should manage. diff --git a/nix/users/ilkecan/development/default.nix b/nix/users/ilkecan/development/default.nix index 00f565a..c2133c1 100644 --- a/nix/users/ilkecan/development/default.nix +++ b/nix/users/ilkecan/development/default.nix @@ -1,15 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./debugging.nix - ./lsp.nix - ./static-program-analysis - ./version-control - ]; + imports = collectImports ./.; home.packages = with pkgs; [ unstable.devenv diff --git a/nix/users/ilkecan/development/static-program-analysis/default.nix b/nix/users/ilkecan/development/static-program-analysis/default.nix index d802cd1..43c31e0 100644 --- a/nix/users/ilkecan/development/static-program-analysis/default.nix +++ b/nix/users/ilkecan/development/static-program-analysis/default.nix @@ -1,12 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./nix.nix - ]; + imports = collectImports ./.; home.packages = with pkgs; [ keep-sorted # https://github.com/google/keep-sorted diff --git a/nix/users/ilkecan/development/version-control/default.nix b/nix/users/ilkecan/development/version-control/default.nix index f697cf3..d11f40f 100644 --- a/nix/users/ilkecan/development/version-control/default.nix +++ b/nix/users/ilkecan/development/version-control/default.nix @@ -1,12 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./git.nix - ]; + imports = collectImports ./.; home.packages = with pkgs; [ gh diff --git a/nix/users/ilkecan/file-managers/default.nix b/nix/users/ilkecan/file-managers/default.nix index 0caa1b3..05058df 100644 --- a/nix/users/ilkecan/file-managers/default.nix +++ b/nix/users/ilkecan/file-managers/default.nix @@ -1,9 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./nautilus.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/gaming/default.nix b/nix/users/ilkecan/gaming/default.nix index 105007c..d8ef311 100644 --- a/nix/users/ilkecan/gaming/default.nix +++ b/nix/users/ilkecan/gaming/default.nix @@ -1,12 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./steam.nix - ]; + imports = collectImports ./.; home.packages = with pkgs; [ goverlay # github.com/benjamimgois/goverlay diff --git a/nix/users/ilkecan/hardware/default.nix b/nix/users/ilkecan/hardware/default.nix index 08f1879..e6824c3 100644 --- a/nix/users/ilkecan/hardware/default.nix +++ b/nix/users/ilkecan/hardware/default.nix @@ -1,12 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./display.nix - ]; + imports = collectImports ./.; home.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend diff --git a/nix/users/ilkecan/input/default.nix b/nix/users/ilkecan/input/default.nix index bd918df..05058df 100644 --- a/nix/users/ilkecan/input/default.nix +++ b/nix/users/ilkecan/input/default.nix @@ -1,10 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./keyboard.nix - ./webcam.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/internet/communication/default.nix b/nix/users/ilkecan/internet/communication/default.nix index 9b8140f..05058df 100644 --- a/nix/users/ilkecan/internet/communication/default.nix +++ b/nix/users/ilkecan/internet/communication/default.nix @@ -1,5 +1,13 @@ { - imports = [ - ./email - ]; + lib, + ... +}: + +let + inherit (lib.my) + collectImports + ; +in +{ + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/internet/communication/email/default.nix b/nix/users/ilkecan/internet/communication/email/default.nix index fba93a6..05058df 100644 --- a/nix/users/ilkecan/internet/communication/email/default.nix +++ b/nix/users/ilkecan/internet/communication/email/default.nix @@ -1,9 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./thunderbird - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/internet/communication/email/thunderbird/default.nix b/nix/users/ilkecan/internet/communication/email/thunderbird/default.nix index 6cce1d8..1a1061c 100644 --- a/nix/users/ilkecan/internet/communication/email/thunderbird/default.nix +++ b/nix/users/ilkecan/internet/communication/email/thunderbird/default.nix @@ -1,11 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./profiles - ]; + imports = collectImports ./.; programs.thunderbird = { enable = true; diff --git a/nix/users/ilkecan/internet/communication/email/thunderbird/profiles/default.nix b/nix/users/ilkecan/internet/communication/email/thunderbird/profiles/default.nix index fca4474..9aacd82 100644 --- a/nix/users/ilkecan/internet/communication/email/thunderbird/profiles/default.nix +++ b/nix/users/ilkecan/internet/communication/email/thunderbird/profiles/default.nix @@ -1,11 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./ilkecan.nix - ]; + imports = collectImports ./.; programs.thunderbird.profiles.ilkecan.isDefault = true; } diff --git a/nix/users/ilkecan/internet/default.nix b/nix/users/ilkecan/internet/default.nix index b343fe6..56c0ff0 100644 --- a/nix/users/ilkecan/internet/default.nix +++ b/nix/users/ilkecan/internet/default.nix @@ -1,15 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./communication - ./download.nix - ./instant-messaging - ./web - ]; + imports = collectImports ./.; home.packages = with pkgs; [ bandwhich # https://github.com/imsnif/bandwhich diff --git a/nix/users/ilkecan/internet/instant-messaging/default.nix b/nix/users/ilkecan/internet/instant-messaging/default.nix index ba2acf0..05058df 100644 --- a/nix/users/ilkecan/internet/instant-messaging/default.nix +++ b/nix/users/ilkecan/internet/instant-messaging/default.nix @@ -1,10 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./discord.nix - ./matrix.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/internet/web/browsers/default.nix b/nix/users/ilkecan/internet/web/browsers/default.nix index c514179..e3a9a81 100644 --- a/nix/users/ilkecan/internet/web/browsers/default.nix +++ b/nix/users/ilkecan/internet/web/browsers/default.nix @@ -1,13 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./chromium.nix - ./firefox - ./qutebrowser.nix - ]; + imports = collectImports ./.; home = { sessionVariables = { diff --git a/nix/users/ilkecan/internet/web/browsers/firefox/default.nix b/nix/users/ilkecan/internet/web/browsers/firefox/default.nix index c56de3d..8b30baa 100644 --- a/nix/users/ilkecan/internet/web/browsers/firefox/default.nix +++ b/nix/users/ilkecan/internet/web/browsers/firefox/default.nix @@ -15,15 +15,16 @@ let versions ; + inherit (lib.my) + collectImports + ; + cfg = config.programs.firefox; version = versions.majorMinor cfg.package.version; supportedVersions = attrNames (import "${inputs'.betterfox-nix}/data/firefox"); in { - imports = [ - ./policies.nix - ./profiles - ]; + imports = collectImports ./.; home.packages = with pkgs; [ nur.repos.vladexa.mozlz4 # https://github.com/jusw85/mozlz4 diff --git a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/default.nix b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/default.nix index d394c58..34374ca 100644 --- a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/default.nix +++ b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/default.nix @@ -1,11 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./ilkecan - ]; + imports = collectImports ./.; programs.firefox.profiles.ilkecan = { id = 0; diff --git a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/default.nix b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/default.nix index 4e4b8d4..05058df 100644 --- a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/default.nix +++ b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/default.nix @@ -1,13 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./bookmarks.nix - ./containers.nix - ./extensions - ./search.nix - ./settings - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/extensions/default.nix b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/extensions/default.nix index 474e704..5a72ec9 100644 --- a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/extensions/default.nix +++ b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/extensions/default.nix @@ -1,21 +1,17 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { # https://gitlab.com/rycee/nur-expressions/-/raw/master/pkgs/firefox-addons/addons.json - imports = [ - ./darkreader.nix - ./indie-wiki-buddy.nix - ./libredirect.nix - ./ruffle_rs.nix - ./skip-redirect.nix - ./steam-database.nix - ./ublock-origin.nix - ./vimium.nix - ./violentmonkey.nix - ]; + imports = collectImports ./.; programs.firefox.profiles.ilkecan.extensions = { force = true; diff --git a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/settings/default.nix b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/settings/default.nix index f6c3d63..419b865 100644 --- a/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/settings/default.nix +++ b/nix/users/ilkecan/internet/web/browsers/firefox/profiles/ilkecan/settings/default.nix @@ -1,4 +1,5 @@ { + lib, ... }: @@ -7,12 +8,14 @@ let concatStringsSep ; + inherit (lib.my) + collectImports + ; + comSepList = concatStringsSep ","; in { - imports = [ - ./betterfox.nix - ]; + imports = collectImports ./.; programs.firefox = { profiles.ilkecan.settings = { diff --git a/nix/users/ilkecan/internet/web/default.nix b/nix/users/ilkecan/internet/web/default.nix index a26855b..05058df 100644 --- a/nix/users/ilkecan/internet/web/default.nix +++ b/nix/users/ilkecan/internet/web/default.nix @@ -1,10 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./browsers - ./feed.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/llm/default.nix b/nix/users/ilkecan/llm/default.nix index 7a07d4c..05058df 100644 --- a/nix/users/ilkecan/llm/default.nix +++ b/nix/users/ilkecan/llm/default.nix @@ -1,11 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./claude-code.nix - ./codex.nix - ./mcp.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/multimedia/audio/default.nix b/nix/users/ilkecan/multimedia/audio/default.nix index cc5c00b..05058df 100644 --- a/nix/users/ilkecan/multimedia/audio/default.nix +++ b/nix/users/ilkecan/multimedia/audio/default.nix @@ -1,11 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./easyeffects - ./mpd.nix - ./rmpc.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/multimedia/default.nix b/nix/users/ilkecan/multimedia/default.nix index a6fefc9..3cab03c 100644 --- a/nix/users/ilkecan/multimedia/default.nix +++ b/nix/users/ilkecan/multimedia/default.nix @@ -1,16 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./audio - ./gstreamer.nix - ./image.nix - ./video.nix - ./wireplumber - ]; + imports = collectImports ./.; home.packages = with pkgs; [ exiftool diff --git a/nix/users/ilkecan/multimedia/wireplumber/default.nix b/nix/users/ilkecan/multimedia/wireplumber/default.nix index 28455e6..05058df 100644 --- a/nix/users/ilkecan/multimedia/wireplumber/default.nix +++ b/nix/users/ilkecan/multimedia/wireplumber/default.nix @@ -1,8 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/networking/default.nix b/nix/users/ilkecan/networking/default.nix index 3c313c9..0a41cf4 100644 --- a/nix/users/ilkecan/networking/default.nix +++ b/nix/users/ilkecan/networking/default.nix @@ -1,12 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./secure-shell.nix - ]; + imports = collectImports ./.; home = { sessionVariables = { diff --git a/nix/users/ilkecan/nix/default.nix b/nix/users/ilkecan/nix/default.nix index aaa3ad8..308aa7f 100644 --- a/nix/users/ilkecan/nix/default.nix +++ b/nix/users/ilkecan/nix/default.nix @@ -1,6 +1,7 @@ { config, inputs', + lib, pkgs, ... }: @@ -9,11 +10,13 @@ let inherit (config.home) homeDirectory ; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./optnix.nix - ]; + imports = collectImports ./.; nix.channels = { inherit (inputs') diff --git a/nix/users/ilkecan/security/default.nix b/nix/users/ilkecan/security/default.nix index 2101d31..6f5e5c3 100644 --- a/nix/users/ilkecan/security/default.nix +++ b/nix/users/ilkecan/security/default.nix @@ -1,13 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./gpg.nix - ./keepassxc.nix - ]; + imports = collectImports ./.; home.packages = with pkgs; [ age diff --git a/nix/users/ilkecan/text-editors/default.nix b/nix/users/ilkecan/text-editors/default.nix index f870617..811d679 100644 --- a/nix/users/ilkecan/text-editors/default.nix +++ b/nix/users/ilkecan/text-editors/default.nix @@ -1,12 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./neovide.nix - ./neovim - ]; + imports = collectImports ./.; home.sessionVariables = { EDITOR = "nvim"; diff --git a/nix/users/ilkecan/text-editors/neovim/default.nix b/nix/users/ilkecan/text-editors/neovim/default.nix index e05fc9c..3c7324e 100644 --- a/nix/users/ilkecan/text-editors/neovim/default.nix +++ b/nix/users/ilkecan/text-editors/neovim/default.nix @@ -1,20 +1,16 @@ # https://github.com/NotAShelf/nvf/ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./autocmds.nix - ./globals.nix - ./keymaps.nix - ./languages.nix - ./lsp.nix - ./lua.nix - ./options.nix - ./plugins - ./treesitter - ]; + imports = collectImports ./.; programs.nvf = { enable = true; diff --git a/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/default.nix b/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/default.nix index 0474c7a..3db3628 100644 --- a/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/default.nix +++ b/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/default.nix @@ -12,11 +12,13 @@ let inherit (lib.generators) mkLuaInline ; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./sources - ]; + imports = collectImports ./.; programs.nvf.settings.vim.autocomplete.blink-cmp = { enable = true; diff --git a/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/sources/default.nix b/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/sources/default.nix index 05bc157..05058df 100644 --- a/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/sources/default.nix +++ b/nix/users/ilkecan/text-editors/neovim/plugins/blink-cmp/sources/default.nix @@ -1,15 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./conventional-commits.nix - ./dictionary.nix - ./emoji.nix - ./env.nix - ./nerdfont.nix - ./npm.nix - ./ripgrep.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/text-editors/neovim/plugins/blink-pairs.nix b/nix/users/ilkecan/text-editors/neovim/plugins/blink-pairs.nix deleted file mode 100644 index bde16c9..0000000 --- a/nix/users/ilkecan/text-editors/neovim/plugins/blink-pairs.nix +++ /dev/null @@ -1,17 +0,0 @@ -# https://github.com/saghen/blink.pairs -{ - pkgs, - ... -}: - -{ - programs.nvf.settings.vim.extraPlugins = { - blink-pairs = { - package = pkgs.vimPlugins.blink-pairs; - setup = '' - require('blink.pairs').setup({ - }) - ''; - }; - }; -} diff --git a/nix/users/ilkecan/text-editors/neovim/plugins/default.nix b/nix/users/ilkecan/text-editors/neovim/plugins/default.nix index 310cdcc..05058df 100644 --- a/nix/users/ilkecan/text-editors/neovim/plugins/default.nix +++ b/nix/users/ilkecan/text-editors/neovim/plugins/default.nix @@ -1,31 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./blame-nvim.nix - ./blink-cmp - ./blink-indent.nix - # ./blink-pairs.nix - ./claudecode-nvim.nix - ./comment-nvim.nix - ./direnv-nvim.nix - ./flash-nvim.nix - ./highlight-undo.nix - ./lualine.nix - ./nvim-autopairs.nix - ./nvim-colorizer.nix - ./nvim-lightbulb.nix - ./nvim-navic.nix - ./nvim-surround.nix - ./nvim-ts-autotag.nix - ./nvim-web-devicons.nix - ./oil-nvim.nix - ./otter-nvim.nix - ./rainbow-delimiters.nix - ./snacks-nvim.nix - ./trouble-nvim.nix - ./undotree.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/text-editors/neovim/treesitter/default.nix b/nix/users/ilkecan/text-editors/neovim/treesitter/default.nix index a870170..30ceaee 100644 --- a/nix/users/ilkecan/text-editors/neovim/treesitter/default.nix +++ b/nix/users/ilkecan/text-editors/neovim/treesitter/default.nix @@ -8,13 +8,14 @@ let inherit (lib.generators) mkLuaInline ; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./context.nix - ./textobjects.nix - ]; + imports = collectImports ./.; programs.nvf.settings.vim = { treesitter = { diff --git a/nix/users/ilkecan/utilities/default.nix b/nix/users/ilkecan/utilities/default.nix index cb4055d..8f1c7d1 100644 --- a/nix/users/ilkecan/utilities/default.nix +++ b/nix/users/ilkecan/utilities/default.nix @@ -1,13 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./coreutils.nix - ./disk.nix - ./zellij - ]; + imports = collectImports ./.; programs = { atuin = { diff --git a/nix/users/ilkecan/utilities/zellij/default.nix b/nix/users/ilkecan/utilities/zellij/default.nix index acb958f..37a5d17 100644 --- a/nix/users/ilkecan/utilities/zellij/default.nix +++ b/nix/users/ilkecan/utilities/zellij/default.nix @@ -7,13 +7,13 @@ let inherit (lib) mkOrder ; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./keybindings.nix - ./layouts - ./plugins - ]; + imports = collectImports ./.; programs = { zellij = { diff --git a/nix/users/ilkecan/utilities/zellij/layouts/default.nix b/nix/users/ilkecan/utilities/zellij/layouts/default.nix index 84cc5e5..05058df 100644 --- a/nix/users/ilkecan/utilities/zellij/layouts/default.nix +++ b/nix/users/ilkecan/utilities/zellij/layouts/default.nix @@ -1,9 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./code.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/utilities/zellij/plugins/default.nix b/nix/users/ilkecan/utilities/zellij/plugins/default.nix index b72fcb2..9c4a992 100644 --- a/nix/users/ilkecan/utilities/zellij/plugins/default.nix +++ b/nix/users/ilkecan/utilities/zellij/plugins/default.nix @@ -1,11 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./zellij-autolock.nix - ]; + imports = collectImports ./.; programs.zellij.settings = { plugins = { diff --git a/nix/users/ilkecan/virtualization/default.nix b/nix/users/ilkecan/virtualization/default.nix index 1b97fa4..05058df 100644 --- a/nix/users/ilkecan/virtualization/default.nix +++ b/nix/users/ilkecan/virtualization/default.nix @@ -1,9 +1,13 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./podman.nix - ]; + imports = collectImports ./.; } diff --git a/nix/users/ilkecan/wayland/dank-material-shell/default.nix b/nix/users/ilkecan/wayland/dank-material-shell/default.nix index 72cddb0..e7a7ff5 100644 --- a/nix/users/ilkecan/wayland/dank-material-shell/default.nix +++ b/nix/users/ilkecan/wayland/dank-material-shell/default.nix @@ -1,5 +1,6 @@ { inputs', + lib, options, pkgs, ... @@ -7,12 +8,13 @@ let opt = options.programs.dank-material-shell; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./plugins - ./wallpaper.nix - ]; + imports = collectImports ./.; home.packages = with pkgs; [ unstable.dsearch diff --git a/nix/users/ilkecan/wayland/dank-material-shell/plugins/default.nix b/nix/users/ilkecan/wayland/dank-material-shell/plugins/default.nix index 9a3df4a..6d50f1b 100644 --- a/nix/users/ilkecan/wayland/dank-material-shell/plugins/default.nix +++ b/nix/users/ilkecan/wayland/dank-material-shell/plugins/default.nix @@ -1,18 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./alarm-clock.nix - ./command-runner.nix - ./dank-battery-alerts.nix - ./dank-kde-connect.nix - ./dank-pomodoro-timer.nix - ./developer-utilities.nix - ./docker-manager.nix - ./emoji-launcher.nix - ]; + imports = collectImports ./.; programs.dank-material-shell = { managePluginSettings = true; diff --git a/nix/users/ilkecan/wayland/default.nix b/nix/users/ilkecan/wayland/default.nix index 19a07c3..1a1d100 100644 --- a/nix/users/ilkecan/wayland/default.nix +++ b/nix/users/ilkecan/wayland/default.nix @@ -12,6 +12,10 @@ let mkMerge ; + inherit (lib.my) + collectImports + ; + inherit (builtins) any ; @@ -24,11 +28,7 @@ let ); in { - imports = [ - ./dank-material-shell - ./niri - ./satty.nix - ]; + imports = collectImports ./.; dbus.packages = [ pkgs.nautilus # required for xdg-desktop-portal-gnome's FileChooser to work properly diff --git a/nix/users/ilkecan/wayland/niri/binds/default.nix b/nix/users/ilkecan/wayland/niri/binds/default.nix index 8e81804..091450e 100644 --- a/nix/users/ilkecan/wayland/niri/binds/default.nix +++ b/nix/users/ilkecan/wayland/niri/binds/default.nix @@ -1,11 +1,15 @@ { + lib, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./defaults.nix - ]; + imports = collectImports ./.; programs.niri.settings.binds = { "Ctrl+WheelScrollLeft".action.focus-monitor-left = [ ]; diff --git a/nix/users/ilkecan/wayland/niri/default.nix b/nix/users/ilkecan/wayland/niri/default.nix index 183c3ec..2299160 100644 --- a/nix/users/ilkecan/wayland/niri/default.nix +++ b/nix/users/ilkecan/wayland/niri/default.nix @@ -1,21 +1,19 @@ { config, + lib, pkgs, ... }: let cfg = config.programs.niri; + + inherit (lib.my) + collectImports + ; in { - imports = [ - ./autostart.nix - ./binds - ./input.nix - ./layout.nix - ./window-rules.nix - ./workspaces - ]; + imports = collectImports ./.; programs.niri = { enable = true; diff --git a/nix/users/ilkecan/xdg/default.nix b/nix/users/ilkecan/xdg/default.nix index 6314342..b2616de 100644 --- a/nix/users/ilkecan/xdg/default.nix +++ b/nix/users/ilkecan/xdg/default.nix @@ -1,19 +1,16 @@ { + lib, pkgs, ... }: +let + inherit (lib.my) + collectImports + ; +in { - imports = [ - ./autostart.nix - ./basedir.nix - ./desktop-entry.nix - ./desktop-portal.nix - ./mime-apps.nix - ./shared-mime-info.nix - ./terminal-intent.nix - ./user-dirs.nix - ]; + imports = collectImports ./.; home.packages = with pkgs; [ xdg-utils