mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-16 09:49:45 +01:00
containers: add wordpress
This is the start of my fun attempt at using NixOS containers for web services as a Docker replacement. After spending some time on other servers I realized that I don't actually *need* my dotfiles on those servers, so it becomes significantly faster to build these containers without worrying about home-manager and command-line programs I use on the host. Main advantages include web service configuration with Nix instead of Docker. Disadvantages include increased complexity for anything that isn't already maintained by others in nixpkgs.
This commit is contained in:
parent
0238abd1e5
commit
043e901711
33
containers/wordpress.nix
Normal file
33
containers/wordpress.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
nix-config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = with nix-config.nixosModules; [
|
||||
system
|
||||
];
|
||||
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
neovim.enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ kitty ];
|
||||
shells = with pkgs; [ fish ];
|
||||
|
||||
variables = {
|
||||
TERM = "xterm-kitty";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
|
||||
services.wordpress.sites.localhost = { };
|
||||
}
|
@ -64,5 +64,20 @@ in
|
||||
localAddress = "192.168.100.49";
|
||||
config = ../containers/wine.nix;
|
||||
};
|
||||
|
||||
wordpress = {
|
||||
privateNetwork = true;
|
||||
ephemeral = true;
|
||||
autoStart = true;
|
||||
|
||||
hostAddress = "192.168.100.24";
|
||||
localAddress = "192.168.100.39";
|
||||
|
||||
specialArgs = {
|
||||
inherit nix-config;
|
||||
};
|
||||
|
||||
config = ../containers/wordpress.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user