Okay, warn if there's a problem

This commit is contained in:
Benson Chu 2024-09-02 11:29:54 -05:00
parent 488ec8ab62
commit 7bca4825ec

View file

@ -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;