nixos: adjust to 20.09 changes
Most notably the php5 expression needed to be reworked.
This commit is contained in:
parent
89c9f9e606
commit
405ca2ade4
4 changed files with 47 additions and 24 deletions
|
@ -2,7 +2,7 @@
|
||||||
, localAddress
|
, localAddress
|
||||||
, httpsPort ? 443
|
, httpsPort ? 443
|
||||||
}: {
|
}: {
|
||||||
config = { config, pkgs, ... }: {
|
config = { config, pkgs, lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../profiles/containers/configuration.nix
|
../profiles/containers/configuration.nix
|
||||||
];
|
];
|
||||||
|
@ -30,23 +30,16 @@
|
||||||
locations."~ ^(.+\.php)(.*)$".extraConfig = ''
|
locations."~ ^(.+\.php)(.*)$".extraConfig = ''
|
||||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||||
|
|
||||||
fastcgi_pass 127.0.0.1:9000;
|
fastcgi_pass unix:${config.services.phpfpm.pools.mypool.socket};
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.php = {
|
|
||||||
imap = false;
|
|
||||||
openssl = false;
|
|
||||||
curl = false;
|
|
||||||
ldap = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.phpfpm.pools.mypool = {
|
services.phpfpm.pools.mypool = {
|
||||||
phpPackage = pkgs.php56;
|
|
||||||
listen = "127.0.0.1:9000";
|
|
||||||
user = "nobody";
|
user = "nobody";
|
||||||
|
phpPackage = pkgs.php5;
|
||||||
settings = {
|
settings = {
|
||||||
|
"listen.owner" = config.services.nginx.user;
|
||||||
"pm" = "dynamic";
|
"pm" = "dynamic";
|
||||||
"pm.max_children" = 5;
|
"pm.max_children" = 5;
|
||||||
"pm.start_servers" = 2;
|
"pm.start_servers" = 2;
|
||||||
|
@ -58,6 +51,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# the custom php5 we're using here has no fpm-systemd, so the default `Type = "notify"` won't work
|
||||||
|
systemd.services."phpfpm-mypool" = {
|
||||||
|
serviceConfig = {
|
||||||
|
Type = lib.mkForce "simple";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.mysql = {
|
services.mysql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mariadb;
|
package = pkgs.mariadb;
|
||||||
|
|
|
@ -88,6 +88,10 @@ in {
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
authorizedKeys = keys.users.steveej.openssh;
|
authorizedKeys = keys.users.steveej.openssh;
|
||||||
|
hostKeys = [
|
||||||
|
"/etc/secrets/initrd/ssh_host_rsa_key"
|
||||||
|
"/etc/secrets/initrd/ssh_host_ed25519_key"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ in {
|
||||||
options.services.ddclientovh = with lib; {
|
options.services.ddclientovh = with lib; {
|
||||||
enable = mkEnableOption "Enable ddclient-ovh";
|
enable = mkEnableOption "Enable ddclient-ovh";
|
||||||
domain = mkOption {
|
domain = mkOption {
|
||||||
type = types.string;
|
type = types.str;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
let
|
let
|
||||||
# one application requires php5
|
|
||||||
nixpkgsWithPhp5 = pkgs.fetchFromGitHub {
|
|
||||||
owner = "nixos";
|
|
||||||
repo = "nixpkgs-channels";
|
|
||||||
rev = "846d8f8305192dcc3a63139102698b4ac6b9ef9f";
|
|
||||||
sha256 = "1qifgc1q2i4g0ivpfjnxp4jl2cc82gfjws08dsllgw7q7kw4b4rb";
|
|
||||||
};
|
|
||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
nixpkgs-master = import <nixpkgs-master> {};
|
nixpkgs-master = import <nixpkgs-master> {};
|
||||||
|
@ -31,7 +24,7 @@ in rec {
|
||||||
extraMeta.branch = "5.4";
|
extraMeta.branch = "5.4";
|
||||||
} // (args.argsOverride or {}));
|
} // (args.argsOverride or {}));
|
||||||
linux_sgx = pkgs.callPackage linux_sgx_pkg {};
|
linux_sgx = pkgs.callPackage linux_sgx_pkg {};
|
||||||
in
|
in
|
||||||
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_sgx);
|
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_sgx);
|
||||||
linuxPackages_sgx_latest = linuxPackages_sgx_540rc3;
|
linuxPackages_sgx_latest = linuxPackages_sgx_540rc3;
|
||||||
|
|
||||||
|
@ -47,11 +40,32 @@ in rec {
|
||||||
enableStatic = true;
|
enableStatic = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
php56 = (pkgs.callPackages
|
php5 = let
|
||||||
"${nixpkgsWithPhp5}/pkgs/development/interpreters/php/default.nix" {
|
nixpkgsWithPhp5 = pkgs.fetchFromGitHub {
|
||||||
|
owner = "nixos";
|
||||||
|
repo = "nixpkgs-channels";
|
||||||
|
rev = "pkgs";
|
||||||
|
sha256 = "1qifgc1q2i4g0ivpfjnxp4jl2cc82gfjws08dsllgw7q7kw4b4rb";
|
||||||
|
};
|
||||||
|
php5 = (pkgs.callPackage "${nixpkgsWithPhp5}/pkgs/development/interpreters/php/default.nix" {
|
||||||
|
config = (pkgs.lib.attrsets.recursiveUpdate
|
||||||
|
pkgs.config
|
||||||
|
{
|
||||||
|
php = {
|
||||||
|
imap = false;
|
||||||
|
openssl = false;
|
||||||
|
curl = false;
|
||||||
|
ldap = false;
|
||||||
|
mcrypt = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
stdenv = pkgs.llvmPackages_6.stdenv; #broken
|
||||||
icu = pkgs.icu60;
|
icu = pkgs.icu60;
|
||||||
})
|
}).php56;
|
||||||
.php56.overrideAttrs(drv: rec {
|
in
|
||||||
|
php5
|
||||||
|
.overrideAttrs(attrs: rec {
|
||||||
# See https://secure.php.net/ChangeLog-5.php
|
# See https://secure.php.net/ChangeLog-5.php
|
||||||
version = "5.6.40";
|
version = "5.6.40";
|
||||||
name = "php-${version}";
|
name = "php-${version}";
|
||||||
|
@ -61,6 +75,11 @@ in rec {
|
||||||
url = "http://www.php.net/distributions/php-${version}.tar.bz2";
|
url = "http://www.php.net/distributions/php-${version}.tar.bz2";
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configureFlags = attrs.configureFlags ++ [
|
||||||
|
"--without-fpm-systemd"
|
||||||
|
];
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
duplicacy = pkgs.callPackage ../pkgs/duplicacy {};
|
duplicacy = pkgs.callPackage ../pkgs/duplicacy {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue