42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
let
|
|
|
|
configuration = { config, pkgs, ... }: {
|
|
imports = [ ./configuration.nix ];
|
|
|
|
users.extraUsers.gebner.password = "password";
|
|
users.users.root.password = "";
|
|
|
|
boot.enableContainers = true;
|
|
|
|
systemd.services.setupVM = rec {
|
|
wantedBy = [ "gogs.service" "dovecot2.service" "nginx.service" ];
|
|
before = wantedBy;
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
RemainAfterExit = "yes";
|
|
};
|
|
script = ''
|
|
mkdir -p /srv/git.gebner.org
|
|
chown git:git -R /srv/git.gebner.org
|
|
'';
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [ elinks carddav-util fcgi ];
|
|
|
|
networking.extraHosts = ''
|
|
127.0.0.1 gebner.org www.gebner.org reader.gebner.org git.gebner.org mail.gebner.org radicale.gebner.org
|
|
|
|
# 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
|
|
'';
|
|
};
|
|
|
|
nixos = import <nixpkgs/nixos> { configuration = configuration; };
|
|
|
|
in nixos.vm
|