Skip to content

Commit

Permalink
refactor: replace internal 'modules' option namespace with 'dotfiles'
Browse files Browse the repository at this point in the history
Replace the 'modules' option namespace with the 'dotfiles' namespace to
align namespaces with the extended 'lib' [1].

[1]: 988bf62
  • Loading branch information
trueNAHO committed May 13, 2024
1 parent c27951e commit dc4df5f
Show file tree
Hide file tree
Showing 125 changed files with 450 additions and 442 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[developer_documentation_architecture_code_map_modules_directory]]
===== /modules/<DIRECTORY>/
:directory-modules: /modules
:sed: sed 's@\.@/@g'
:sed: sed 's/^dotfiles/modules/; s@\.@/@g'

This directory contains all modules used by
`<<developer_documentation_architecture_code_map_home_configurations_accessibility_prefix_name_default_nix>>`.
Expand All @@ -18,7 +18,7 @@ structure:
echo "$MODULE" | {sed}
----

:module-attribute-set: modules.camelCase.kebab-case.snake_case
:module-attribute-set: dotfiles.camelCase.kebab-case.snake_case
:module-path: /modules/camelCase/kebab-case/snake_case/default.nix
====
The `{module-attribute-set}` module attribute set would be declared at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[developer_documentation_architecture_cross_cutting_concerns_naming_conventions_home_activation_name]]
====== home.activation.<NAME>
:module: modules.camelCase.kebab-case.snake_case
:module: dotfiles.camelCase.kebab-case.snake_case

The `<NAME>` attribute in `home.activation.<NAME>` corresponds to the
<<developer_documentation_architecture_code_map_modules_directory, module>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
====== lib.mkEnableOption "<DESCRIPTION>"
:module: modules.camelCase.kebab-case.snake_case
:module: dotfiles.camelCase.kebab-case.snake_case

The `<DESCRIPTION>` in `lib.mkEnableOption "<DESCRIPTION>"` corresponds to the
<<developer_documentation_architecture_code_map_modules_directory, module>>
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
.${name}
)
.options
.modules;
.dotfiles;
in
extraConfig:
pkgs.nixosOptionsDoc (extraConfig {
Expand Down
2 changes: 1 addition & 1 deletion home_configurations/private/full/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lib:
lib.dotfiles.homeManagerConfiguration.homeManagerConfiguration "full" {
config.modules = {
config.dotfiles = {
agenix.homeManagerModules.default.enable = true;

homeManager = {
Expand Down
12 changes: 6 additions & 6 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
```nix
homeManagerConfiguration "home-manager" {
config.modules.homeManager.programs.home-manager.enable = true;
config.dotfiles.homeManager.programs.home-manager.enable = true;
imports = [modules/homeManager/programs/home-manager];
}
=> { home-manager = { ... }; }
Expand Down Expand Up @@ -174,20 +174,20 @@
```nix
documentation = "https://nixos.org/nixos/options.xhtml#opt-services.easyeffects.enable"
literalExpression = "programs.dconf.enable = true;"
src = "modules.homeManager.services.easyeffects"
src = "dotfiles.homeManager.services.easyeffects"
systemRequirement src literalExpression documentation
=> {
after = [ ... ];
before = [ ... ];
data = "printf 'trace: INFO: modules.homeManager.services.easyeffects: %s\\n' \"include 'programs.dconf.enable = true;' in the system configuration: https://nixos.org/nixos/options.xhtml#opt-services.easyeffects.enable\"\n";
data = "printf 'trace: INFO: dotfiles.homeManager.services.easyeffects: %s\\n' \"include 'programs.dconf.enable = true;' in the system configuration: https://nixos.org/nixos/options.xhtml#opt-services.easyeffects.enable\"\n";
}
systemRequirement src literalExpression ""
=> {
after = [ ... ];
before = [ ... ];
data = "printf 'trace: INFO: modules.homeManager.services.easyeffects: %s\\n' \"include 'programs.dconf.enable = true;' in the system configuration\"\n";
data = "printf 'trace: INFO: dotfiles.homeManager.services.easyeffects: %s\\n' \"include 'programs.dconf.enable = true;' in the system configuration\"\n";
}
```
*/
Expand Down Expand Up @@ -229,12 +229,12 @@
allowUnfree = toString config.nixpkgs.config.allowUnfree;
in
lib.dotfiles.lib.hm.dag.entryBefore.writeBoundary.printf
"modules.homeManager.nixpkgs.config.allowUnfree"
"dotfiles.homeManager.nixpkgs.config.allowUnfree"
"'nixpkgs.config.allowUnfree = ${allowUnfree};'";
=> {
after = [ ... ];
before = [ ... ];
data = "printf 'trace: INFO: modules.homeManager.nixpkgs.config.allowUnfree: %s\\n' \"'nixpkgs.config.allowUnfree = 1;'\"\n";
data = "printf 'trace: INFO: dotfiles.homeManager.nixpkgs.config.allowUnfree: %s\\n' \"'nixpkgs.config.allowUnfree = 1;'\"\n";
}
*/
printf = src: message:
Expand Down
6 changes: 3 additions & 3 deletions modules/agenix/homeManagerModules/default/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
lib,
...
}: let
module = "modules.agenix.homeManagerModules.default";
module = "dotfiles.agenix.homeManagerModules.default";
in {
imports = [inputs.agenix.homeManagerModules.default];

options.modules.agenix.homeManagerModules.default.enable =
options.dotfiles.agenix.homeManagerModules.default.enable =
lib.mkEnableOption module;

config = lib.mkIf config.modules.agenix.homeManagerModules.default.enable {
config = lib.mkIf config.dotfiles.agenix.homeManagerModules.default.enable {
age.identityPaths = ["${config.home.homeDirectory}/.ssh/age"];

home.activation.${module} = let
Expand Down
6 changes: 3 additions & 3 deletions modules/homeManager/fonts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.fonts.enable =
lib.mkEnableOption "modules.homeManager.fonts";
options.dotfiles.homeManager.fonts.enable =
lib.mkEnableOption "dotfiles.homeManager.fonts";

config = lib.mkIf config.modules.homeManager.fonts.enable {
config = lib.mkIf config.dotfiles.homeManager.fonts.enable {
fonts.fontconfig = {
defaultFonts = {
monospace = ["FiraCodeNerdFont"];
Expand Down
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/acpi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.acpi.enable =
lib.mkEnableOption "modules.homeManager.home.packages.acpi";
options.dotfiles.homeManager.home.packages.acpi.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.acpi";

config = lib.mkIf config.modules.homeManager.home.packages.acpi.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.acpi.enable {
home.packages = [pkgs.acpi];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/aria/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.aria.enable =
lib.mkEnableOption "modules.homeManager.home.packages.aria";
options.dotfiles.homeManager.home.packages.aria.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.aria";

config = lib.mkIf config.modules.homeManager.home.packages.aria.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.aria.enable {
home.packages = [pkgs.aria];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/asciidoctor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.asciidoctor.enable =
lib.mkEnableOption "modules.homeManager.home.packages.asciidoctor";
options.dotfiles.homeManager.home.packages.asciidoctor.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.asciidoctor";

config =
lib.mkIf
config.modules.homeManager.home.packages.asciidoctor.enable {
config.dotfiles.homeManager.home.packages.asciidoctor.enable {
home.packages = [pkgs.asciidoctor-with-extensions];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/bandwhich/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.bandwhich.enable =
lib.mkEnableOption "modules.homeManager.home.packages.bandwhich";
options.dotfiles.homeManager.home.packages.bandwhich.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.bandwhich";

config = lib.mkIf config.modules.homeManager.home.packages.bandwhich.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.bandwhich.enable {
home.packages = [pkgs.bandwhich];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/catimg/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.catimg.enable =
lib.mkEnableOption "modules.homeManager.home.packages.catimg";
options.dotfiles.homeManager.home.packages.catimg.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.catimg";

config = lib.mkIf config.modules.homeManager.home.packages.catimg.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.catimg.enable {
home.packages = [pkgs.catimg];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/catnip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.catnip.enable =
lib.mkEnableOption "modules.homeManager.home.packages.catnip";
options.dotfiles.homeManager.home.packages.catnip.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.catnip";

config = lib.mkIf config.modules.homeManager.home.packages.catnip.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.catnip.enable {
home.packages = [pkgs.catnip];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/diskonaut/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.diskonaut.enable =
lib.mkEnableOption "modules.homeManager.home.packages.diskonaut";
options.dotfiles.homeManager.home.packages.diskonaut.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.diskonaut";

config = lib.mkIf config.modules.homeManager.home.packages.diskonaut.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.diskonaut.enable {
home.packages = [pkgs.diskonaut];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/du-dust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.du-dust.enable =
lib.mkEnableOption "modules.homeManager.home.packages.du-dust";
options.dotfiles.homeManager.home.packages.du-dust.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.du-dust";

config = lib.mkIf config.modules.homeManager.home.packages.du-dust.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.du-dust.enable {
home.packages = [pkgs.du-dust];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/dua/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.dua.enable =
lib.mkEnableOption "modules.homeManager.home.packages.dua";
options.dotfiles.homeManager.home.packages.dua.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.dua";

config = lib.mkIf config.modules.homeManager.home.packages.dua.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.dua.enable {
home.packages = [pkgs.dua];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/duf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.duf.enable =
lib.mkEnableOption "modules.homeManager.home.packages.duf";
options.dotfiles.homeManager.home.packages.duf.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.duf";

config = lib.mkIf config.modules.homeManager.home.packages.duf.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.duf.enable {
home.packages = [pkgs.duf];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/fd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.fd.enable =
lib.mkEnableOption "modules.homeManager.home.packages.fd";
options.dotfiles.homeManager.home.packages.fd.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.fd";

config = lib.mkIf config.modules.homeManager.home.packages.fd.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.fd.enable {
home.packages = [pkgs.fd];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/ffmpeg/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.ffmpeg.enable =
lib.mkEnableOption "modules.homeManager.home.packages.ffmpeg";
options.dotfiles.homeManager.home.packages.ffmpeg.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.ffmpeg";

config = lib.mkIf config.modules.homeManager.home.packages.ffmpeg.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.ffmpeg.enable {
home.packages = [pkgs.ffmpeg];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/file/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.file.enable =
lib.mkEnableOption "modules.homeManager.home.packages.file";
options.dotfiles.homeManager.home.packages.file.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.file";

config = lib.mkIf config.modules.homeManager.home.packages.file.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.file.enable {
home.packages = [pkgs.file];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/gcc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.gcc.enable =
lib.mkEnableOption "modules.homeManager.home.packages.gcc";
options.dotfiles.homeManager.home.packages.gcc.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.gcc";

config = lib.mkIf config.modules.homeManager.home.packages.gcc.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.gcc.enable {
home.packages = [pkgs.gcc];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/gimp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.gimp.enable =
lib.mkEnableOption "modules.homeManager.home.packages.gimp";
options.dotfiles.homeManager.home.packages.gimp.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.gimp";

config = lib.mkIf config.modules.homeManager.home.packages.gimp.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.gimp.enable {
home.packages = [pkgs.gimp];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/glava/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.glava.enable =
lib.mkEnableOption "modules.homeManager.home.packages.glava";
options.dotfiles.homeManager.home.packages.glava.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.glava";

config = lib.mkIf config.modules.homeManager.home.packages.glava.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.glava.enable {
home.packages = [pkgs.glava];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/glow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.glow.enable =
lib.mkEnableOption "modules.homeManager.home.packages.glow";
options.dotfiles.homeManager.home.packages.glow.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.glow";

config = lib.mkIf config.modules.homeManager.home.packages.glow.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.glow.enable {
home.packages = [pkgs.glow];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/gping/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.gping.enable =
lib.mkEnableOption "modules.homeManager.home.packages.gping";
options.dotfiles.homeManager.home.packages.gping.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.gping";

config = lib.mkIf config.modules.homeManager.home.packages.gping.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.gping.enable {
home.packages = [pkgs.gping];
};
}
6 changes: 3 additions & 3 deletions modules/homeManager/home/packages/inkscape/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
pkgs,
...
}: {
options.modules.homeManager.home.packages.inkscape.enable =
lib.mkEnableOption "modules.homeManager.home.packages.inkscape";
options.dotfiles.homeManager.home.packages.inkscape.enable =
lib.mkEnableOption "dotfiles.homeManager.home.packages.inkscape";

config = lib.mkIf config.modules.homeManager.home.packages.inkscape.enable {
config = lib.mkIf config.dotfiles.homeManager.home.packages.inkscape.enable {
home.packages = [pkgs.inkscape];
};
}
Loading

0 comments on commit dc4df5f

Please sign in to comment.