diff options
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r-- | nixos/modules/misc/ids.nix | 9 | ||||
-rw-r--r-- | nixos/modules/misc/locate.nix | 4 | ||||
-rw-r--r-- | nixos/modules/misc/nixos.nix | 82 | ||||
-rw-r--r-- | nixos/modules/misc/nixos.xml | 84 |
4 files changed, 12 insertions, 167 deletions
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 064b4cbc4b33..0ab2b8a76fc5 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -248,6 +248,12 @@ matrix-synapse = 224; rspamd = 225; rmilter = 226; + cfdyndns = 227; + gammu-smsd = 228; + pdnsd = 229; + octoprint = 230; + avahi-autoipd = 231; + nntp-proxy = 232; # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! @@ -473,6 +479,9 @@ matrix-synapse = 224; rspamd = 225; rmilter = 226; + cfdyndns = 227; + pdnsd = 229; + octoprint = 230; # When adding a gid, make sure it doesn't match an existing # uid. Users and groups with the same name should have equal diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 318b81ca07c2..5b560cedc623 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -67,7 +67,9 @@ in { }; config = { - warnings = let opt = options.services.locate.period; in optional opt.isDefined "The `period` definition in ${showFiles opt.files} has been removed; please replace it with `interval`, using the new systemd.time interval specifier."; + warnings = + let opt = options.services.locate.period; in + optional opt.isDefined "The ‘services.locate.period’ option in ${showFiles opt.files} has been removed; please replace it with ‘services.locate.interval’, using the systemd.time(7) calendar event format."; systemd.services.update-locatedb = { description = "Update Locate Database"; diff --git a/nixos/modules/misc/nixos.nix b/nixos/modules/misc/nixos.nix deleted file mode 100644 index 84365b640a48..000000000000 --- a/nixos/modules/misc/nixos.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ config, options, lib, ... }: - -# This modules is used to inject a different NixOS version as well as its -# argument such that one can pin a specific version with the versionning -# system of the configuration. -let - nixosReentry = import config.nixos.path { - inherit (config.nixos) configuration extraModules; - inherit (config.nixpkgs) system; - reEnter = true; - }; -in - -with lib; - -{ - options = { - nixos.path = mkOption { - default = null; - example = literalExample "./nixpkgs-15.09/nixos"; - type = types.nullOr types.path; - description = '' - This option give the ability to evaluate the current set of modules - with a different version of NixOS. This option can be used version - the version of NixOS with the configuration without relying on the - <literal>NIX_PATH</literal> environment variable. - ''; - }; - - nixos.system = mkOption { - example = "i686-linux"; - type = types.uniq types.str; - description = '' - Name of the system used to compile NixOS. - ''; - }; - - nixos.extraModules = mkOption { - default = []; - example = literalExample "[ ./sshd-config.nix ]"; - type = types.listOf (types.either (types.submodule ({...}:{options={};})) types.path); - description = '' - Define additional modules which would be loaded to evaluate the - configuration. - ''; - }; - - nixos.configuration = mkOption { - type = types.unspecified; - internal = true; - description = '' - Option used by <filename>nixos/default.nix</filename> to re-inject - the same configuration module as the one used for the current - execution. - ''; - }; - - nixos.reflect = mkOption { - default = { inherit config options; }; - type = types.unspecified; - internal = true; - description = '' - Provides <literal>config</literal> and <literal>options</literal> - computed by the module system and given as argument to all - modules. These are used for introspection of options and - configuration by tools such as <literal>nixos-option</literal>. - ''; - }; - }; - - config = mkMerge [ - (mkIf (config.nixos.path != null) (mkForce { - system.build.toplevel = nixosReentry.system; - system.build.vm = nixosReentry.vm; - nixos.reflect = { inherit (nixosReentry) config options; }; - })) - - { meta.maintainers = singleton lib.maintainers.pierron; - meta.doc = ./nixos.xml; - } - ]; -} diff --git a/nixos/modules/misc/nixos.xml b/nixos/modules/misc/nixos.xml deleted file mode 100644 index 064bdd80b3c9..000000000000 --- a/nixos/modules/misc/nixos.xml +++ /dev/null @@ -1,84 +0,0 @@ -<chapter xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xi="http://www.w3.org/2001/XInclude" - version="5.0" - xml:id="module-misc-nixos"> - -<title>NixOS Reentry</title> - -<!-- FIXME: render nicely --> - -<!-- FIXME: source can be added automatically --> -<para><emphasis>Source:</emphasis> <filename>modules/misc/nixos.nix</filename></para> - -<!-- FIXME: more stuff, like maintainer? --> - -<para>NixOS reentry can be used for both pinning the evaluation to a -specific version of NixOS, and to dynamically add additional modules into -the Module evaluation.</para> - -<section><title>NixOS Version Pinning</title> - -<para>To pin a specific version of NixOS, you need a version that you can -either clone localy, or that you can fetch remotely.</para> - -<para>If you already have a cloned version of NixOS in the directory -<filename>/etc/nixos/nixpkgs-16-03</filename>, then you can specify the -<option>nixos.path</option> with either the path or the relative path of -your NixOS clone. For example, you can add the following to your -<filename>/etc/nixos/configuration.nix</filename> file: - -<programlisting> -nixos.path = ./nixpkgs-16-03/nixos; -</programlisting> -</para> - -<para>Another option is to fetch a specific version of NixOS, with either -the <literal>fetchTarball</literal> builtin, or the -<literal>pkgs.fetchFromGitHub</literal> function and use the result as an -input. - -<programlisting> -nixos.path = "${builtins.fetchTarball https://github.com/NixOS/nixpkgs/archive/1f27976e03c15183191d1b4aa1a40d1f14666cd2.tar.gz}/nixos"; -</programlisting> -</para> - -</section> - - -<section><title>Adding Module Dynamically</title> - -<para>To add additional module, the recommended way is to use statically -known modules in the list of imported arguments as described in <xref -linkend="sec-modularity" />. Unfortunately, this recommended method has -limitation, such that the list of imported files cannot be selected based on -the content of the configuration. - -Fortunately, NixOS reentry system can be used as an alternative to register -new imported modules based on the content of the configuration. To do so, -one should define both <option>nixos.path</option> and -<option>nixos.extraModules</option> options. - -<programlisting> -nixos.path = <nixos>; -nixos.extraModules = - if config.networking.hostName == "server" then - [ ./server.nix ] else [ ./client.nix ]; -</programlisting> - -Also note, that the above can be reimplemented in a different way which is -not as expensive, by using <literal>mkIf</literal> at the top each -configuration if both modules are present on the file system (see <xref -linkend="sec-option-definitions" />) and by always inmporting both -modules.</para> - -</section> - -<section><title>Options</title> - -<para>FIXME: auto-generated list of module options.</para> - -</section> - - -</chapter> |