summary refs log tree commit diff stats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/default.nix9
-rw-r--r--services/services/acme.nix6
-rw-r--r--services/services/minecraft.nix26
-rw-r--r--services/services/nginx.nix15
-rw-r--r--services/services/nix.nix18
-rw-r--r--services/services/opensshd.nix18
-rw-r--r--services/services/rust-motd.nix79
7 files changed, 0 insertions, 171 deletions
diff --git a/services/default.nix b/services/default.nix
deleted file mode 100644
index c301ba1..0000000
--- a/services/default.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{config, ...}: {
-  imports = [
-    ./services/acme.nix
-    ./services/nginx.nix
-    ./services/nix.nix
-    ./services/opensshd.nix
-    ./services/rust-motd.nix
-  ];
-}
diff --git a/services/services/acme.nix b/services/services/acme.nix
deleted file mode 100644
index 42f9ed5..0000000
--- a/services/services/acme.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{...}: {
-  security.acme = {
-    acceptTerms = true;
-    defaults.email = "admin@vhack.eu";
-  };
-}
diff --git a/services/services/minecraft.nix b/services/services/minecraft.nix
deleted file mode 100644
index 754c974..0000000
--- a/services/services/minecraft.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-  config,
-  pkgs,
-  ...
-}: {
-  users = {
-    groups.minecraft = {};
-    users.minecraft = {
-      isSystemUser = true;
-      group = "minecraft";
-    };
-  };
-  systemd.services.minecraft = {
-    wantedBy = ["multi-user.target"];
-    after = "network.target";
-    description = "Minecraft Server";
-    serviceConfig = {
-      WorkingDirectory = "/srv/minecraft";
-      User = "minecraft";
-      Group = "minecraft";
-      Restart = "always";
-      ExecStart = "${pkgs.openjdk}/bin/java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar --nogui";
-      SyslogIdentifier = "minecraft-server";
-    };
-  };
-}
diff --git a/services/services/nginx.nix b/services/services/nginx.nix
deleted file mode 100644
index 204783b..0000000
--- a/services/services/nginx.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{...}: {
-  networking.firewall = {
-    allowedTCPPorts = [80 443];
-  };
-  services.nginx = {
-    enable = true;
-    virtualHosts = {
-      "vhack.eu" = {
-        forceSSL = true;
-        enableACME = true;
-        root = "/srv/www/vhack.eu";
-      };
-    };
-  };
-}
diff --git a/services/services/nix.nix b/services/services/nix.nix
deleted file mode 100644
index bd562ec..0000000
--- a/services/services/nix.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}: {
-  nix = {
-    #    gc = {
-    #      automatic = true;
-    #      dates = "daily";
-    #      options = "--delete-older-than 3";
-    #    };
-    settings = {
-      auto-optimise-store = true;
-      experimental-features = ["nix-command" "flakes"];
-    };
-  };
-}
diff --git a/services/services/opensshd.nix b/services/services/opensshd.nix
deleted file mode 100644
index cb9f2ba..0000000
--- a/services/services/opensshd.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  config,
-  pkg,
-  ...
-}: {
-  services.openssh = {
-    enable = true;
-    passwordAuthentication = false;
-    hostKeys = [
-      {
-        comment = "key comment";
-        path = "/srv/sshd/ssh_host_ed25519_key";
-        rounds = 1000;
-        type = "ed25519";
-      }
-    ];
-  };
-}
diff --git a/services/services/rust-motd.nix b/services/services/rust-motd.nix
deleted file mode 100644
index 21bc1cd..0000000
--- a/services/services/rust-motd.nix
+++ /dev/null
@@ -1,79 +0,0 @@
-{
-  config,
-  pkgs,
-  ...
-}: {
-  programs.rust-motd = {
-    enable = true;
-    enableMotdInSSHD = true;
-    refreshInterval = "*:0/5"; # 0/5 means: hour 0 AND all hour wich match (0 + 5 * x) (is the same as: 0, 5, 10, 15, 20)
-    settings = {
-      global = {
-        progress_full_character = "=";
-        progress_empty_character = "-";
-        progress_prefix = "[";
-        progress_suffix = "]";
-        time_format = "%Y-%m-%d %H:%M:%S";
-      };
-
-      banner = {
-        color = "red";
-        command = "${pkgs.hostname}/bin/hostname | ${pkgs.figlet}/bin/figlet -f slant";
-        # if you don't want a dependency on figlet, you can generate your
-        # banner however you want, put it in a file, and then use something like:
-        # command = "cat banner.txt"
-      };
-
-      # [weather]
-      # url = "https://wttr.in/New+York,New+York?0"
-      # proxy = "http://proxy:8080"
-
-      # [service_status]
-      # Accounts = "accounts-daemon"
-      # Cron = "cron"
-
-      # [docker_status]
-      # Local containers MUST start with a slash
-      # https://github.com/moby/moby/issues/6705
-      #"/nextcloud-nextcloud-1" = "Nextcloud"
-      #"/nextcloud-nextcloud-mariadb-1" = "Nextcloud Database"
-
-      uptime = {
-        prefix = "Uptime:";
-      };
-
-      # [user_service_status]
-      # gpg-agent = "gpg-agent"
-
-      #s_s_l_certs = {
-      # sort_method = "manual"
-      #
-      #    certs = {
-      #    CertName1 = "/path/to/cert1.pem"
-      #    CertName2 = "/path/to/cert2.pem"
-      # }
-      #};
-
-      filesystems = {
-        root = "/";
-      };
-
-      memory = {
-        swap_pos = "beside"; # or "below" or "none"
-      };
-
-      fail2_ban = {
-        jails = ["sshd"]; #, "anotherjail"]
-      };
-
-      last_login = {
-        sils = 2;
-        soispha = 2;
-        nightingale = 2;
-      };
-
-      last_run = {
-      };
-    };
-  };
-}