diff --git a/flake.lock b/flake.lock index 3bc851a..1f3980c 100644 --- a/flake.lock +++ b/flake.lock @@ -518,6 +518,27 @@ "type": "github" } }, + "haumea": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685133229, + "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=", + "owner": "nix-community", + "repo": "haumea", + "rev": "34dd58385092a23018748b50f9b23de6266dffc2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v0.2.2", + "repo": "haumea", + "type": "github" + } + }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_4", @@ -824,6 +845,7 @@ "firefox-addons": "firefox-addons", "flake-parts": "flake-parts", "hardware": "hardware", + "haumea": "haumea", "home-manager": "home-manager", "impermanence": "impermanence", "nix-gaming": "nix-gaming", diff --git a/flake.nix b/flake.nix index 8671fea..cbfb7f4 100644 --- a/flake.nix +++ b/flake.nix @@ -3,17 +3,13 @@ self, flake-parts, nixpkgs, + haumea, ... } @ inputs: let - _loadProfiles = dir: - b.readDir dir - |> b.mapAttrs (categoryName: _: - b.readDir /${dir}/${categoryName} - |> l.mapAttrs' (profileName: _: { - name = l.removeSuffix ".nix" profileName; - value = /${dir}/${categoryName}/${profileName}; - })); - systemProfiles = _loadProfiles ./sys/profiles; + systemProfiles = haumea.lib.load { + src = ./sys/profiles; + loader = haumea.lib.loaders.path; + }; homeProfiles = ./home; vars = import ./vars; l = nixpkgs.lib; @@ -80,6 +76,9 @@ sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; + haumea.url = "github:nix-community/haumea/v0.2.2"; + haumea.inputs.nixpkgs.follows = "nixpkgs"; + nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs";