From 9116b1886f51f2aa72ba7093ac20e512d7a68872 Mon Sep 17 00:00:00 2001 From: derped Date: Thu, 9 May 2024 13:22:50 +0200 Subject: [PATCH] Remove old configuration.nix --- configuration.nix | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 configuration.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index 74d6a29..0000000 --- a/configuration.nix +++ /dev/null @@ -1,47 +0,0 @@ -{lib, ...}: -with builtins; -with lib; let - fn = import (toString ./fn.nix) {inherit lib;}; - # Cannot use 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 )).value - (toString ) - (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; -}