feat(nix): Automatically import module outputs

This drastically simplifies things since we no longer have to worry
about adding and removing files from a default.nix.
This commit is contained in:
Donovan Glover 2024-03-31 19:23:01 -04:00
parent d1513228d0
commit 44422516d4
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 4 additions and 65 deletions

View File

@ -30,6 +30,8 @@
./. ./.
{ {
nixpkgs.overlays = builtins.attrValues self.overlays; nixpkgs.overlays = builtins.attrValues self.overlays;
imports = builtins.attrValues self.nixosModules;
home-manager.sharedModules = builtins.attrValues self.homeManagerModules;
} }
]; ];
}; };
@ -39,5 +41,7 @@
builtins.mapAttrs (name: value: callPackage ./packages/${name}) (builtins.readDir ./packages); builtins.mapAttrs (name: value: callPackage ./packages/${name}) (builtins.readDir ./packages);
overlays = builtins.mapAttrs (name: value: import ./overlays/${name}) (builtins.readDir ./overlays); overlays = builtins.mapAttrs (name: value: import ./overlays/${name}) (builtins.readDir ./overlays);
nixosModules = builtins.mapAttrs (name: value: import ./modules/${name}) (builtins.readDir ./modules);
homeManagerModules = builtins.mapAttrs (name: value: import ./home/${name}) (builtins.readDir ./home);
}; };
} }

View File

@ -1,30 +0,0 @@
{
home-manager.sharedModules = [
./dunst.nix
./eww.nix
./fcitx.nix
./fish.nix
./git.nix
./gpg.nix
./gtk.nix
./htop.nix
./hyprland.nix
./ironbar.nix
./kitty.nix
./librewolf.nix
./mime-apps.nix
./mpv.nix
./ncmpcpp.nix
./neovim.nix
./pqiv.nix
./qutebrowser.nix
./rofi.nix
./thunar.nix
./udiskie.nix
./xcursor.nix
./xdg-user-dirs.nix
./xresources.nix
./yazi.nix
./zathura.nix
];
}

View File

@ -1,35 +0,0 @@
{
imports = [
./boot.nix
./cdemu.nix
./docker.nix
./dual-function-keys.nix
./fish.nix
./fonts.nix
./greetd.nix
./home-manager.nix
./hyprland.nix
./locale.nix
./logind.nix
./mullvad.nix
./neovim.nix
./networking.nix
./nix.nix
./packages.nix
./piper.nix
./pipewire.nix
./postgres.nix
./resolved.nix
./starship.nix
./stylix.nix
./system.nix
./systemd.nix
./thunar.nix
./timezone.nix
./udev.nix
./user.nix
./virtualization.nix
./wine.nix
./zram.nix
];
}