mediawiki-nix-container/flake.nix

35 lines
912 B
Nix
Raw Normal View History

2021-08-12 03:02:26 +02:00
{
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 ];
2021-09-05 00:48:25 +02:00
services.mediawiki = {
2021-08-12 03:02:26 +02:00
enable = true;
2021-09-05 00:48:25 +02:00
virtualHost = {
hostName = "flake-test";
adminAddr = "root@example.com";
};
passwordFile = pkgs.writeText "password" "topSecret";
2021-08-12 03:02:26 +02:00
};
2021-09-05 00:48:25 +02:00
2021-08-12 03:02:26 +02:00
})
];
};
};
}