1

Home: Add "paths" module

This commit is contained in:
2025-03-16 14:41:39 +01:00
parent e79cd33ecd
commit 750de30cf6
2 changed files with 39 additions and 0 deletions

View File

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

View File

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