From 1f8104c4561fa7af2f2c6dfed4c44e08b56568ec Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Thu, 1 Aug 2024 00:55:15 -0700 Subject: [PATCH] config file --- module.nix | 8 +++++--- repo.nix | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/module.nix b/module.nix index 44f7551..0912ba9 100644 --- a/module.nix +++ b/module.nix @@ -46,8 +46,10 @@ in }; }; - repo-clone.pkg = pkgs.writeText "${service}.conf" '' - uwu - ''; + repo-clone.pkg = pkgs.writeText "${service}.conf" + ( + lib.strings.concatStringsSep "\n" + (lib.attrsets.mapAttrsToList (target: settings: "${target} ${settings.url}") cfg.repos) + ); }; } diff --git a/repo.nix b/repo.nix index 5074ef2..1196b11 100644 --- a/repo.nix +++ b/repo.nix @@ -4,7 +4,7 @@ let inherit (lib) types mkOption; in -types.attrsOf (types.submodule ({ ... }: { +types.attrsOf (types.submodule ({ config, ... }: { options = { url = mkOption { type = types.str;