nixbld: NixOS 23.05 compatibility
This commit is contained in:
parent
7177c0c66a
commit
6b35c751d8
|
@ -326,15 +326,16 @@ in
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.openssh.passwordAuthentication = false;
|
services.openssh.settings.PasswordAuthentication = false;
|
||||||
services.openssh.gatewayPorts = "clientspecified";
|
services.openssh.settings.GatewayPorts = "clientspecified";
|
||||||
programs.mosh.enable = true;
|
programs.mosh.enable = true;
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.avahi.enable = true;
|
services.avahi.enable = true;
|
||||||
services.avahi.interfaces = [ netifLan ];
|
services.avahi.allowInterfaces = [ netifLan ];
|
||||||
services.avahi.publish.enable = true;
|
services.avahi.publish.enable = true;
|
||||||
services.avahi.publish.userServices = true;
|
services.avahi.publish.userServices = true;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
@ -549,11 +550,14 @@ in
|
||||||
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
httpPort = 3001;
|
|
||||||
rootUrl = "https://git.m-labs.hk/";
|
|
||||||
appName = "M-Labs Git";
|
appName = "M-Labs Git";
|
||||||
mailerPasswordFile = "/etc/nixos/secret/mailerpassword";
|
mailerPasswordFile = "/etc/nixos/secret/mailerpassword";
|
||||||
settings = {
|
settings = {
|
||||||
|
server = {
|
||||||
|
ROOT_URL = "https://git.m-labs.hk/";
|
||||||
|
HTTP_PORT = 3001;
|
||||||
|
};
|
||||||
|
|
||||||
indexer = {
|
indexer = {
|
||||||
REPO_INDEXER_ENABLED = true;
|
REPO_INDEXER_ENABLED = true;
|
||||||
};
|
};
|
||||||
|
@ -941,7 +945,7 @@ in
|
||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud25;
|
package = pkgs.nextcloud26;
|
||||||
hostName = "files.m-labs.hk";
|
hostName = "files.m-labs.hk";
|
||||||
https = true;
|
https = true;
|
||||||
enableBrokenCiphersForSSE = false;
|
enableBrokenCiphersForSSE = false;
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
|
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
|
||||||
index 4c91fa4fb..e2139d6c6 100644
|
index 61ee5d7aa..f38684973 100644
|
||||||
--- a/src/libstore/build/local-derivation-goal.cc
|
--- a/src/libstore/build/local-derivation-goal.cc
|
||||||
+++ b/src/libstore/build/local-derivation-goal.cc
|
+++ b/src/libstore/build/local-derivation-goal.cc
|
||||||
@@ -378,6 +378,8 @@ void LocalDerivationGoal::startBuilder()
|
@@ -176,6 +176,8 @@ void LocalDerivationGoal::tryLocalBuild() {
|
||||||
additionalSandboxProfile = parsedDrv->getStringAttr("__sandboxProfile").value_or("");
|
return;
|
||||||
#endif
|
}
|
||||||
|
|
||||||
+ networked = parsedDrv->getBoolAttr("__networked");
|
+ networked = parsedDrv->getBoolAttr("__networked");
|
||||||
+
|
+
|
||||||
/* Are we doing a chroot build? */
|
/* Are we doing a chroot build? */
|
||||||
{
|
{
|
||||||
auto noChroot = parsedDrv->getBoolAttr("__noChroot");
|
auto noChroot = parsedDrv->getBoolAttr("__noChroot");
|
||||||
@@ -395,7 +397,7 @@ void LocalDerivationGoal::startBuilder()
|
@@ -193,7 +195,7 @@ void LocalDerivationGoal::tryLocalBuild() {
|
||||||
else if (settings.sandboxMode == smDisabled)
|
else if (settings.sandboxMode == smDisabled)
|
||||||
useChroot = false;
|
useChroot = false;
|
||||||
else if (settings.sandboxMode == smRelaxed)
|
else if (settings.sandboxMode == smRelaxed)
|
||||||
|
@ -20,7 +20,7 @@ index 4c91fa4fb..e2139d6c6 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
auto & localStore = getLocalStore();
|
auto & localStore = getLocalStore();
|
||||||
@@ -608,7 +610,7 @@ void LocalDerivationGoal::startBuilder()
|
@@ -677,7 +679,7 @@ void LocalDerivationGoal::startBuilder()
|
||||||
"nogroup:x:65534:\n", sandboxGid()));
|
"nogroup:x:65534:\n", sandboxGid()));
|
||||||
|
|
||||||
/* Create /etc/hosts with localhost entry. */
|
/* Create /etc/hosts with localhost entry. */
|
||||||
|
@ -29,7 +29,7 @@ index 4c91fa4fb..e2139d6c6 100644
|
||||||
writeFile(chrootRootDir + "/etc/hosts", "127.0.0.1 localhost\n::1 localhost\n");
|
writeFile(chrootRootDir + "/etc/hosts", "127.0.0.1 localhost\n::1 localhost\n");
|
||||||
|
|
||||||
/* Make the closure of the inputs available in the chroot,
|
/* Make the closure of the inputs available in the chroot,
|
||||||
@@ -799,7 +801,7 @@ void LocalDerivationGoal::startBuilder()
|
@@ -884,7 +886,7 @@ void LocalDerivationGoal::startBuilder()
|
||||||
us.
|
us.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ index 4c91fa4fb..e2139d6c6 100644
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
|
|
||||||
userNamespaceSync.create();
|
userNamespaceSync.create();
|
||||||
@@ -1063,7 +1065,7 @@ void LocalDerivationGoal::initEnv()
|
@@ -1179,7 +1181,7 @@ void LocalDerivationGoal::initEnv()
|
||||||
to the builder is generally impure, but the output of
|
to the builder is generally impure, but the output of
|
||||||
fixed-output derivations is by definition pure (since we
|
fixed-output derivations is by definition pure (since we
|
||||||
already know the cryptographic hash of the output). */
|
already know the cryptographic hash of the output). */
|
||||||
|
@ -47,7 +47,7 @@ index 4c91fa4fb..e2139d6c6 100644
|
||||||
for (auto & i : parsedDrv->getStringsAttr("impureEnvVars").value_or(Strings()))
|
for (auto & i : parsedDrv->getStringsAttr("impureEnvVars").value_or(Strings()))
|
||||||
env[i] = getEnv(i).value_or("");
|
env[i] = getEnv(i).value_or("");
|
||||||
}
|
}
|
||||||
@@ -1677,7 +1679,7 @@ void LocalDerivationGoal::runChild()
|
@@ -1811,7 +1813,7 @@ void LocalDerivationGoal::runChild()
|
||||||
/* Fixed-output derivations typically need to access the
|
/* Fixed-output derivations typically need to access the
|
||||||
network, so give them access to /etc/resolv.conf and so
|
network, so give them access to /etc/resolv.conf and so
|
||||||
on. */
|
on. */
|
||||||
|
@ -56,20 +56,20 @@ index 4c91fa4fb..e2139d6c6 100644
|
||||||
// Only use nss functions to resolve hosts and
|
// Only use nss functions to resolve hosts and
|
||||||
// services. Don’t use it for anything else that may
|
// services. Don’t use it for anything else that may
|
||||||
// be configured for this system. This limits the
|
// be configured for this system. This limits the
|
||||||
@@ -1921,7 +1923,7 @@ void LocalDerivationGoal::runChild()
|
@@ -2059,7 +2061,7 @@ void LocalDerivationGoal::runChild()
|
||||||
|
#include "sandbox-defaults.sb"
|
||||||
sandboxProfile += "(import \"sandbox-defaults.sb\")\n";
|
;
|
||||||
|
|
||||||
- if (!derivationType.isSandboxed())
|
- if (!derivationType.isSandboxed())
|
||||||
+ if (networked || !derivationType.isSandboxed())
|
+ if (networked || !derivationType.isSandboxed())
|
||||||
sandboxProfile += "(import \"sandbox-network.sb\")\n";
|
sandboxProfile +=
|
||||||
|
#include "sandbox-network.sb"
|
||||||
/* Add the output paths we'll use at build-time to the chroot */
|
;
|
||||||
diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh
|
diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh
|
||||||
index d456e9cae..0b43a6bd4 100644
|
index 34c4e9187..c4c26fd6f 100644
|
||||||
--- a/src/libstore/build/local-derivation-goal.hh
|
--- a/src/libstore/build/local-derivation-goal.hh
|
||||||
+++ b/src/libstore/build/local-derivation-goal.hh
|
+++ b/src/libstore/build/local-derivation-goal.hh
|
||||||
@@ -41,6 +41,8 @@ struct LocalDerivationGoal : public DerivationGoal
|
@@ -44,6 +44,8 @@ struct LocalDerivationGoal : public DerivationGoal
|
||||||
|
|
||||||
Path chrootRootDir;
|
Path chrootRootDir;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue