feat: use function instead of manual operations

This commit is contained in:
Infinidoge 2021-09-20 21:23:17 -04:00
parent 39757ccc4a
commit 80cec235bb
2 changed files with 10 additions and 5 deletions

View file

@ -1,2 +1,6 @@
{ lib }: { lib }:
lib.makeExtensible (self: { }) lib.makeExtensible (self:
{
flattenListSet = imports: lib.lists.flatten builtins.concatLists builtins.attrValues imports;
}
)

View file

@ -1,9 +1,10 @@
{ config, self, lib, pkgs, ... }: { { config, self, lib, pkgs, ... }: {
home-manager.users.infinidoge = { suites, profiles, ... }: { home-manager.users.infinidoge = { suites, profiles, ... }: {
imports = imports = lib.flattenListSet {
(with suites; lib.lists.flatten [ base ]) suites = with suites; [ base ];
++ (with profiles; [ ]) profiles = with profiles; [ ];
++ [ ]; imports = [ ];
};
home.packages = with pkgs; [ home.packages = with pkgs; [
discord-plugged discord-plugged