home: add option for location of nixfiles repo

This is used by the flake registry as well as a shortcut for editing
Hyprland config
This commit is contained in:
NullBite 2024-04-22 16:48:40 -04:00
parent bb756b32f7
commit 3e1b60d7c3
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 8 additions and 1 deletions

View File

@ -14,7 +14,7 @@ in {
};
to = {
type = "git";
url = "file://${config.home.homeDirectory}/nixfiles";
url = "file://${config.nixfiles.path}";
};
};
};

View File

@ -61,5 +61,12 @@ in
default = (lib.hasAttrByPath [ "nixfiles" "meta" "wayland" ] osConfig) && osConfig.nixfiles.meta.wayland;
example = true;
};
path = lib.mkOption {
description = "The absolute path of the nixfiles flake";
type = lib.types.str;
default = "${config.home.homeDirectory}/nixfiles";
defaultText = "\${config.home.homeDirectory}/nixfiles";
example = "/etc/nixos";
};
};
}