diff --git a/services/wink.nix b/services/wink.nix index 9d7e3b1..5de52a7 100644 --- a/services/wink.nix +++ b/services/wink.nix @@ -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"; - - }