Home: Add "paths" module
This commit is contained in:
14
home/modules/paths/default.nix
Normal file
14
home/modules/paths/default.nix
Normal 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 {};
|
||||
}
|
25
home/modules/paths/options.nix
Normal file
25
home/modules/paths/options.nix
Normal 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";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user