diff --git a/config/default.nix b/config/default.nix deleted file mode 100644 index b1dfef1..0000000 --- a/config/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - imports = [ - ./etc.nix - ./fonts.nix - ./locale.nix - ./networking.nix - ./nix.nix - ./security.nix - ./users.nix - ./zsh.nix - ]; -} diff --git a/configuration.nix b/configuration.nix index e5abe04..22e2739 100644 --- a/configuration.nix +++ b/configuration.nix @@ -12,16 +12,16 @@ let hostVal (fileContents /secret/hostName); machinePath = (builtins.toPath ( ./machines + ("/" + hostName))); - machineConf = machinePath + "/configuration.nix"; - machineOpts = machinePath + "/options.nix"; + 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 = [ - machineConf - machineOpts - ./config/default.nix - ./pkgs/nixpkgs.nix - ./pkgs/systemPackages.nix - ./services/containers.nix - ./services/default.nix - ]; + ./options/machine.nix + ./services/mailserver/default.nix + ] ++ machineFiles + ++ configFiles + ++ pkgsFiles + ++ serviceFiles; } diff --git a/machines/Behemoth/configuration.nix b/machines/Behemoth/configuration.nix index 7ea7386..f0b0cac 100644 --- a/machines/Behemoth/configuration.nix +++ b/machines/Behemoth/configuration.nix @@ -1,10 +1,6 @@ { pkgs, ... }: { - imports = [ - ./hardware-configuration.nix - ]; - services.cron.enable = false; programs.gnome-terminal.enable = true; diff --git a/machines/Behemoth/options.nix b/machines/Behemoth/options.nix index 70d7e81..7cb34f3 100644 --- a/machines/Behemoth/options.nix +++ b/machines/Behemoth/options.nix @@ -4,7 +4,6 @@ with lib; { imports = [ - ../../options/machine.nix ../../options/copySysConf.nix ]; diff --git a/machines/CDServer/configuration.nix b/machines/CDServer/configuration.nix index 6eec01a..f882f61 100644 --- a/machines/CDServer/configuration.nix +++ b/machines/CDServer/configuration.nix @@ -3,10 +3,6 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { - imports = [ - ./hardware-configuration.nix - ]; - system.autoUpgrade.enable = false; services.haveged.enable = true; @@ -15,5 +11,4 @@ # servers. You should change this only after NixOS release notes say you # should. system.stateVersion = "19.03"; - } diff --git a/machines/CDServer/options.nix b/machines/CDServer/options.nix index e826b61..0242e34 100644 --- a/machines/CDServer/options.nix +++ b/machines/CDServer/options.nix @@ -6,7 +6,6 @@ let cfg = config.machine; in { imports = [ - ../../options/machine.nix ../../options/mailman3/options.nix ]; diff --git a/machines/DavidsServer/configuration.nix b/machines/DavidsServer/configuration.nix index e1e605b..c876cc9 100644 --- a/machines/DavidsServer/configuration.nix +++ b/machines/DavidsServer/configuration.nix @@ -3,10 +3,6 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { - imports = [ - ./hardware-configuration.nix - ]; - system.autoUpgrade.enable = false; programs.zsh.promptInit = "PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[magenta]%}%n@)%m %{$fg_bold[green]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '"; diff --git a/machines/DavidsServer/options.nix b/machines/DavidsServer/options.nix index aed903b..125d1ee 100644 --- a/machines/DavidsServer/options.nix +++ b/machines/DavidsServer/options.nix @@ -3,10 +3,6 @@ with lib; { - imports = [ - ../../options/machine.nix - ]; - config.machine = rec { hostName = "DavidsServer"; administrators = [ { name = "david"; id = 1000; } ]; diff --git a/machines/Lilim/configuration.nix b/machines/Lilim/configuration.nix index 8055035..d37dc6d 100644 --- a/machines/Lilim/configuration.nix +++ b/machines/Lilim/configuration.nix @@ -1,10 +1,6 @@ { pkgs, ... }: { - imports = [ - ./hardware-configuration.nix - ]; - programs.gnome-terminal.enable = true; services.cron.enable = false; diff --git a/machines/Lilim/options.nix b/machines/Lilim/options.nix index f3341e5..258748d 100644 --- a/machines/Lilim/options.nix +++ b/machines/Lilim/options.nix @@ -4,7 +4,6 @@ with lib; { imports = [ - ../../options/machine.nix ../../options/copySysConf.nix ]; config.machine = { diff --git a/machines/Ophanim/configuration.nix b/machines/Ophanim/configuration.nix index 61adb62..20f0541 100644 --- a/machines/Ophanim/configuration.nix +++ b/machines/Ophanim/configuration.nix @@ -3,10 +3,6 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { - imports = [ - ./hardware-configuration.nix - ]; - system.autoUpgrade.enable = false; # services.vsftp = { @@ -18,10 +14,10 @@ # }; services.haveged.enable = true; programs.zsh.promptInit = "PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[cyan]%}%n@)%m %{$fg_bold[magenta]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '"; + # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you # should. system.stateVersion = "19.03"; - } diff --git a/machines/Ophanim/options.nix b/machines/Ophanim/options.nix index 5c5189b..62c61e4 100644 --- a/machines/Ophanim/options.nix +++ b/machines/Ophanim/options.nix @@ -6,7 +6,6 @@ let cfg = config.machine; in { imports = [ - ../../options/machine.nix ../../options/mailman3/options.nix ]; diff --git a/pkgs/systemPackages.nix b/pkgs/systemPackages.nix index 53801cb..f50ba3e 100644 --- a/pkgs/systemPackages.nix +++ b/pkgs/systemPackages.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.machine; fn = import (toString ../fn.nix) { inherit lib; }; - pkgsets = map (v: (toString ../.) + "/pkgsets/${v}") (fn.lsf (toString ../pkgsets)); + pkgsets = fn.lst { p = (toString ../pkgsets); b = true;}; in { imports = pkgsets; diff --git a/services/default.nix b/services/default.nix deleted file mode 100644 index cd37302..0000000 --- a/services/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - imports = [ - ./acme.nix - ./cups.nix - ./docker.nix - ./fail2ban.nix - ./gitea.nix - ./hydra.nix - ./mailserver/default.nix - ./mailserver.nix - ./mariaDB.nix - ./nextcloud.nix - ./nginx.nix - ./openssh.nix - ./udev.nix - ./desktop.nix - ]; -} diff --git a/services/prosody.nix b/services/prosody.nix deleted file mode 100644 index 2666cdf..0000000 --- a/services/prosody.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - services.prosody = { - enable = true; - admins = [ "derped@ophanim.de" ]; - allowRegistration = false; - extraConfig = '' - use_libevent = true - s2s_require_encryption = true - c2s_require_encryption = true - ''; - - extraModules = [ "private" "vcard" "privacy" "compression" "component" "muc" "pep" "adhoc" "lastactivity" "admin_adhoc" "blocklist"]; - -# modules.legacyauth = false; - ssl.cert = "/var/lib/acme/ophanim.de/fullchain.pem"; - ssl.key = "/var/lib/acme/ophanim.de/key.pem"; - virtualHosts = { - localhost = { - domain = "localhost"; - enabled = true; - }; - "ophanim.de" = { - domain = "ophanim.de"; - enabled = true; - }; - }; - }; -}