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 {
|
2016-04-24 14:44:51 +00:00
|
|
|
wantedBy = [ "gogs.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
|
|
|
|
chown git:git -R /srv/git.gebner.org
|
|
|
|
'';
|
|
|
|
};
|
2016-05-31 09:22:48 +00:00
|
|
|
|
2019-10-03 17:19:07 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
elinks
|
|
|
|
carddav-util
|
|
|
|
fcgi
|
|
|
|
(haskell.lib.justStaticExecutables (haskellPackages.callPackage ../pkgs/wstunnel.nix {}))
|
|
|
|
];
|
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
|