3
0
Fork 0
forked from mirrors/nixpkgs

Selectively allow /etc files to be disabled

For instance, if you don't want NixOS to emit /etc/hosts, you
can say:

  environment.etc.hosts.enable = false;
This commit is contained in:
Eelco Dolstra 2013-02-03 14:19:05 +01:00
parent 1daab1ebf5
commit 979117b6b8

View file

@ -6,7 +6,7 @@ with pkgs.lib;
let
etc' = attrValues config.environment.etc;
etc' = filter (f: f.enable) (attrValues config.environment.etc);
etc = pkgs.stdenv.mkDerivation {
name = "etc";
@ -46,6 +46,15 @@ in
options = singleton ({ name, config, ... }:
{ options = {
enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether this /etc file should be generated. This
option allows specific /etc files to be disabled.
'';
};
target = mkOption {
description = ''
Name of symlink (relative to