npins update
This commit is contained in:
parent
f14bb9f436
commit
f5115525c2
7 changed files with 21 additions and 68 deletions
|
@ -33,10 +33,8 @@ in
|
|||
];
|
||||
routes = [
|
||||
{
|
||||
routeConfig = {
|
||||
Destination = "10.42.0.2/32";
|
||||
Gateway = "192.168.122.1";
|
||||
};
|
||||
Destination = "10.42.0.2/32";
|
||||
Gateway = "192.168.122.1";
|
||||
}
|
||||
];
|
||||
dns = [ "192.168.122.1" ];
|
||||
|
@ -46,7 +44,7 @@ in
|
|||
address = [ "10.42.2.1/16" ];
|
||||
routes = [
|
||||
{
|
||||
routeConfig.Gateway = "10.42.0.2";
|
||||
Gateway = "10.42.0.2";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
systemd.network.enable = lib.mkForce false;
|
||||
networking = {
|
||||
useNetworkd = lib.mkForce false;
|
||||
interfaces."enp1s0" = {
|
||||
|
@ -87,7 +88,9 @@
|
|||
};
|
||||
services.wordpress = {
|
||||
webserver = "nginx";
|
||||
sites."orchid.katvayor.net" = { };
|
||||
sites."orchid.katvayor.net" = {
|
||||
themes = { inherit (pkgs.wordpressPackages.themes) twentytwentythree; };
|
||||
};
|
||||
};
|
||||
fileSystems."/home/orchid/content/www" = {
|
||||
device = "/srv/orchid";
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
systemd.network.enable = lib.mkForce false;
|
||||
networking = {
|
||||
useNetworkd = lib.mkForce false;
|
||||
interfaces."enp1s0" = {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
systemd.network.enable = lib.mkForce false;
|
||||
networking = {
|
||||
useNetworkd = lib.mkForce false;
|
||||
interfaces."enp1s0" = {
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"release_prefix": null,
|
||||
"version": "v1.7.0",
|
||||
"revision": "e55f9a8678adc02024a4877c2a403e3f6daf24fe",
|
||||
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.7.0",
|
||||
"hash": "16zjxysjhk3sgd8b4x5mvx9ilnq35z3zfpkv1la33sqkr8xh1amn"
|
||||
"version": "v1.8.2",
|
||||
"revision": "0a97c6683ecb8d92ab0ce4c3c39e896e4a3fe388",
|
||||
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.8.2",
|
||||
"hash": "1xivgibk1fa07z4xqxpyha6yyb0pmahf52caf1kgh8zxr231ai1v"
|
||||
},
|
||||
"home-manager": {
|
||||
"type": "Git",
|
||||
|
@ -23,9 +23,9 @@
|
|||
"repo": "home-manager"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff",
|
||||
"url": "https://github.com/nix-community/home-manager/archive/a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff.tar.gz",
|
||||
"hash": "1cxp9rgczr4rhhx1klwcr7a61khizq8hv63gvmy9gfsx7fp4h60a"
|
||||
"revision": "fe56302339bb28e3471632379d733547caec8103",
|
||||
"url": "https://github.com/nix-community/home-manager/archive/fe56302339bb28e3471632379d733547caec8103.tar.gz",
|
||||
"hash": "12j7h79lb17pysqqq4ixi92y3h07nvv9ymhmysr6hqiwwpaadn8f"
|
||||
},
|
||||
"nix-patches": {
|
||||
"type": "GitRelease",
|
||||
|
@ -49,9 +49,9 @@
|
|||
"repo": "nixos-images"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "770a010bb738cd1bfdda39ec78941624f4bd986b",
|
||||
"url": "https://github.com/nix-community/nixos-images/archive/770a010bb738cd1bfdda39ec78941624f4bd986b.tar.gz",
|
||||
"hash": "02klkvp2vi10klcap9pd18lvcpi4lwzrw0hqwz3v0125aggn1vv1"
|
||||
"revision": "3103f26e0631a543963c03c583f03fd42fd9d51a",
|
||||
"url": "https://github.com/nix-community/nixos-images/archive/3103f26e0631a543963c03c583f03fd42fd9d51a.tar.gz",
|
||||
"hash": "0as4f6px5dn465v2ndcw42w0hb8rnz4an9ijwlskdsmcdycf0qil"
|
||||
},
|
||||
"nixos-mailserver": {
|
||||
"type": "GitRelease",
|
||||
|
@ -71,8 +71,8 @@
|
|||
"nixpkgs": {
|
||||
"type": "Channel",
|
||||
"name": "nixpkgs-unstable",
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre681909.039b72d0c738/nixexprs.tar.xz",
|
||||
"hash": "0c3q85wfgp0v7hhbv7yv7g9xhijrfi6167lkdli6wqkp66v7fw7r"
|
||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre694416.ccc0c2126893/nixexprs.tar.xz",
|
||||
"hash": "0cn1z4wzps8nfqxzr6l5mbn81adcqy2cy2ic70z13fhzicmxfsbx"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
|
|
|
@ -4,15 +4,6 @@ rec {
|
|||
_type = "static";
|
||||
path = ./nginx-fallback.patch;
|
||||
}
|
||||
{
|
||||
_type = "static";
|
||||
path = ./wordpress.patch;
|
||||
}
|
||||
{
|
||||
_type = "commit";
|
||||
sha = "94c62f5036e7744247309cf5a11847e1168ac289";
|
||||
hash = "sha256-KcL2mHLea+xmRBE+clDzeAOo66hq5wr9EcN3ox/MnFg=";
|
||||
}
|
||||
];
|
||||
betamail = unstable ++ [
|
||||
{
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
From 17adba609667be944255ca358fa97964589894ae Mon Sep 17 00:00:00 2001
|
||||
From: catvayor <catvayor@katvayor.net>
|
||||
Date: Thu, 19 Sep 2024 16:55:46 +0200
|
||||
Subject: [PATCH] =?UTF-8?q?wordpress:=20don=E2=80=99t=20use=20lib.escapeSh?=
|
||||
=?UTF-8?q?ellArg?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
nixos/modules/services/web-apps/wordpress.nix | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/nixos/modules/services/web-apps/wordpress.nix b/nixos/modules/services/web-apps/wordpress.nix
|
||||
index ea771c358814..700bee191b9d 100644
|
||||
--- a/nixos/modules/services/web-apps/wordpress.nix
|
||||
+++ b/nixos/modules/services/web-apps/wordpress.nix
|
||||
@@ -73,15 +73,17 @@ let
|
||||
checkPhase = "${pkgs.php}/bin/php --syntax-check $target";
|
||||
};
|
||||
|
||||
+ toPhpString = s: "'${escape [ "'" "\\" ] s}'";
|
||||
+
|
||||
mkPhpValue = v: let
|
||||
isHasAttr = s: isAttrs v && hasAttr s v;
|
||||
in
|
||||
- if isString v then escapeShellArg v
|
||||
+ if isString v then toPhpString v
|
||||
# NOTE: If any value contains a , (comma) this will not get escaped
|
||||
- else if isList v && any lib.strings.isCoercibleToString v then escapeShellArg (concatMapStringsSep "," toString v)
|
||||
+ else if isList v && any lib.strings.isCoercibleToString v then toPhpString (concatMapStringsSep "," toString v)
|
||||
else if isInt v then toString v
|
||||
else if isBool v then boolToString v
|
||||
- else if isHasAttr "_file" then "trim(file_get_contents(${lib.escapeShellArg v._file}))"
|
||||
+ else if isHasAttr "_file" then "trim(file_get_contents(${lib.toPhpString v._file}))"
|
||||
else if isHasAttr "_raw" then v._raw
|
||||
else abort "The Wordpress config value ${lib.generators.toPretty {} v} can not be encoded."
|
||||
;
|
||||
--
|
||||
2.46.0
|
||||
|
Loading…
Reference in a new issue