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:
parent
1daab1ebf5
commit
979117b6b8
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue