From 7bca4825ec1b2f410ce5b23f8ae27236fbef8168 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Mon, 2 Sep 2024 11:29:54 -0500 Subject: [PATCH] Okay, warn if there's a problem --- submodules/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/submodules/default.nix b/submodules/default.nix index 4bde0be..a10425d 100644 --- a/submodules/default.nix +++ b/submodules/default.nix @@ -5,9 +5,9 @@ in { options = { my.flakeLocation = lib.mkOption { - default = "/home/${config.home.username}/nixos-config"; + default = null; description = "Location of nixos flake for config"; - type = lib.types.path; + type = lib.types.nullOr lib.types.path; }; my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file"; }; @@ -17,7 +17,10 @@ in home = { file = { - ".config/beets/config.yaml" = { + ".config/beets/config.yaml" = lib.mkIf (!( + config.my.flakeLocation == null && + lib.warn "Didn't set 'my.flakeLocation', I won't symlink config.yaml into place" true + )) { source = config.lib.file.mkOutOfStoreSymlink "${config.my.flakeLocation}/submodules/beets-config/config.yaml"; # recursive = true;