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";
|
hostAddress = "192.168.100.10";
|
||||||
localAddress = "192.168.100.11";
|
localAddress = "192.168.100.11";
|
||||||
|
|
||||||
|
# pkgs in the container config is distinct from pkgs outside, so
|
||||||
config = {pkgs, config, ...}: {
|
# 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 ];
|
networking.firewall.allowedTCPPorts = [ 8000 ];
|
||||||
environment.systemPackages = [ pkgs.wink pkgs.v8 ];
|
environment.systemPackages = [ wink pkgs.v8 ];
|
||||||
|
|
||||||
systemd.services.wink = {
|
systemd.services.wink = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -21,11 +23,11 @@
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.type = "simple";
|
serviceConfig.type = "simple";
|
||||||
environment.HOME = "/var/lib/wink/home";
|
environment.HOME = "/var/lib/wink/home";
|
||||||
path = [ pkgs.wink pkgs.v8 ];
|
path = [ wink pkgs.v8 ];
|
||||||
script = ''
|
script = ''
|
||||||
mkdir -p /var/lib/wink/home
|
mkdir -p /var/lib/wink/home
|
||||||
cd /var/lib/wink
|
cd /var/lib/wink
|
||||||
cp -r ${pkgs.wink.outPath}/* .
|
cp -r ${wink.outPath}/* .
|
||||||
if [ ! -f database.exists ]
|
if [ ! -f database.exists ]
|
||||||
then
|
then
|
||||||
rails-wrapped db:migrate db:seed RAILS_ENV=development
|
rails-wrapped db:migrate db:seed RAILS_ENV=development
|
||||||
|
@ -83,9 +85,4 @@
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nat.enable = true;
|
|
||||||
networking.nat.internalInterfaces = ["ve-wink"];
|
|
||||||
networking.nat.externalInterface = "enp6s0";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue