Remove old configuration.nix
This commit is contained in:
parent
4c29603f14
commit
9116b1886f
1 changed files with 0 additions and 47 deletions
|
@ -1,47 +0,0 @@
|
||||||
{lib, ...}:
|
|
||||||
with builtins;
|
|
||||||
with lib; let
|
|
||||||
fn = import (toString ./fn.nix) {inherit lib;};
|
|
||||||
# Cannot use <hostName> here as those evaluations only work with existing paths >.<
|
|
||||||
# hostName and secretPtah can be set with -I hostName=$HOSTNAME and -I secretPath=$SECRETPATH respectively
|
|
||||||
# , defaults to the contents of /secret/hostName
|
|
||||||
secretPath =
|
|
||||||
fn.ifelse (tryEval (toString <secretPath>)).value
|
|
||||||
(toString <secretPath>)
|
|
||||||
(toString /secret);
|
|
||||||
hostName =
|
|
||||||
(
|
|
||||||
findFirst
|
|
||||||
(elem: elem.prefix == "hostName")
|
|
||||||
{path = fileContents "${secretPath}/hostName";}
|
|
||||||
nixPath
|
|
||||||
)
|
|
||||||
.path;
|
|
||||||
machinePath = builtins.toPath (./machines + ("/" + hostName));
|
|
||||||
machineFiles = fn.lst {
|
|
||||||
p = machinePath;
|
|
||||||
b = true;
|
|
||||||
};
|
|
||||||
configFiles = fn.lst {
|
|
||||||
p = toString ./config;
|
|
||||||
b = true;
|
|
||||||
};
|
|
||||||
pkgsFiles = fn.lst {
|
|
||||||
p = toString ./pkgs;
|
|
||||||
b = true;
|
|
||||||
};
|
|
||||||
serviceFiles = fn.lst {
|
|
||||||
p = toString ./services;
|
|
||||||
b = true;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./options/machine.nix
|
|
||||||
./services/mailserver/default.nix
|
|
||||||
]
|
|
||||||
++ machineFiles
|
|
||||||
++ configFiles
|
|
||||||
++ pkgsFiles
|
|
||||||
++ serviceFiles;
|
|
||||||
}
|
|
Loading…
Reference in a new issue