···11-{ config, lib, pkgs, ... }:
22-33-with lib;
44-let
55- cfg = config.services.venus;
66-77- configFile = pkgs.writeText "venus.ini"
88- ''
99- [Planet]
1010- name = ${cfg.name}
1111- link = ${cfg.link}
1212- owner_name = ${cfg.ownerName}
1313- owner_email = ${cfg.ownerEmail}
1414- output_theme = ${cfg.cacheDirectory}/theme
1515- output_dir = ${cfg.outputDirectory}
1616- cache_directory = ${cfg.cacheDirectory}
1717- items_per_page = ${toString cfg.itemsPerPage}
1818- ${(concatStringsSep "\n\n"
1919- (map ({ name, feedUrl, homepageUrl }:
2020- ''
2121- [${feedUrl}]
2222- name = ${name}
2323- link = ${homepageUrl}
2424- '') cfg.feeds))}
2525- '';
2626-2727-in
2828-{
2929-3030- options = {
3131- services.venus = {
3232- enable = mkOption {
3333- default = false;
3434- type = types.bool;
3535- description = ''
3636- Planet Venus is an awesome ‘river of news’ feed reader. It downloads
3737- news feeds published by web sites and aggregates their content
3838- together into a single combined feed, latest news first.
3939- '';
4040- };
4141-4242- dates = mkOption {
4343- default = "*:0/15";
4444- type = types.str;
4545- description = ''
4646- Specification (in the format described by
4747- <citerefentry><refentrytitle>systemd.time</refentrytitle>
4848- <manvolnum>7</manvolnum></citerefentry>) of the time at
4949- which the Venus will collect feeds.
5050- '';
5151- };
5252-5353- user = mkOption {
5454- default = "root";
5555- type = types.str;
5656- description = ''
5757- User for running venus script.
5858- '';
5959- };
6060-6161- group = mkOption {
6262- default = "root";
6363- type = types.str;
6464- description = ''
6565- Group for running venus script.
6666- '';
6767- };
6868-6969- name = mkOption {
7070- default = "NixOS Planet";
7171- type = types.str;
7272- description = ''
7373- Your planet's name.
7474- '';
7575- };
7676-7777- link = mkOption {
7878- default = "https://planet.nixos.org";
7979- type = types.str;
8080- description = ''
8181- Link to the main page.
8282- '';
8383- };
8484-8585- ownerName = mkOption {
8686- default = "Rok Garbas";
8787- type = types.str;
8888- description = ''
8989- Your name.
9090- '';
9191- };
9292-9393- ownerEmail = mkOption {
9494- default = "some@example.com";
9595- type = types.str;
9696- description = ''
9797- Your e-mail address.
9898- '';
9999- };
100100-101101- outputTheme = mkOption {
102102- default = "${pkgs.venus}/themes/classic_fancy";
103103- type = types.path;
104104- description = ''
105105- Directory containing a config.ini file which is merged with this one.
106106- This is typically used to specify templating and bill of material
107107- information.
108108- '';
109109- };
110110-111111- outputDirectory = mkOption {
112112- type = types.path;
113113- description = ''
114114- Directory to place output files.
115115- '';
116116- };
117117-118118- cacheDirectory = mkOption {
119119- default = "/var/cache/venus";
120120- type = types.path;
121121- description = ''
122122- Where cached feeds are stored.
123123- '';
124124- };
125125-126126- itemsPerPage = mkOption {
127127- default = 15;
128128- type = types.int;
129129- description = ''
130130- How many items to put on each page.
131131- '';
132132- };
133133-134134- feeds = mkOption {
135135- default = [];
136136- example = [
137137- {
138138- name = "Rok Garbas";
139139- feedUrl= "http://url/to/rss/feed.xml";
140140- homepageUrl = "http://garbas.si";
141141- }
142142- ];
143143- description = ''
144144- List of feeds.
145145- '';
146146- };
147147-148148- };
149149- };
150150-151151- config = mkIf cfg.enable {
152152-153153- system.activationScripts.venus =
154154- ''
155155- mkdir -p ${cfg.outputDirectory}
156156- chown ${cfg.user}:${cfg.group} ${cfg.outputDirectory} -R
157157- rm -rf ${cfg.cacheDirectory}/theme
158158- mkdir -p ${cfg.cacheDirectory}/theme
159159- cp -R ${cfg.outputTheme}/* ${cfg.cacheDirectory}/theme
160160- chown ${cfg.user}:${cfg.group} ${cfg.cacheDirectory} -R
161161- '';
162162-163163- systemd.services.venus =
164164- { description = "Planet Venus Feed Reader";
165165- path = [ pkgs.venus ];
166166- script = "exec venus-planet ${configFile}";
167167- serviceConfig.User = "${cfg.user}";
168168- serviceConfig.Group = "${cfg.group}";
169169- startAt = cfg.dates;
170170- };
171171-172172- };
173173-}
+1
nixos/modules/rename.nix
···7070 '')
71717272 (mkRemovedOptionModule [ "services" "seeks" ] "")
7373+ (mkRemovedOptionModule [ "services" "venus" ] "The corresponding package was removed from nixpkgs.")
73747475 # Do NOT add any option renames here, see top of the file
7576 ];
···463463 { config, options, name, ... }:
464464 {
465465 options = {
466466-467466 config = mkOption {
468467 description = ''
469468 A specification of the desired configuration of this
470469 container, as a NixOS module.
471470 '';
472472- type = let
473473- confPkgs = if config.pkgs == null then pkgs else config.pkgs;
474474- in lib.mkOptionType {
471471+ type = lib.mkOptionType {
475472 name = "Toplevel NixOS config";
476476- merge = loc: defs: (import (confPkgs.path + "/nixos/lib/eval-config.nix") {
473473+ merge = loc: defs: (import "${toString config.nixpkgs}/nixos/lib/eval-config.nix" {
477474 inherit system;
478478- pkgs = confPkgs;
479479- baseModules = import (confPkgs.path + "/nixos/modules/module-list.nix");
480480- inherit (confPkgs) lib;
481475 modules =
482476 let
483477 extraConfig = {
···526520 '';
527521 };
528522529529- pkgs = mkOption {
530530- type = types.nullOr types.attrs;
531531- default = null;
532532- example = literalExample "pkgs";
523523+ nixpkgs = mkOption {
524524+ type = types.path;
525525+ default = pkgs.path;
526526+ defaultText = "pkgs.path";
533527 description = ''
534534- Customise which nixpkgs to use for this container.
528528+ A path to the nixpkgs that provide the modules, pkgs and lib for evaluating the container.
529529+530530+ To only change the <literal>pkgs</literal> argument used inside the container modules,
531531+ set the <literal>nixpkgs.*</literal> options in the container <option>config</option>.
532532+ Setting <literal>config.nixpkgs.pkgs = pkgs</literal> speeds up the container evaluation
533533+ by reusing the system pkgs, but the <literal>nixpkgs.config</literal> option in the
534534+ container config is ignored in this case.
535535 '';
536536 };
537537···672672 '';
673673 };
674674675675+ # Removed option. See `checkAssertion` below for the accompanying error message.
676676+ pkgs = mkOption { visible = false; };
675677 } // networkOptions;
676678677677- config = mkMerge
678678- [
679679- (mkIf options.config.isDefined {
680680- path = config.config.system.build.toplevel;
681681- })
682682- ];
679679+ config = let
680680+ # Throw an error when removed option `pkgs` is used.
681681+ # Because this is a submodule we cannot use `mkRemovedOptionModule` or option `assertions`.
682682+ optionPath = "containers.${name}.pkgs";
683683+ files = showFiles options.pkgs.files;
684684+ checkAssertion = if options.pkgs.isDefined then throw ''
685685+ The option definition `${optionPath}' in ${files} no longer has any effect; please remove it.
686686+687687+ Alternatively, you can use the following options:
688688+ - containers.${name}.nixpkgs
689689+ This sets the nixpkgs (and thereby the modules, pkgs and lib) that
690690+ are used for evaluating the container.
691691+692692+ - containers.${name}.config.nixpkgs.pkgs
693693+ This only sets the `pkgs` argument used inside the container modules.
694694+ ''
695695+ else null;
696696+ in {
697697+ path = builtins.seq checkAssertion
698698+ mkIf options.config.isDefined config.config.system.build.toplevel;
699699+ };
683700 }));
684701685702 default = {};
···17171818 subPackages = [ "cmd/nebula" "cmd/nebula-cert" ];
19192020- buildFlagsArray = [ "-ldflags='-X main.Build=${version}'" ];
2020+ buildFlagsArray = [ "-ldflags=" "-X main.Build=${version}" ];
21212222 meta = with lib; {
2323 description = "A scalable overlay networking tool with a focus on performance, simplicity and security";
+1
pkgs/top-level/aliases.nix
···717717 v8_3_16_14 = throw "v8_3_16_14 was removed in 2019-11-01: no longer referenced by other packages";
718718 valadoc = throw "valadoc was deprecated on 2019-10-10: valadoc was merged into vala 0.38";
719719 vamp = { vampSDK = vamp-plugin-sdk; }; # added 2020-03-26
720720+ venus = throw "venus has been removed from nixpkgs, as it's unmaintained"; # added 2021-02-05
720721 vdirsyncerStable = vdirsyncer; # added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168
721722 vimbWrapper = vimb; # added 2015-01
722723 vimprobable2 = throw "vimprobable2 has been removed from nixpkgs. It relied on webkitgtk24x that has been removed."; # added 2019-12-05