35 lines
912 B
Nix
35 lines
912 B
Nix
{
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.03";
|
|
|
|
outputs = { self, nixpkgs }: {
|
|
|
|
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules =
|
|
[ ({ pkgs, ... }: {
|
|
boot.isContainer = true;
|
|
|
|
# Let 'nixos-version --json' know about the Git revision
|
|
# of this flake.
|
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
# Network configuration.
|
|
networking.useDHCP = false;
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
services.mediawiki = {
|
|
enable = true;
|
|
virtualHost = {
|
|
hostName = "flake-test";
|
|
adminAddr = "root@example.com";
|
|
};
|
|
passwordFile = pkgs.writeText "password" "topSecret";
|
|
};
|
|
|
|
})
|
|
];
|
|
};
|
|
|
|
};
|
|
}
|