Okay, warn if there's a problem
This commit is contained in:
parent
488ec8ab62
commit
7bca4825ec
1 changed files with 6 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue