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, ... }: { config, pkgs, ... }:
with pkgs.lib; with pkgs.lib;
###### interface
let 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 { environment.etc = mkOption {
default = []; default = [];
example = [ example = [
@ -37,29 +57,13 @@ let
}; };
}; };
}; };
}; };
in
###### implementation ###### implementation
let
etc = pkgs.stdenv.mkDerivation { config = {
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];
system.build.etc = etc; system.build.etc = etc;
@ -70,4 +74,6 @@ in
${pkgs.perl}/bin/perl ${./setup-etc.pl} ${etc}/etc ${pkgs.perl}/bin/perl ${./setup-etc.pl} ${etc}/etc
''; '';
};
} }