diff --git a/modules/misc/specialization.nix b/modules/misc/specialisation.nix
similarity index 78%
rename from modules/misc/specialization.nix
rename to modules/misc/specialisation.nix
index 105f0d67e..e9844f2d2 100644
--- a/modules/misc/specialization.nix
+++ b/modules/misc/specialisation.nix
@@ -3,7 +3,10 @@
with lib;
{
- options.specialization = mkOption {
+ imports =
+ [ (mkRenamedOptionModule [ "specialization" ] [ "specialisation" ]) ];
+
+ options.specialisation = mkOption {
type = types.attrsOf (types.submodule {
options = {
configuration = mkOption {
@@ -11,10 +14,10 @@ with lib;
extended = extendModules {
modules = [{
# Prevent infinite recursion
- specialization = mkOverride 0 { };
+ specialisation = mkOverride 0 { };
# If used inside the NixOS/nix-darwin module, we get conflicting definitions
- # of `name` inside the specialization: one is the user name coming from the
+ # of `name` inside the specialisation: one is the user name coming from the
# NixOS module definition and the other is `configuration`, the name of this
# option. Thus we need to explicitly wire the former into the module arguments.
# See discussion at https://github.com/nix-community/home-manager/issues/3716
@@ -34,19 +37,19 @@ with lib;
description = ''
A set of named specialized configurations. These can be used to extend
your base configuration with additional settings. For example, you can
- have specializations named light
and dark
+ have specialisations named light
and dark
that applies light and dark color theme configurations.
Note, this is an experimental option for now and you therefore have to
- activate the specialization by looking up and running the activation
+ activate the specialisation by looking up and running the activation
script yourself. Note, running the activation script will create a new
Home Manager generation.
- For example, to activate the dark
specialization. You can
+ For example, to activate the dark
specialisation. You can
first look up your current Home Manager generation by running
@@ -57,7 +60,7 @@ with lib;
then run
- $ /nix/store/jy…ac-home-manager-generation/specialization/dark/activate
+ $ /nix/store/jy…ac-home-manager-generation/specialisation/dark/activate
Starting Home Manager activation
…
@@ -69,14 +72,14 @@ with lib;
'';
};
- config = mkIf (config.specialization != { }) {
+ config = mkIf (config.specialisation != { }) {
home.extraBuilderCommands = let
link = n: v:
let pkg = v.configuration.home.activationPackage;
- in "ln -s ${pkg} $out/specialization/${n}";
+ in "ln -s ${pkg} $out/specialisation/${n}";
in ''
- mkdir $out/specialization
- ${concatStringsSep "\n" (mapAttrsToList link config.specialization)}
+ mkdir $out/specialisation
+ ${concatStringsSep "\n" (mapAttrsToList link config.specialisation)}
'';
};
}
diff --git a/modules/modules.nix b/modules/modules.nix
index 73008004a..2cff12dc3 100644
--- a/modules/modules.nix
+++ b/modules/modules.nix
@@ -32,7 +32,7 @@ let
./misc/numlock.nix
./misc/pam.nix
./misc/qt.nix
- ./misc/specialization.nix
+ ./misc/specialisation.nix
./misc/submodule-support.nix
./misc/tmpfiles.nix
./misc/version.nix
diff --git a/tests/default.nix b/tests/default.nix
index 1b5067a73..fa202ff23 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -53,7 +53,7 @@ import nmt {
./modules/home-environment
./modules/misc/fontconfig
./modules/misc/nix
- ./modules/misc/specialization
+ ./modules/misc/specialisation
./modules/programs/aerc
./modules/programs/alacritty
./modules/programs/alot
diff --git a/tests/modules/misc/specialization/default.nix b/tests/modules/misc/specialization/default.nix
index ddbc22c6a..33c240ff6 100644
--- a/tests/modules/misc/specialization/default.nix
+++ b/tests/modules/misc/specialization/default.nix
@@ -1 +1 @@
-{ specialization = ./specialization.nix; }
+{ specialisation = ./specialisation.nix; }
diff --git a/tests/modules/misc/specialization/specialization.nix b/tests/modules/misc/specialization/specialization.nix
index 9d6149a0a..a8d417d48 100644
--- a/tests/modules/misc/specialization/specialization.nix
+++ b/tests/modules/misc/specialization/specialization.nix
@@ -4,7 +4,7 @@ with lib;
{
home.file.testfile.text = "not special";
- specialization.test.configuration = {
+ specialisation.test.configuration = {
home.file.testfile.text = "very special";
};
@@ -12,7 +12,7 @@ with lib;
assertFileExists home-files/testfile
assertFileContains home-files/testfile "not special"
- assertFileExists specialization/test/home-files/testfile
- assertFileContains specialization/test/home-files/testfile "not special"
+ assertFileExists specialisation/test/home-files/testfile
+ assertFileContains specialisation/test/home-files/testfile "not special"
'';
}