restructure packages; change akkoma domain
This commit is contained in:
parent
ac5d7923fa
commit
73b1b3b47d
12
flake.lock
12
flake.lock
|
@ -260,16 +260,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1696375444,
|
||||
"narHash": "sha256-Sv0ICt/pXfpnFhTGYTsX6lUr1SljnuXWejYTI2ZqHa4=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1697804921,
|
||||
"narHash": "sha256-PAoThb0U52HGscrU/Qp1GKwidqM6xnWxgovJCXNpjCc=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "81e8f48ebdecf07aab321182011b067aafc78896",
|
||||
"rev": "77ba48251d2b629d347e566c888000a379711ce0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"owner": "chayleaf",
|
||||
"ref": "akkoma",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
inputs = {
|
||||
#nixpkgs.url = "github:nixos/nixpkgs/3dc2b4f8166f744c3b3e9ff8224e7c5d74a5424f";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:chayleaf/nixpkgs/akkoma";
|
||||
nixpkgs2.url = "github:nixos/nixpkgs/master";
|
||||
# nixpkgs.url = "github:chayleaf/nixpkgs/ccache2";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
mobile-nixos = {
|
||||
# url = "github:NixOS/mobile-nixos";
|
||||
|
|
1407
pkgs/Cargo.lock
generated
1407
pkgs/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,25 +0,0 @@
|
|||
# TODO: remove this file when searxng gets updated in nixpkgs
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "chompjs";
|
||||
version = "1.2.2";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-I5PbVinyjO1OF78t9h67lVBM/VsogYoMj3iFZS4WTn8=";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "chompjs" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Parsing JavaScript objects into Python dictionaries";
|
||||
homepage = "https://pypi.org/project/chompjs/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ chayleaf ];
|
||||
};
|
||||
}
|
|
@ -90,21 +90,17 @@ in
|
|||
'';
|
||||
};
|
||||
rofi-steam-game-list = callPackage ./rofi-steam-game-list { };
|
||||
scanservjs = callPackage ./scanservjs.nix { };
|
||||
scanservjs = callPackage ./scanservjs { };
|
||||
searxng = pkgs'.python3.pkgs.toPythonModule (pkgs.searxng.overrideAttrs (old: {
|
||||
inherit (sources.searxng) src;
|
||||
version = "unstable-" + sources.searxng.date;
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
(pkgs'.python3.pkgs.callPackage ./chompjs.nix { })
|
||||
];
|
||||
}));
|
||||
# system76-scheduler = callPackage ./system76-scheduler.nix { };
|
||||
techmino = callPackage ./techmino { };
|
||||
|
||||
firefox-addons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; });
|
||||
mpvScripts = pkgs.mpvScripts // callPackage ./mpv-scripts { };
|
||||
|
||||
qemu_7 = callPackage ./qemu_7.nix {
|
||||
qemu_7 = callPackage ./qemu/7.nix {
|
||||
stdenv = pkgs'.ccacheStdenv;
|
||||
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices Cocoa Hypervisor vmnet;
|
||||
inherit (pkgs.darwin.stubs) rez setfile;
|
||||
|
@ -118,7 +114,7 @@ in
|
|||
qemu_7_xen_4_15-light = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; xenSupport = true; xen = pkgs.xen_4_15-light; });
|
||||
qemu_7_test = lib.lowPrio (pkgs'.qemu_7.override { hostCpuOnly = true; nixosTestRunner = true; });
|
||||
# TODO: when https://gitlab.com/virtio-fs/virtiofsd/-/issues/96 is fixed remove this
|
||||
virtiofsd = callPackage ./qemu_virtiofsd.nix {
|
||||
virtiofsd = callPackage ./qemu/virtiofsd.nix {
|
||||
qemu = pkgs'.qemu_7;
|
||||
};
|
||||
|
||||
|
@ -130,5 +126,6 @@ in
|
|||
stdenv = pkgs'.ccacheStdenv;
|
||||
};
|
||||
}
|
||||
// import ./postgresql-packages { inherit pkgs pkgs' lib sources; }
|
||||
// import ./ccache.nix { inherit pkgs pkgs' lib sources; }
|
||||
// import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; }
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/kvmfr.c b/kvmfr.c
|
||||
index 121aae5b..2f4c9e1a 100644
|
||||
--- a/kvmfr.c
|
||||
+++ b/kvmfr.c
|
||||
@@ -539,7 +539,11 @@ static int __init kvmfr_module_init(void)
|
||||
if (kvmfr->major < 0)
|
||||
goto out_free;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
kvmfr->pClass = class_create(THIS_MODULE, KVMFR_DEV_NAME);
|
||||
+#else
|
||||
+ kvmfr->pClass = class_create(KVMFR_DEV_NAME);
|
||||
+#endif
|
||||
if (IS_ERR(kvmfr->pClass))
|
||||
goto out_unreg;
|
||||
|
29
pkgs/postgresql-packages/default.nix
Normal file
29
pkgs/postgresql-packages/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs
|
||||
, pkgs'
|
||||
, ... }:
|
||||
|
||||
let
|
||||
inherit (pkgs') callPackage;
|
||||
|
||||
extraPackages = {
|
||||
tsja = callPackage ./tsja.nix { };
|
||||
};
|
||||
gen' = postgresql: builtins.mapAttrs (k: v: v.override { inherit postgresql; }) extraPackages;
|
||||
gen = ver: pkgs."postgresql${toString ver}Packages" // gen' pkgs."postgresql_${toString ver}";
|
||||
in {
|
||||
mecab = pkgs.mecab.overrideAttrs (old: {
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/mecab/dic
|
||||
ln -s ${callPackage /${pkgs.path}/pkgs/tools/text/mecab/ipadic.nix {
|
||||
mecab-nodic = callPackage /${pkgs.path}/pkgs/tools/text/mecab/nodic.nix { };
|
||||
}} $out/lib/mecab/dic/ipadic
|
||||
'';
|
||||
});
|
||||
postgresqlPackages = gen "";
|
||||
postgresql11Packages = gen 11;
|
||||
postgresql12Packages = gen 12;
|
||||
postgresql13Packages = gen 13;
|
||||
postgresql14Packages = gen 14;
|
||||
postgresql15Packages = gen 15;
|
||||
postgresql16Packages = gen 16;
|
||||
}
|
39
pkgs/postgresql-packages/tsja.nix
Normal file
39
pkgs/postgresql-packages/tsja.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, postgresql
|
||||
, mecab
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tsja";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchTarball {
|
||||
url = "https://www.amris.jp/tsja/tsja-${version}.tar.xz";
|
||||
sha256 = "0hx4iygnqw1ay3nwrf3x2izflw4ip9i8i0yny26vivdz862m97w7";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local/pgsql ${postgresql} \
|
||||
--replace -L/usr/local/lib "" \
|
||||
--replace -I/usr/local/include ""
|
||||
substituteInPlace tsja.c --replace /usr/local/lib/mecab ${mecab}/lib/mecab
|
||||
'';
|
||||
|
||||
buildInputs = [ postgresql mecab ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/share/postgresql/extension
|
||||
cp libtsja.so $out/lib
|
||||
cp dbinit_libtsja.txt $out/share/postgresql/extension/libtsja_dbinit.sql
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "PostgreSQL extension implementing Japanese text search";
|
||||
homepage = "https://www.amris.jp/tsja/index.html";
|
||||
maintainers = with maintainers; [ chayleaf ];
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.postgresql;
|
||||
};
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, writeText
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, dbus
|
||||
, bcc
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "system76-scheduler";
|
||||
version = "unstable-2022-11-08";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pop-os";
|
||||
repo = "system76-scheduler";
|
||||
rev = "0fe4d8dfc4275fd856aee28ca942b9fa53229fc9";
|
||||
sha256 = "sha256-uFFJkuMxqcGj6OQShF0zh/FGwX4/ln1l6NwGonkUsNI=";
|
||||
};
|
||||
cargoPatches = [(writeText "ron-rev.diff" ''
|
||||
diff --git i/daemon/Cargo.toml w/daemon/Cargo.toml
|
||||
index 0397788..fbd6202 100644
|
||||
--- i/daemon/Cargo.toml
|
||||
+++ w/daemon/Cargo.toml
|
||||
@@ -33,7 +33,7 @@ clap = { version = "3.1.18", features = ["cargo"] }
|
||||
# Necessary for deserialization of untagged enums in assignments.
|
||||
[dependencies.ron]
|
||||
git = "https://github.com/MomoLangenstein/ron"
|
||||
-branch = "253-untagged-enums"
|
||||
+rev = "afb960bb8b0402a79260533aa3b9d87a8abae72b"
|
||||
|
||||
[dependencies.tracing-subscriber]
|
||||
version = "0.3.11"
|
||||
diff --git i/Cargo.lock w/Cargo.lock
|
||||
index a782756..fe56c1f 100644
|
||||
--- i/Cargo.lock
|
||||
+++ w/Cargo.lock
|
||||
@@ -788,7 +788,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ron"
|
||||
version = "0.8.0"
|
||||
-source = "git+https://github.com/MomoLangenstein/ron?branch=253-untagged-enums#afb960bb8b0402a79260533aa3b9d87a8abae72b"
|
||||
+source = "git+https://github.com/MomoLangenstein/ron?rev=afb960bb8b0402a79260533aa3b9d87a8abae72b#afb960bb8b0402a79260533aa3b9d87a8abae72b"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"bitflags",
|
||||
'')];
|
||||
cargoSha256 = "sha256-tY7o09Nu1/Lbn//5+iecUmV67Aw1QvVLdUaD8DDgKi0=";
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
cargoLock.outputHashes."ron-0.8.0" = "sha256-k+LuTEq97/DohcsulXoLXWqFLzPUzIR1D5pGru+M5Ew=";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ dbus ];
|
||||
EXECSNOOP_PATH = "${bcc}/bin/execsnoop";
|
||||
postInstall = ''
|
||||
install -D -m 0644 data/com.system76.Scheduler.conf $out/etc/dbus-1/system.d/com.system76.Scheduler.conf
|
||||
mkdir -p $out/etc/system76-scheduler
|
||||
install -D -m 0644 data/*.ron $out/etc/system76-scheduler/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "System76 Scheduler";
|
||||
homepage = "https://github.com/pop-os/system76-scheduler";
|
||||
license = lib.licenses.mpl20;
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
}
|
|
@ -82,6 +82,7 @@ in {
|
|||
|
||||
services.postgresql.enable = true;
|
||||
services.postgresql.package = pkgs.postgresql_13;
|
||||
services.postgresql.extraPlugins = with pkgs.postgresql13Packages; [ tsja ];
|
||||
|
||||
# SSH
|
||||
services.openssh.enable = true;
|
||||
|
@ -277,12 +278,27 @@ in {
|
|||
https = true;
|
||||
};
|
||||
|
||||
# AKKOMA
|
||||
# TODO: remove this in 2024
|
||||
services.nginx.virtualHosts."pleroma.${cfg.domainName}" = {
|
||||
quic = true;
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
serverAliases = [ "akkoma.${cfg.domainName}" ];
|
||||
locations."/".return = "301 https://fedi.${cfg.domainName}$request_uri";
|
||||
};
|
||||
|
||||
services.akkoma = {
|
||||
enable = true;
|
||||
dist.extraFlags = [
|
||||
"+sbwt" "none"
|
||||
"+sbwtdcpu" "none"
|
||||
"+sbwtdio" "none"
|
||||
];
|
||||
config.":pleroma"."Pleroma.Web.Endpoint" = {
|
||||
url = {
|
||||
scheme = "https";
|
||||
host = "pleroma.${cfg.domainName}";
|
||||
host = "fedi.${cfg.domainName}";
|
||||
port = 443;
|
||||
};
|
||||
secret_key_base._secret = "/secrets/akkoma/secret_key_base";
|
||||
|
@ -294,7 +310,7 @@ in {
|
|||
'';
|
||||
initDb = {
|
||||
enable = false;
|
||||
username = "pleroma";
|
||||
username = "akkoma";
|
||||
password._secret = "/secrets/akkoma/postgres_password";
|
||||
};
|
||||
config.":pleroma".":instance" = {
|
||||
|
@ -307,9 +323,9 @@ in {
|
|||
};
|
||||
config.":pleroma"."Pleroma.Repo" = {
|
||||
adapter = (pkgs.formats.elixirConf { }).lib.mkRaw "Ecto.Adapters.Postgres";
|
||||
username = "pleroma";
|
||||
username = "akkoma";
|
||||
password._secret = "/secrets/akkoma/postgres_password";
|
||||
database = "pleroma";
|
||||
database = "akkoma";
|
||||
hostname = "localhost";
|
||||
};
|
||||
config.":web_push_encryption".":vapid_details" = {
|
||||
|
@ -319,20 +335,19 @@ in {
|
|||
};
|
||||
config.":joken".":default_signer"._secret = "/secrets/akkoma/joken_signer";
|
||||
nginx = {
|
||||
serverAliases = [ "akkoma.${cfg.domainName}" ];
|
||||
quic = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
};
|
||||
systemd.services.akkoma.path = [ pkgs.exiftool pkgs.gawk ];
|
||||
systemd.services.akkoma.serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
};
|
||||
systemd.services.akkoma.unitConfig = {
|
||||
systemd.services.akkoma = {
|
||||
path = [ pkgs.exiftool pkgs.gawk ];
|
||||
serviceConfig.Restart = "on-failure";
|
||||
unitConfig = {
|
||||
StartLimitIntervalSec = 60;
|
||||
StartLimitBurst = 3;
|
||||
};
|
||||
};
|
||||
|
||||
/*locations."/dns-query".extraConfig = ''
|
||||
grpc_pass grpc://127.0.0.1:53453;
|
||||
|
|
|
@ -93,6 +93,7 @@ in {
|
|||
# ISO-8601
|
||||
i18n.extraLocaleSettings.LC_TIME = "en_DK.UTF-8";
|
||||
environment.systemPackages = with pkgs; ([
|
||||
bottom
|
||||
wget
|
||||
git
|
||||
tmux
|
||||
|
|
Loading…
Reference in a new issue