etc.nix: Fix style

This commit is contained in:
Eelco Dolstra 2013-02-03 10:35:11 +01:00
parent 36088abb39
commit 73152e1702

View File

@ -1,12 +1,32 @@
# Produce a script to generate /etc.
# Management of static files in /etc.
{ config, pkgs, ... }:
with pkgs.lib;
###### interface
let
option = {
etc = pkgs.stdenv.mkDerivation {
name = "etc";
builder = ./make-etc.sh;
preferLocalBuild = true;
/* !!! Use toXML. */
sources = map (x: x.source) config.environment.etc;
targets = map (x: x.target) config.environment.etc;
modes = map (x: x.mode) config.environment.etc;
};
in
{
###### interface
options = {
environment.etc = mkOption {
default = [];
example = [
@ -37,29 +57,13 @@ let
};
};
};
};
in
###### implementation
let
etc = pkgs.stdenv.mkDerivation {
name = "etc";
builder = ./make-etc.sh;
preferLocalBuild = true;
/* !!! Use toXML. */
sources = map (x: x.source) config.environment.etc;
targets = map (x: x.target) config.environment.etc;
modes = map (x: x.mode) config.environment.etc;
};
in
{
require = [option];
###### implementation
config = {
system.build.etc = etc;
@ -70,4 +74,6 @@ in
${pkgs.perl}/bin/perl ${./setup-etc.pl} ${etc}/etc
'';
};
}