1
0
Fork 0

Auto import files instead of maintaining file list.

This commit is contained in:
Kevin Baensch 2020-03-29 09:10:14 +02:00
parent 081d10bc21
commit c543303ab9
Signed by: derped
GPG Key ID: C0F1D326C7626543
15 changed files with 12 additions and 99 deletions

View File

@ -1,12 +0,0 @@
{
imports = [
./etc.nix
./fonts.nix
./locale.nix
./networking.nix
./nix.nix
./security.nix
./users.nix
./zsh.nix
];
}

View File

@ -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;
}

View File

@ -1,10 +1,6 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
services.cron.enable = false;
programs.gnome-terminal.enable = true;

View File

@ -4,7 +4,6 @@ with lib;
{
imports = [
../../options/machine.nix
../../options/copySysConf.nix
];

View File

@ -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";
}

View File

@ -6,7 +6,6 @@ let
cfg = config.machine;
in {
imports = [
../../options/machine.nix
../../options/mailman3/options.nix
];

View File

@ -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%} '";

View File

@ -3,10 +3,6 @@
with lib;
{
imports = [
../../options/machine.nix
];
config.machine = rec {
hostName = "DavidsServer";
administrators = [ { name = "david"; id = 1000; } ];

View File

@ -1,10 +1,6 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
programs.gnome-terminal.enable = true;
services.cron.enable = false;

View File

@ -4,7 +4,6 @@ with lib;
{
imports = [
../../options/machine.nix
../../options/copySysConf.nix
];
config.machine = {

View File

@ -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";
}

View File

@ -6,7 +6,6 @@ let
cfg = config.machine;
in {
imports = [
../../options/machine.nix
../../options/mailman3/options.nix
];

View File

@ -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;

View File

@ -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
];
}

View File

@ -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;
};
};
};
}