Commit Graph

32 Commits

Author SHA1 Message Date
Christina Sørensen
d5851d5676
nixos/dockerRegistry: add configFile option
defaultText based on how nixos/modules/services/development/athens.nix
does it.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-04-18 06:11:06 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Christina Sørensen
d31cbb78ca
nixos/dockerRegistry: add openFirewall option
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-03-01 09:56:03 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Felix Buehler
6672dde558 treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
Yaya
049d680510 nixos/dockerRegistry: add package option
This allows the module user to select an alternative container registry
package such as `pkgs.gitlab-container-registry` for GitLab users.
2023-05-31 22:14:25 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae
423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Guillaume Girol
bc3bca822a nixos: define the primary group of users where needed 2021-09-12 14:59:30 +02:00
Daniel Nagy
50ba0ac3d6
nixos/dockerRegistry: use port type 2021-06-18 17:30:11 +02:00
Florian Klink
8aaca0addc nixos/docker-registry: always run systemctl of the currently running systemd 2020-05-21 10:29:37 +02:00
Janne Heß
d6c08776ba treewide: Switch to system users 2019-10-12 22:25:28 +02:00
Ben Gamari
2036550a46 nixos/docker-registry: Allow use of non-filesystem storage
Previously this module precluded use of storage backends other than
`filesystem`. It is now possible to configure another storage backend
manually by setting `services.dockerRegistry.storagePath` to `null` and
configuring the other backend via `extraConfig`.
2019-03-23 10:32:56 +00:00
Paul Tötterman
23a84e939e nixos/docker-registry: fix listenAddress
listenAddress config option was previously unused in config generation
2019-02-08 14:39:22 +02:00
Robin Gloster
cb9d784e49 docker-registry: Revert "[bot]: remove unreferenced code"
This code was referenced.

This reverts commit 87f5930c3f.

cc @volth
2018-08-06 16:31:33 +02:00
volth
87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Florian Klink
fff5923686 nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
Mathijs Kwik
c4fd2b7318 nixos/docker-registry: allow running on ports < 1024 2018-06-06 22:26:26 +02:00
Mathijs Kwik
5f1ad29340 nixos/docker-registry: allow nested config options
for example:

services.dockerRegistry = {
    enable = true;
    extraConfig = {
        http = {
            host = "https://${config.networking.hostName}:5000";

            tls = {
                certificate = "${registry-tls}/snakeoil.pem";
                key = "${registry-tls}/snakeoil.key";
            };
        };
    };
};
2018-06-05 11:26:02 +02:00
Michele Catalano
afd3136e8e
nixos/docker-registry: Add support for garbage collector to docker registry 2018-05-01 15:23:47 +02:00
Maximilian Bosch
593dc45141
nixos/docker-registry: cleanup module definition & enhance testcase
The following changes have been applied:

- the property `http.headers.X-Content-Type-Options` must a list of
  strings rather than a serialized list
- instead of `/etc/docker/registry/config.yml` the configuration will be
  written with `pkgs.writeText` and the store path will be used to run
  the registry. This reduces the risk of possible impurities by relying
  on the Nix store only.
- cleaned up the property paths to easy readability and reduce the
  verbosity.
- enhanced the testcase to ensure that digests can be deleted as well
- the `services.docker-registry.extraConfig` object will be merged with
  `registryConfig`

/cc @ironpinguin
2018-05-01 15:23:39 +02:00
Michele Catalano
f5c0b3f887
nixos/docker-registry: add more configuration options for docker-registry 2018-05-01 14:53:50 +02:00
Robin Gloster
dabcd7d4c8 dockerRegistry module: re-init with new underlying software 2016-10-12 14:05:09 +02:00
Domen Kožar
fed3501b07 Remove docker-registry as it's deprecated #18209 2016-09-09 18:50:42 +02:00
Vladimír Čunát
716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Bjørn Forsman
e0b0b9723c nixos/docker-registry: rename 'host' to 'listenAddress'
More descriptive option name.
2015-12-24 00:06:40 +01:00
Vladimír Čunát
99e4371526 curl: split into multiple outputs
Also use pkgconfig to be safer and fix (some) referrers.
2015-10-13 20:18:48 +02:00
Jaka Hudoklin
b7cb0420ca nixos/docker-registry: docker independant docker registry 2015-04-25 14:26:35 +02:00
Vladimír Čunát
5aa9b72400 nixos: typo in docker option description 2015-04-09 20:58:20 +02:00
Jaka Hudoklin
73dc767aa0 nixos: add docker-registry module 2014-11-22 12:16:41 +01:00