modules: convert to list to match nixpkg sematics

This commit is contained in:
Timothy DeHerrera 2020-01-04 16:08:49 -07:00
parent 0b131c0bf1
commit ae303b39fd
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
2 changed files with 14 additions and 2 deletions

View File

@ -8,6 +8,9 @@
outputs = args@{ self, home, nixpkgs }:
let
inherit (builtins) listToAttrs baseNameOf;
inherit (nixpkgs.lib) removeSuffix;
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = self.overlays;
@ -25,6 +28,15 @@
inherit (pkgs) sddm-chili dejavu_nerdfont purs;
};
nixosModules = (import ./modules) // { profiles = import ./profiles; };
nixosModules = let
moduleList = import ./modules;
modulesAttrs = listToAttrs (map (path: {
name = removeSuffix ".nix" (baseNameOf path);
value = import path;
}) moduleList);
profilesAttrs = { profiles = import ./profiles; };
in modulesAttrs // profilesAttrs;
};
}

View File

@ -1 +1 @@
{ qbittorrent-nox = import ./services/torrent/qbittorrent.nix; }
[ ./services/torrent/qbittorrent.nix ]