2015-09-14 17:38:59 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
configuration = { config, pkgs, ... }: {
|
|
|
|
imports = [ ./configuration.nix ];
|
|
|
|
|
2016-06-18 07:18:36 +00:00
|
|
|
users.extraUsers.gebner.password = "password";
|
2015-09-14 17:38:59 +00:00
|
|
|
users.users.root.password = "";
|
2015-10-18 12:25:54 +00:00
|
|
|
|
|
|
|
boot.enableContainers = true;
|
|
|
|
|
|
|
|
systemd.services.setupVM = rec {
|
2021-06-27 12:40:28 +00:00
|
|
|
wantedBy = [ "gitea.service" "dovecot2.service" "nginx.service" ];
|
2015-10-18 12:25:54 +00:00
|
|
|
before = wantedBy;
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
RemainAfterExit = "yes";
|
|
|
|
};
|
|
|
|
script = ''
|
|
|
|
mkdir -p /srv/git.gebner.org
|
2021-06-27 12:40:28 +00:00
|
|
|
chown gitea:gitea -R /srv/git.gebner.org
|
2015-10-18 12:25:54 +00:00
|
|
|
'';
|
|
|
|
};
|
2016-05-31 09:22:48 +00:00
|
|
|
|
2019-10-03 17:19:07 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
elinks
|
|
|
|
carddav-util
|
|
|
|
fcgi
|
2021-04-03 10:19:23 +00:00
|
|
|
wstunnel
|
2021-04-07 20:03:24 +00:00
|
|
|
sqlite-interactive
|
2019-10-03 17:19:07 +00:00
|
|
|
];
|
2016-06-19 07:15:34 +00:00
|
|
|
|
2021-06-27 12:40:28 +00:00
|
|
|
security.acme.server = "http://localhost";
|
2020-06-13 11:08:34 +00:00
|
|
|
|
2016-06-19 07:15:34 +00:00
|
|
|
networking.extraHosts = ''
|
2019-08-25 16:04:33 +00:00
|
|
|
127.0.0.1 gebner.org www.gebner.org reader.gebner.org git.gebner.org mail.gebner.org radicale.gebner.org gabrielebner.at
|
2016-06-19 09:47:35 +00:00
|
|
|
|
|
|
|
# disable letsencrypt
|
|
|
|
127.0.0.111 acme-v01.api.letsencrypt.org
|
|
|
|
'';
|
|
|
|
|
|
|
|
networking.firewall.extraCommands = ''
|
|
|
|
# disable HE dns notification
|
|
|
|
iptables -A OUTPUT -d 216.218.130.2 -j REJECT
|
2016-06-19 07:15:34 +00:00
|
|
|
'';
|
2015-09-14 17:38:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nixos = import <nixpkgs/nixos> { configuration = configuration; };
|
|
|
|
|
2015-10-18 12:25:54 +00:00
|
|
|
in nixos.vm
|