nixos-config/mastus/vmtest.nix

30 lines
691 B
Nix

let
configuration = { config, pkgs, ... }: {
imports = [ ./configuration.nix ];
users.extraUsers.gebner.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 ];
};
nixos = import <nixpkgs/nixos> { configuration = configuration; };
in nixos.vm