diff options
author | Profpatsch <mail@profpatsch.de> | 2017-07-08 14:41:57 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-07-08 14:42:19 +0200 |
commit | a232772ebb63c27b530c9bac5fd53b3584dc7fc5 (patch) | |
tree | 64fcbbc19bd4983b5f22d96ad7b3d735ad65b8b4 /machines/profpatsch/haku.nix | |
parent | 8380a6435e03d75e23840cc66d7b669df40dc7bf (diff) |
machines/haku: refactor a bit to include into base server config
Until now, the config on the actual server was deviating because I changed it locally.
Diffstat (limited to 'machines/profpatsch/haku.nix')
-rw-r--r-- | machines/profpatsch/haku.nix | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/machines/profpatsch/haku.nix b/machines/profpatsch/haku.nix index c94484aa..64e1472d 100644 --- a/machines/profpatsch/haku.nix +++ b/machines/profpatsch/haku.nix @@ -4,6 +4,8 @@ let myLib = import ./lib.nix { inherit pkgs lib; }; myPkgs = import ./pkgs.nix { inherit pkgs lib myLib; }; + warpspeedPort = 1338; + myKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNMQvmOfon956Z0ZVdp186YhPHtSBrXsBwaCt0JAbkf/U/P+4fG0OROA++fHDiFM4RrRHH6plsGY3W6L26mSsCM2LtlHJINFZtVILkI26MDEIKWEsfBatDW+XNAvkfYEahy16P5CBtTVNKEGsTcPD+VDistHseFNKiVlSLDCvJ0vMwOykHhq+rdJmjJ8tkUWC2bNqTIH26bU0UbhMAtJstWqaTUGnB0WVutKmkZbnylLMICAvnFoZLoMPmbvx8efgLYY2vD1pRd8Uwnq9MFV1EPbkJoinTf1XSo8VUo7WCjL79aYSIvHmXG+5qKB9ed2GWbBLolAoXkZ00E4WsVp9H philip@nyx"; in @@ -14,7 +16,6 @@ in ]; config = { - boot.loader.grub.device = "/dev/sda"; fileSystems = { "/" = { @@ -29,6 +30,7 @@ in environment.systemPackages = with pkgs; [ rtorrent # bittorrent client + mktorrent # torrent file creator pkgs.vuizvui.profpatsch.warpspeed # trivial http file server ]; @@ -51,6 +53,15 @@ in }; }; + systemd.services.warpspeed = + let user = config.users.users.rtorrent; + in { + description = "internally served public files (see nginx)"; + wantedBy = [ "default.target" ]; + environment = { PORT = toString warpspeedPort; }; + script = "${pkgs.vuizvui.profpatsch.warpspeed}/bin/warpspeed ${user.home}/public"; + serviceConfig.User = config.users.users.rtorrent.name; + }; services.nginx = { enable = true; @@ -58,13 +69,23 @@ in forceSSL = true; enableACME = true; locations."/pub/" = { - proxyPass = "http://localhost:1338/"; + proxyPass = "http://localhost:${toString warpspeedPort}/"; }; locations."/".root = pkgs.writeTextDir "index.html" ''hello world''; serverAliases = [ "lojbanistan.de" ]; }; }; + services.mlmmj = { + enable = true; + listDomain = "cz.profpatsch.de"; + mailLists = [ "worship" ]; + }; + services.postfix = { + # mostly configured by mlmmj + hostname = "cz.profpatsch.de"; + postmasterAlias = "mail@profpatsch.de"; + }; networking = { hostName = "haku"; |