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
|
|
|
|
2016-06-19 07:15:34 +00:00
|
|
|
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
|
|
|
|
'';
|
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
|