diff --git a/home/modules/paths/default.nix b/home/modules/paths/default.nix new file mode 100644 index 00000000..207b0a42 --- /dev/null +++ b/home/modules/paths/default.nix @@ -0,0 +1,14 @@ +{ + config, + nixosConfig, + lib, + mylib, + pkgs, + ... +}: let + inherit (config) paths; +in { + options.paths = import ./options.nix {inherit lib mylib;}; + + config = lib.mkIf paths.enable {}; +} diff --git a/home/modules/paths/options.nix b/home/modules/paths/options.nix new file mode 100644 index 00000000..3c30f16b --- /dev/null +++ b/home/modules/paths/options.nix @@ -0,0 +1,25 @@ +{ + lib, + mylib, + ... +}: +with lib; +with mylib.modules; { + enable = mkEnableOption "paths"; + + nixflake = lib.mkOption { + type = lib.types.path; + apply = toString; + default = "${config.home.homeDirectory}/NixFlake"; + example = "${config.home.homeDirectory}/NixFlake"; + description = "Location of the NixFlake working copy"; + }; + + dotfiles = lib.mkOption { + type = lib.types.path; + apply = toString; + default = "${config.nixflake}/config"; + example = "${config.nixflake}/config"; + description = "Location of the NixFlake working copy's config directory"; + }; +}