refactor: dynamic imports

This commit is contained in:
Leon Schwarzäugl 2025-01-07 17:54:46 +01:00
parent 0da982831f
commit 0f8051cf4a
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
6 changed files with 36 additions and 216 deletions

View file

@ -1,38 +1,7 @@
_:
{ lib, ... }:
let
importNames = lib.swarselsystems.readNix "profiles/home/common";
in
{
imports = [
./settings.nix
./packages.nix
./custom-packages.nix
./sops.nix
./ssh.nix
./stylix.nix
./desktop.nix
./symlink.nix
./env.nix
./programs.nix
./nix-index.nix
./password-store.nix
./direnv.nix
./eza.nix
./git.nix
./fuzzel.nix
./starship.nix
./kitty.nix
./zsh.nix
./mail.nix
./emacs.nix
./waybar.nix
./firefox.nix
./gnome-keyring.nix
./kdeconnect.nix
./mako.nix
./sway.nix
./gpg-agent.nix
./gammastep.nix
# ./safeeyes.nix
./yubikey-touch-detector.nix
./zellij.nix
./tmux.nix
];
imports = lib.swarselsystems.mkImports importNames "profiles/home/common";
}

View file

@ -1,10 +1,10 @@
{ self, ... }:
{ self, lib, ... }:
let
importNames = lib.swarselsystems.readNix "profiles/home/server";
profilesPath = "${self}/profiles";
in
{
imports = [
imports = lib.swarselsystems.mkImports importNames "profiles/home/server" ++ [
"${profilesPath}/home/common/settings.nix"
./symlink.nix
];
}