wink: update to nixos 21.05, parsons
This commit is contained in:
parent
e6edb7b8d8
commit
5df6d0e30d
1 changed files with 7 additions and 10 deletions
|
@ -10,10 +10,12 @@
|
|||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.11";
|
||||
|
||||
|
||||
config = {pkgs, config, ...}: {
|
||||
# pkgs in the container config is distinct from pkgs outside, so
|
||||
# we have to keep track of wink manually since it's not in default
|
||||
# nixpkgs
|
||||
config = let wink = pkgs.wink; in {pkgs, config, ...}: {
|
||||
networking.firewall.allowedTCPPorts = [ 8000 ];
|
||||
environment.systemPackages = [ pkgs.wink pkgs.v8 ];
|
||||
environment.systemPackages = [ wink pkgs.v8 ];
|
||||
|
||||
systemd.services.wink = {
|
||||
enable = true;
|
||||
|
@ -21,11 +23,11 @@
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.type = "simple";
|
||||
environment.HOME = "/var/lib/wink/home";
|
||||
path = [ pkgs.wink pkgs.v8 ];
|
||||
path = [ wink pkgs.v8 ];
|
||||
script = ''
|
||||
mkdir -p /var/lib/wink/home
|
||||
cd /var/lib/wink
|
||||
cp -r ${pkgs.wink.outPath}/* .
|
||||
cp -r ${wink.outPath}/* .
|
||||
if [ ! -f database.exists ]
|
||||
then
|
||||
rails-wrapped db:migrate db:seed RAILS_ENV=development
|
||||
|
@ -83,9 +85,4 @@
|
|||
enableACME = true;
|
||||
};
|
||||
|
||||
networking.nat.enable = true;
|
||||
networking.nat.internalInterfaces = ["ve-wink"];
|
||||
networking.nat.externalInterface = "enp6s0";
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue