diff options
Diffstat (limited to 'flakes')
-rw-r--r-- | flakes/libspf2/default.nix | 34 | ||||
-rw-r--r-- | flakes/libspf2/flake.nix | 56 | ||||
-rw-r--r-- | flakes/openarc/default.nix | 20 | ||||
-rw-r--r-- | flakes/openarc/flake.lock | 8 | ||||
-rw-r--r-- | flakes/openarc/flake.nix | 31 | ||||
-rw-r--r-- | flakes/opendmarc/default.nix | 25 | ||||
-rw-r--r-- | flakes/opendmarc/flake.lock | 53 | ||||
-rw-r--r-- | flakes/opendmarc/flake.nix | 39 | ||||
-rw-r--r-- | flakes/peertube/client.nix | 6 | ||||
-rw-r--r-- | flakes/peertube/default.nix | 41 | ||||
-rw-r--r-- | flakes/peertube/flake.lock | 8 | ||||
-rw-r--r-- | flakes/peertube/flake.nix | 56 | ||||
-rw-r--r-- | flakes/peertube/server.nix | 6 | ||||
-rw-r--r-- | flakes/private/openarc/flake.lock | 14 | ||||
-rw-r--r-- | flakes/private/openarc/flake.nix | 6 | ||||
-rw-r--r-- | flakes/private/opendmarc/flake.lock | 39 | ||||
-rw-r--r-- | flakes/private/opendmarc/flake.nix | 9 |
17 files changed, 223 insertions, 228 deletions
diff --git a/flakes/libspf2/default.nix b/flakes/libspf2/default.nix new file mode 100644 index 0000000..a9e5ec3 --- /dev/null +++ b/flakes/libspf2/default.nix | |||
@@ -0,0 +1,34 @@ | |||
1 | { fetchpatch, file, fetchurl, libnsl, stdenv, lib }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | pname = "libspf2"; | ||
4 | version = "1.2.10"; | ||
5 | |||
6 | patches = [ | ||
7 | (fetchpatch { | ||
8 | name = "fix-variadic-macros.patch"; | ||
9 | url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/fix-variadic-macros.patch?h=packages/libspf2"; | ||
10 | sha256 = "00dqpcgjr9jy2qprgqv2qiyvq8y3wlz4yns9xzabf2064jzqh2ic"; | ||
11 | }) | ||
12 | ]; | ||
13 | preConfigure = '' | ||
14 | sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure | ||
15 | ''; | ||
16 | configureFlags = [ | ||
17 | "--enable-static" | ||
18 | ]; | ||
19 | postInstall = '' | ||
20 | rm $out/bin/*_static | ||
21 | ''; | ||
22 | src = fetchurl { | ||
23 | url = "https://www.libspf2.org/spf/${pname}-${version}.tar.gz"; | ||
24 | sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr"; | ||
25 | }; | ||
26 | |||
27 | buildInputs = [ libnsl ]; | ||
28 | |||
29 | meta = { | ||
30 | description = "Sender Policy Framework record checking library"; | ||
31 | homepage = "https://www.libspf2.org/"; | ||
32 | platforms = lib.platforms.linux; | ||
33 | }; | ||
34 | } | ||
diff --git a/flakes/libspf2/flake.nix b/flakes/libspf2/flake.nix index 276b138..af1deea 100644 --- a/flakes/libspf2/flake.nix +++ b/flakes/libspf2/flake.nix | |||
@@ -7,48 +7,22 @@ | |||
7 | outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system: | 7 | outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system: |
8 | let | 8 | let |
9 | pkgs = import nixpkgs { inherit system; overlays = []; }; | 9 | pkgs = import nixpkgs { inherit system; overlays = []; }; |
10 | inherit (pkgs) stdenv file fetchurl fetchpatch libnsl; | 10 | libspf2 = pkgs.callPackage ./. {}; |
11 | in rec { | 11 | in rec { |
12 | packages.libspf2 = stdenv.mkDerivation rec { | 12 | packages.libspf2 = libspf2; |
13 | pname = "libspf2"; | 13 | defaultPackage = libspf2; |
14 | version = "1.2.10"; | 14 | legacyPackages.libfspf2 = libspf2; |
15 | 15 | apps.libspf2 = flake-utils.lib.mkApp { drv = libspf2; name = "spfquery"; }; | |
16 | patches = [ | ||
17 | (fetchpatch { | ||
18 | name = "fix-variadic-macros.patch"; | ||
19 | url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/fix-variadic-macros.patch?h=packages/libspf2"; | ||
20 | sha256 = "00dqpcgjr9jy2qprgqv2qiyvq8y3wlz4yns9xzabf2064jzqh2ic"; | ||
21 | }) | ||
22 | ]; | ||
23 | preConfigure = '' | ||
24 | sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure | ||
25 | ''; | ||
26 | configureFlags = [ | ||
27 | "--enable-static" | ||
28 | ]; | ||
29 | postInstall = '' | ||
30 | rm $out/bin/*_static | ||
31 | ''; | ||
32 | src = fetchurl { | ||
33 | url = "https://www.libspf2.org/spf/${pname}-${version}.tar.gz"; | ||
34 | sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr"; | ||
35 | }; | ||
36 | |||
37 | buildInputs = [ libnsl ]; | ||
38 | |||
39 | meta = { | ||
40 | description = "Sender Policy Framework record checking library"; | ||
41 | homepage = "https://www.libspf2.org/"; | ||
42 | platforms = stdenv.lib.platforms.linux; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | defaultPackage = packages.libspf2; | ||
47 | legacyPackages.libfspf2 = packages.libspf2; | ||
48 | apps.libspf2 = flake-utils.lib.mkApp { drv = packages.libspf2; name = "spfquery"; }; | ||
49 | defaultApp = apps.libspf2; | 16 | defaultApp = apps.libspf2; |
50 | checks.build = defaultPackage; | 17 | checks.build = libspf2; |
51 | hydraJobs.build = packages.libspf2; | 18 | hydraJobs.build = libspf2; |
52 | } | 19 | } |
53 | ); | 20 | ) // rec { |
21 | overlays = { | ||
22 | libspf2 = final: prev: { | ||
23 | libspf2 = self.defaultPackage."${final.system}"; | ||
24 | }; | ||
25 | }; | ||
26 | overlay = overlays.libspf2; | ||
27 | }; | ||
54 | } | 28 | } |
diff --git a/flakes/openarc/default.nix b/flakes/openarc/default.nix new file mode 100644 index 0000000..c6d74c6 --- /dev/null +++ b/flakes/openarc/default.nix | |||
@@ -0,0 +1,20 @@ | |||
1 | { stdenv, automake, autoconf, libbsd, libtool, openssl, pkg-config, libmilter, file, lib, src }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | pname = "openarc"; | ||
4 | version = "master-${src.shortRev or "unknown"}"; | ||
5 | inherit src; | ||
6 | buildInputs = [ automake autoconf libbsd libtool openssl pkg-config libmilter ]; | ||
7 | |||
8 | configureFlags = [ | ||
9 | "--with-milter=${libmilter}" | ||
10 | ]; | ||
11 | preConfigure = '' | ||
12 | autoreconf --force --install | ||
13 | sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure | ||
14 | ''; | ||
15 | meta = { | ||
16 | description = "Open source ARC implementation"; | ||
17 | homepage = "https://github.com/trusteddomainproject/OpenARC"; | ||
18 | platforms = lib.platforms.unix; | ||
19 | }; | ||
20 | } | ||
diff --git a/flakes/openarc/flake.lock b/flakes/openarc/flake.lock index 78c0fba..e0b78a8 100644 --- a/flakes/openarc/flake.lock +++ b/flakes/openarc/flake.lock | |||
@@ -18,11 +18,11 @@ | |||
18 | "myuids": { | 18 | "myuids": { |
19 | "locked": { | 19 | "locked": { |
20 | "dir": "flakes/myuids", | 20 | "dir": "flakes/myuids", |
21 | "lastModified": 1609281959, | 21 | "lastModified": 1628207001, |
22 | "narHash": "sha256-SYNlHeobQAzTzK0pM5AqMn7M2WbTuzBeoD+Q3Mu+sho=", | 22 | "narHash": "sha256-7e12OfDv9zMOfqcAlsk1sZj2l3ZB03kcBdWUqhwVaWo=", |
23 | "ref": "master", | 23 | "ref": "master", |
24 | "rev": "1be9e64bb4556676f65e6e5044e04426848849c0", | 24 | "rev": "dfe02d8fd52e33c7d4e1a209cf486696100b88f3", |
25 | "revCount": 791, | 25 | "revCount": 865, |
26 | "type": "git", | 26 | "type": "git", |
27 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | 27 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" |
28 | }, | 28 | }, |
diff --git a/flakes/openarc/flake.nix b/flakes/openarc/flake.nix index fbb7fb1..f47afcf 100644 --- a/flakes/openarc/flake.nix +++ b/flakes/openarc/flake.nix | |||
@@ -15,30 +15,9 @@ | |||
15 | 15 | ||
16 | outputs = { self, myuids, openarc, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: | 16 | outputs = { self, myuids, openarc, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: |
17 | let | 17 | let |
18 | lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
19 | pkgs = import nixpkgs { inherit system; overlays = []; }; | 18 | pkgs = import nixpkgs { inherit system; overlays = []; }; |
20 | inherit (pkgs) stdenv automake autoconf libbsd libtool openssl pkg-config libmilter file; | ||
21 | in rec { | 19 | in rec { |
22 | packages.openarc = stdenv.mkDerivation rec { | 20 | packages.openarc = pkgs.callPackage ./. { src = openarc; }; |
23 | pname = "openarc"; | ||
24 | version = "master-${builtins.substring 0 7 lock.nodes.openarc.locked.rev}"; | ||
25 | src = openarc; | ||
26 | buildInputs = [ automake autoconf libbsd libtool openssl pkg-config libmilter ]; | ||
27 | |||
28 | configureFlags = [ | ||
29 | "--with-milter=${libmilter}" | ||
30 | ]; | ||
31 | preConfigure = '' | ||
32 | autoreconf --force --install | ||
33 | sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure | ||
34 | ''; | ||
35 | meta = { | ||
36 | description = "Open source ARC implementation"; | ||
37 | homepage = "https://github.com/trusteddomainproject/OpenARC"; | ||
38 | platforms = stdenv.lib.platforms.unix; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | defaultPackage = packages.openarc; | 21 | defaultPackage = packages.openarc; |
43 | legacyPackages.openarc = packages.openarc; | 22 | legacyPackages.openarc = packages.openarc; |
44 | apps.openarc = flake-utils.lib.mkApp { drv = packages.openarc; }; | 23 | apps.openarc = flake-utils.lib.mkApp { drv = packages.openarc; }; |
@@ -74,7 +53,13 @@ | |||
74 | ''; | 53 | ''; |
75 | }; | 54 | }; |
76 | }; | 55 | }; |
77 | }) // { | 56 | }) // rec { |
57 | overlays = { | ||
58 | openarc = final: prev: { | ||
59 | openarc = self.defaultPackage."${final.system}"; | ||
60 | }; | ||
61 | }; | ||
62 | overlay = overlays.openarc; | ||
78 | nixosModule = { config, lib, pkgs, ... }: | 63 | nixosModule = { config, lib, pkgs, ... }: |
79 | let | 64 | let |
80 | cfg = config.services.openarc; | 65 | cfg = config.services.openarc; |
diff --git a/flakes/opendmarc/default.nix b/flakes/opendmarc/default.nix new file mode 100644 index 0000000..53c1fe2 --- /dev/null +++ b/flakes/opendmarc/default.nix | |||
@@ -0,0 +1,25 @@ | |||
1 | { stdenv, lib, libspf2, libbsd, openssl, libmilter, perl, libnsl, fetchurl }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | pname = "opendmarc"; | ||
4 | version = "1.3.2"; | ||
5 | |||
6 | src = fetchurl { | ||
7 | url = "mirror://sourceforge/opendmarc/files/${pname}-${version}.tar.gz"; | ||
8 | sha256 = "1yrggj8yq0915y2i34gfz2xpl1w2lgb1vggp67rwspgzm40lng11"; | ||
9 | }; | ||
10 | |||
11 | configureFlags= [ | ||
12 | "--with-spf" | ||
13 | "--with-spf2-include=${libspf2}/include/spf2" | ||
14 | "--with-spf2-lib=${libspf2}/lib/" | ||
15 | "--with-milter=${libmilter}" | ||
16 | ]; | ||
17 | |||
18 | buildInputs = [ libspf2 libbsd openssl libmilter perl libnsl ]; | ||
19 | |||
20 | meta = { | ||
21 | description = "Free open source software implementation of the DMARC specification"; | ||
22 | homepage = "http://www.trusteddomain.org/opendmarc/"; | ||
23 | platforms = lib.platforms.unix; | ||
24 | }; | ||
25 | } | ||
diff --git a/flakes/opendmarc/flake.lock b/flakes/opendmarc/flake.lock index 9e6a869..0bd645c 100644 --- a/flakes/opendmarc/flake.lock +++ b/flakes/opendmarc/flake.lock | |||
@@ -33,39 +33,29 @@ | |||
33 | "libspf2": { | 33 | "libspf2": { |
34 | "inputs": { | 34 | "inputs": { |
35 | "flake-utils": "flake-utils_2", | 35 | "flake-utils": "flake-utils_2", |
36 | "nixpkgs": "nixpkgs" | 36 | "nixpkgs": [ |
37 | "nixpkgs" | ||
38 | ] | ||
37 | }, | 39 | }, |
38 | "locked": { | 40 | "locked": { |
39 | "dir": "flakes/libspf2", | 41 | "narHash": "sha256-q6JJxHV1hyMQlqsqFFTFeUyiH6HsVZJ3GYxXODybPfM=", |
40 | "lastModified": 1609548509, | 42 | "path": "../libspf2", |
41 | "narHash": "sha256-d9gssVdKV0EaeDU/L5QgQpQwFuxWMbwNQ71i7z4LdDs=", | 43 | "type": "path" |
42 | "ref": "master", | ||
43 | "rev": "749623765bef80615fc21e73aff89521d262e277", | ||
44 | "revCount": 796, | ||
45 | "type": "git", | ||
46 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
47 | }, | 44 | }, |
48 | "original": { | 45 | "original": { |
49 | "dir": "flakes/libspf2", | 46 | "path": "../libspf2", |
50 | "type": "git", | 47 | "type": "path" |
51 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
52 | } | 48 | } |
53 | }, | 49 | }, |
54 | "myuids": { | 50 | "myuids": { |
55 | "locked": { | 51 | "locked": { |
56 | "dir": "flakes/myuids", | 52 | "narHash": "sha256-GUYJUFgSpffirdUSwZ1r/NyAQkBkVxgH6fEaOvtyGiI=", |
57 | "lastModified": 1609548509, | 53 | "path": "../myuids", |
58 | "narHash": "sha256-d9gssVdKV0EaeDU/L5QgQpQwFuxWMbwNQ71i7z4LdDs=", | 54 | "type": "path" |
59 | "ref": "master", | ||
60 | "rev": "749623765bef80615fc21e73aff89521d262e277", | ||
61 | "revCount": 796, | ||
62 | "type": "git", | ||
63 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
64 | }, | 55 | }, |
65 | "original": { | 56 | "original": { |
66 | "dir": "flakes/myuids", | 57 | "path": "../myuids", |
67 | "type": "git", | 58 | "type": "path" |
68 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
69 | } | 59 | } |
70 | }, | 60 | }, |
71 | "nixpkgs": { | 61 | "nixpkgs": { |
@@ -83,27 +73,12 @@ | |||
83 | "type": "github" | 73 | "type": "github" |
84 | } | 74 | } |
85 | }, | 75 | }, |
86 | "nixpkgs_2": { | ||
87 | "locked": { | ||
88 | "lastModified": 1597943282, | ||
89 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", | ||
90 | "owner": "NixOS", | ||
91 | "repo": "nixpkgs", | ||
92 | "rev": "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38", | ||
93 | "type": "github" | ||
94 | }, | ||
95 | "original": { | ||
96 | "owner": "NixOS", | ||
97 | "repo": "nixpkgs", | ||
98 | "type": "github" | ||
99 | } | ||
100 | }, | ||
101 | "root": { | 76 | "root": { |
102 | "inputs": { | 77 | "inputs": { |
103 | "flake-utils": "flake-utils", | 78 | "flake-utils": "flake-utils", |
104 | "libspf2": "libspf2", | 79 | "libspf2": "libspf2", |
105 | "myuids": "myuids", | 80 | "myuids": "myuids", |
106 | "nixpkgs": "nixpkgs_2" | 81 | "nixpkgs": "nixpkgs" |
107 | } | 82 | } |
108 | } | 83 | } |
109 | }, | 84 | }, |
diff --git a/flakes/opendmarc/flake.nix b/flakes/opendmarc/flake.nix index e80376f..bf7bd5b 100644 --- a/flakes/opendmarc/flake.nix +++ b/flakes/opendmarc/flake.nix | |||
@@ -10,41 +10,16 @@ | |||
10 | url = "https://git.immae.eu/perso/Immae/Config/Nix.git"; | 10 | url = "https://git.immae.eu/perso/Immae/Config/Nix.git"; |
11 | type = "git"; | 11 | type = "git"; |
12 | dir = "flakes/libspf2"; | 12 | dir = "flakes/libspf2"; |
13 | inputs.nixpkgs.follows = "nixpkgs"; | ||
13 | }; | 14 | }; |
14 | inputs.flake-utils.url = "github:numtide/flake-utils"; | 15 | inputs.flake-utils.url = "github:numtide/flake-utils"; |
15 | inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | 16 | inputs.nixpkgs.url = "github:NixOS/nixpkgs"; |
16 | 17 | ||
17 | outputs = { self, myuids, libspf2, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system: | 18 | outputs = { self, myuids, libspf2, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system: |
18 | let | 19 | let |
19 | libspf2' = libspf2.defaultPackage."${system}"; | 20 | pkgs = import nixpkgs { inherit system; overlays = [ libspf2.overlay ]; }; |
20 | pkgs = import nixpkgs { inherit system; overlays = []; }; | ||
21 | inherit (pkgs) fetchurl stdenv libbsd perl openssl libmilter file libnsl; | ||
22 | in rec { | 21 | in rec { |
23 | packages.opendmarc = stdenv.mkDerivation rec { | 22 | packages.opendmarc = pkgs.callPackage ./. {}; |
24 | pname = "opendmarc"; | ||
25 | version = "1.3.2"; | ||
26 | |||
27 | src = fetchurl { | ||
28 | url = "mirror://sourceforge/opendmarc/files/${pname}-${version}.tar.gz"; | ||
29 | sha256 = "1yrggj8yq0915y2i34gfz2xpl1w2lgb1vggp67rwspgzm40lng11"; | ||
30 | }; | ||
31 | |||
32 | configureFlags= [ | ||
33 | "--with-spf" | ||
34 | "--with-spf2-include=${libspf2'}/include/spf2" | ||
35 | "--with-spf2-lib=${libspf2'}/lib/" | ||
36 | "--with-milter=${libmilter}" | ||
37 | ]; | ||
38 | |||
39 | buildInputs = [ libspf2' libbsd openssl libmilter perl libnsl ]; | ||
40 | |||
41 | meta = { | ||
42 | description = "Free open source software implementation of the DMARC specification"; | ||
43 | homepage = "http://www.trusteddomain.org/opendmarc/"; | ||
44 | platforms = stdenv.lib.platforms.unix; | ||
45 | }; | ||
46 | }; | ||
47 | |||
48 | defaultPackage = packages.opendmarc; | 23 | defaultPackage = packages.opendmarc; |
49 | legacyPackages.opendmarc = packages.opendmarc; | 24 | legacyPackages.opendmarc = packages.opendmarc; |
50 | apps.opendmarc = flake-utils.lib.mkApp { drv = packages.opendmarc; }; | 25 | apps.opendmarc = flake-utils.lib.mkApp { drv = packages.opendmarc; }; |
@@ -69,7 +44,13 @@ | |||
69 | ''; | 44 | ''; |
70 | }; | 45 | }; |
71 | }; | 46 | }; |
72 | }) // { | 47 | }) // rec { |
48 | overlays = { | ||
49 | opendmarc = final: prev: { | ||
50 | opendmarc = self.defaultPackage."${final.system}"; | ||
51 | }; | ||
52 | }; | ||
53 | overlay = overlays.opendmarc; | ||
73 | nixosModule = { config, lib, pkgs, ... }: | 54 | nixosModule = { config, lib, pkgs, ... }: |
74 | let | 55 | let |
75 | cfg = config.services.opendmarc; | 56 | cfg = config.services.opendmarc; |
diff --git a/flakes/peertube/client.nix b/flakes/peertube/client.nix index 06383a7..1501574 100644 --- a/flakes/peertube/client.nix +++ b/flakes/peertube/client.nix | |||
@@ -1,8 +1,8 @@ | |||
1 | { yarnModulesConfig, mkYarnModules', server, sources, version, nodejs, stdenv }: | 1 | { yarnModulesConfig, mkYarnModules', server, sources, nodejs, stdenv }: |
2 | rec { | 2 | rec { |
3 | modules = mkYarnModules' rec { | 3 | modules = mkYarnModules' rec { |
4 | pname = "peertube-client-yarn-modules"; | 4 | pname = "peertube-client-yarn-modules"; |
5 | inherit version; | 5 | inherit (sources) version; |
6 | name = "${pname}-${version}"; | 6 | name = "${pname}-${version}"; |
7 | packageJSON = "${sources}/client/package.json"; | 7 | packageJSON = "${sources}/client/package.json"; |
8 | yarnLock = "${sources}/client/yarn.lock"; | 8 | yarnLock = "${sources}/client/yarn.lock"; |
@@ -10,7 +10,7 @@ rec { | |||
10 | }; | 10 | }; |
11 | dist = stdenv.mkDerivation { | 11 | dist = stdenv.mkDerivation { |
12 | pname = "peertube-client"; | 12 | pname = "peertube-client"; |
13 | inherit version; | 13 | inherit (sources) version; |
14 | src = sources; | 14 | src = sources; |
15 | buildPhase = '' | 15 | buildPhase = '' |
16 | ln -s ${server.modules}/node_modules . | 16 | ln -s ${server.modules}/node_modules . |
diff --git a/flakes/peertube/default.nix b/flakes/peertube/default.nix new file mode 100644 index 0000000..8ba0c5f --- /dev/null +++ b/flakes/peertube/default.nix | |||
@@ -0,0 +1,41 @@ | |||
1 | { stdenv, lib, src, server, client }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | inherit (src) version; | ||
4 | pname = "peertube"; | ||
5 | inherit src; | ||
6 | buildPhase = '' | ||
7 | ln -s ${server.modules}/node_modules . | ||
8 | rm -rf dist && cp -a ${server.dist}/dist dist | ||
9 | rm -rf client/dist && cp -a ${client.dist}/dist client/ | ||
10 | ''; | ||
11 | installPhase = '' | ||
12 | mkdir $out | ||
13 | cp -a * $out | ||
14 | ln -s /tmp $out/.cache | ||
15 | ''; | ||
16 | |||
17 | meta = { | ||
18 | description = "A free software to take back control of your videos"; | ||
19 | |||
20 | longDescription = '' | ||
21 | PeerTube aspires to be a decentralized and free/libre alternative to video | ||
22 | broadcasting services. | ||
23 | PeerTube is not meant to become a huge platform that would centralize | ||
24 | videos from all around the world. Rather, it is a network of | ||
25 | inter-connected small videos hosters. | ||
26 | Anyone with a modicum of technical skills can host a PeerTube server, aka | ||
27 | an instance. Each instance hosts its users and their videos. In this way, | ||
28 | every instance is created, moderated and maintained independently by | ||
29 | various administrators. | ||
30 | You can still watch from your account videos hosted by other instances | ||
31 | though if the administrator of your instance had previously connected it | ||
32 | with other instances. | ||
33 | ''; | ||
34 | |||
35 | license = lib.licenses.agpl3Plus; | ||
36 | |||
37 | homepage = "https://joinpeertube.org/"; | ||
38 | |||
39 | platforms = lib.platforms.unix; | ||
40 | }; | ||
41 | } | ||
diff --git a/flakes/peertube/flake.lock b/flakes/peertube/flake.lock index b6fc1d0..6187115 100644 --- a/flakes/peertube/flake.lock +++ b/flakes/peertube/flake.lock | |||
@@ -18,11 +18,11 @@ | |||
18 | "myuids": { | 18 | "myuids": { |
19 | "locked": { | 19 | "locked": { |
20 | "dir": "flakes/myuids", | 20 | "dir": "flakes/myuids", |
21 | "lastModified": 1611091761, | 21 | "lastModified": 1628207001, |
22 | "narHash": "sha256-fE3FBeUxVaMezKjEpepdQW9apOza+0AfBALFhaaD0VA=", | 22 | "narHash": "sha256-7e12OfDv9zMOfqcAlsk1sZj2l3ZB03kcBdWUqhwVaWo=", |
23 | "ref": "master", | 23 | "ref": "master", |
24 | "rev": "23f9fdf03a6673dbe334ae33be4f498cc4753191", | 24 | "rev": "dfe02d8fd52e33c7d4e1a209cf486696100b88f3", |
25 | "revCount": 802, | 25 | "revCount": 865, |
26 | "type": "git", | 26 | "type": "git", |
27 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | 27 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" |
28 | }, | 28 | }, |
diff --git a/flakes/peertube/flake.nix b/flakes/peertube/flake.nix index 2a594c0..9a5c557 100644 --- a/flakes/peertube/flake.nix +++ b/flakes/peertube/flake.nix | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | outputs = { self, myuids, nixpkgs, peertube, flake-utils }: flake-utils.lib.eachSystem ["x86_64-linux"] (system: | 15 | outputs = { self, myuids, nixpkgs, peertube, flake-utils }: flake-utils.lib.eachSystem ["x86_64-linux"] (system: |
16 | let | 16 | let |
17 | version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.peertube.locked.rev; | ||
18 | pkgs = import nixpkgs { inherit system; overlays = [ | 17 | pkgs = import nixpkgs { inherit system; overlays = [ |
19 | (self: super: { nodejs = self.nodejs-12_x; }) | 18 | (self: super: { nodejs = self.nodejs-12_x; }) |
20 | ]; }; | 19 | ]; }; |
@@ -22,7 +21,7 @@ | |||
22 | 21 | ||
23 | patchedSource = stdenv.mkDerivation { | 22 | patchedSource = stdenv.mkDerivation { |
24 | pname = "peertube"; | 23 | pname = "peertube"; |
25 | inherit version; | 24 | version = peertube.rev; |
26 | src = peertube; | 25 | src = peertube; |
27 | phases = [ "unpackPhase" "patchPhase" "installPhase" ]; | 26 | phases = [ "unpackPhase" "patchPhase" "installPhase" ]; |
28 | patches = [ ./fix_yarn_lock.patch ]; | 27 | patches = [ ./fix_yarn_lock.patch ]; |
@@ -71,55 +70,16 @@ | |||
71 | }); | 70 | }); |
72 | 71 | ||
73 | server = callPackage ./server.nix { | 72 | server = callPackage ./server.nix { |
74 | inherit version yarnModulesConfig mkYarnModules'; | 73 | inherit yarnModulesConfig mkYarnModules'; |
75 | sources = patchedSource; | 74 | sources = patchedSource; |
76 | }; | 75 | }; |
77 | client = callPackage ./client.nix { | 76 | client = callPackage ./client.nix { |
78 | inherit server version yarnModulesConfig mkYarnModules'; | 77 | inherit server yarnModulesConfig mkYarnModules'; |
79 | sources = patchedSource; | 78 | sources = patchedSource; |
80 | }; | 79 | }; |
81 | 80 | ||
82 | in rec { | 81 | in rec { |
83 | packages.peertube = stdenv.mkDerivation rec { | 82 | packages.peertube = callPackage ./. { inherit server client; src = patchedSource; }; |
84 | inherit version; | ||
85 | pname = "peertube"; | ||
86 | src = patchedSource; | ||
87 | buildPhase = '' | ||
88 | ln -s ${server.modules}/node_modules . | ||
89 | rm -rf dist && cp -a ${server.dist}/dist dist | ||
90 | rm -rf client/dist && cp -a ${client.dist}/dist client/ | ||
91 | ''; | ||
92 | installPhase = '' | ||
93 | mkdir $out | ||
94 | cp -a * $out | ||
95 | ln -s /tmp $out/.cache | ||
96 | ''; | ||
97 | |||
98 | meta = { | ||
99 | description = "A free software to take back control of your videos"; | ||
100 | |||
101 | longDescription = '' | ||
102 | PeerTube aspires to be a decentralized and free/libre alternative to video | ||
103 | broadcasting services. | ||
104 | PeerTube is not meant to become a huge platform that would centralize | ||
105 | videos from all around the world. Rather, it is a network of | ||
106 | inter-connected small videos hosters. | ||
107 | Anyone with a modicum of technical skills can host a PeerTube server, aka | ||
108 | an instance. Each instance hosts its users and their videos. In this way, | ||
109 | every instance is created, moderated and maintained independently by | ||
110 | various administrators. | ||
111 | You can still watch from your account videos hosted by other instances | ||
112 | though if the administrator of your instance had previously connected it | ||
113 | with other instances. | ||
114 | ''; | ||
115 | |||
116 | license = stdenv.lib.licenses.agpl3Plus; | ||
117 | |||
118 | homepage = "https://joinpeertube.org/"; | ||
119 | |||
120 | platforms = stdenv.lib.platforms.unix; | ||
121 | }; | ||
122 | }; | ||
123 | defaultPackage = packages.peertube; | 83 | defaultPackage = packages.peertube; |
124 | legacyPackages.peertube = packages.peertube; | 84 | legacyPackages.peertube = packages.peertube; |
125 | checks = { | 85 | checks = { |
@@ -196,7 +156,13 @@ | |||
196 | }; | 156 | }; |
197 | }; | 157 | }; |
198 | } | 158 | } |
199 | ) // { | 159 | ) // rec { |
160 | overlays = { | ||
161 | peertube = final: prev: { | ||
162 | peertube = self.defaultPackage."${final.system}"; | ||
163 | }; | ||
164 | }; | ||
165 | overlay = overlays.peertube; | ||
200 | nixosModule = { lib, pkgs, config, ... }: | 166 | nixosModule = { lib, pkgs, config, ... }: |
201 | let | 167 | let |
202 | name = "peertube"; | 168 | name = "peertube"; |
diff --git a/flakes/peertube/server.nix b/flakes/peertube/server.nix index 1bba06d..26348cc 100644 --- a/flakes/peertube/server.nix +++ b/flakes/peertube/server.nix | |||
@@ -1,8 +1,8 @@ | |||
1 | { yarnModulesConfig, mkYarnModules', sources, version, nodejs, stdenv }: | 1 | { yarnModulesConfig, mkYarnModules', sources, nodejs, stdenv }: |
2 | rec { | 2 | rec { |
3 | modules = mkYarnModules' rec { | 3 | modules = mkYarnModules' rec { |
4 | pname = "peertube-server-yarn-modules"; | 4 | pname = "peertube-server-yarn-modules"; |
5 | inherit version; | 5 | inherit (sources) version; |
6 | name = "${pname}-${version}"; | 6 | name = "${pname}-${version}"; |
7 | packageJSON = "${sources}/package.json"; | 7 | packageJSON = "${sources}/package.json"; |
8 | yarnLock = "${sources}/yarn.lock"; | 8 | yarnLock = "${sources}/yarn.lock"; |
@@ -10,7 +10,7 @@ rec { | |||
10 | }; | 10 | }; |
11 | dist = stdenv.mkDerivation { | 11 | dist = stdenv.mkDerivation { |
12 | pname = "peertube-server"; | 12 | pname = "peertube-server"; |
13 | inherit version; | 13 | inherit (sources) version; |
14 | src = sources; | 14 | src = sources; |
15 | buildPhase = '' | 15 | buildPhase = '' |
16 | ln -s ${modules}/node_modules . | 16 | ln -s ${modules}/node_modules . |
diff --git a/flakes/private/openarc/flake.lock b/flakes/private/openarc/flake.lock index b1ec2b5..854f73f 100644 --- a/flakes/private/openarc/flake.lock +++ b/flakes/private/openarc/flake.lock | |||
@@ -32,13 +32,13 @@ | |||
32 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | 32 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" |
33 | } | 33 | } |
34 | }, | 34 | }, |
35 | "nixpkgs": { | 35 | "nix-lib": { |
36 | "locked": { | 36 | "locked": { |
37 | "lastModified": 1611218116, | 37 | "lastModified": 1629671097, |
38 | "narHash": "sha256-CcyGZ8cLlHgiViWyBjRIjdsdRZxJjP2MgtWeuqSv3CE=", | 38 | "narHash": "sha256-OKwGVcFaW0M4Su5NlwmUjubbsRCwbmPP1rNPtHd82As=", |
39 | "owner": "NixOS", | 39 | "owner": "NixOS", |
40 | "repo": "nixpkgs", | 40 | "repo": "nixpkgs", |
41 | "rev": "30ab92ea31f6b7e9095b1e7e4b56a5000823efdf", | 41 | "rev": "82d05e980543e1703cbfd3b5ccd1fdcd4b0f1f00", |
42 | "type": "github" | 42 | "type": "github" |
43 | }, | 43 | }, |
44 | "original": { | 44 | "original": { |
@@ -47,7 +47,7 @@ | |||
47 | "type": "github" | 47 | "type": "github" |
48 | } | 48 | } |
49 | }, | 49 | }, |
50 | "nixpkgs_2": { | 50 | "nixpkgs": { |
51 | "locked": { | 51 | "locked": { |
52 | "lastModified": 1597943282, | 52 | "lastModified": 1597943282, |
53 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", | 53 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", |
@@ -66,7 +66,7 @@ | |||
66 | "inputs": { | 66 | "inputs": { |
67 | "flake-utils": "flake-utils", | 67 | "flake-utils": "flake-utils", |
68 | "myuids": "myuids", | 68 | "myuids": "myuids", |
69 | "nixpkgs": "nixpkgs_2", | 69 | "nixpkgs": "nixpkgs", |
70 | "openarc": "openarc_2" | 70 | "openarc": "openarc_2" |
71 | }, | 71 | }, |
72 | "locked": { | 72 | "locked": { |
@@ -97,7 +97,7 @@ | |||
97 | }, | 97 | }, |
98 | "root": { | 98 | "root": { |
99 | "inputs": { | 99 | "inputs": { |
100 | "nixpkgs": "nixpkgs", | 100 | "nix-lib": "nix-lib", |
101 | "openarc": "openarc" | 101 | "openarc": "openarc" |
102 | } | 102 | } |
103 | } | 103 | } |
diff --git a/flakes/private/openarc/flake.nix b/flakes/private/openarc/flake.nix index 65a56ca..fd8ec56 100644 --- a/flakes/private/openarc/flake.nix +++ b/flakes/private/openarc/flake.nix | |||
@@ -3,10 +3,10 @@ | |||
3 | path = "../../openarc"; | 3 | path = "../../openarc"; |
4 | type = "path"; | 4 | type = "path"; |
5 | }; | 5 | }; |
6 | inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | 6 | inputs.nix-lib.url = "github:NixOS/nixpkgs"; |
7 | 7 | ||
8 | description = "Private configuration for openarc"; | 8 | description = "Private configuration for openarc"; |
9 | outputs = { self, nixpkgs, openarc }: | 9 | outputs = { self, nix-lib, openarc }: |
10 | let | 10 | let |
11 | cfg = name': { config, lib, pkgs, name, ... }: lib.mkIf (name == name') { | 11 | cfg = name': { config, lib, pkgs, name, ... }: lib.mkIf (name == name') { |
12 | services.openarc = { | 12 | services.openarc = { |
@@ -41,5 +41,5 @@ | |||
41 | }; | 41 | }; |
42 | in | 42 | in |
43 | openarc.outputs // | 43 | openarc.outputs // |
44 | { nixosModules = openarc.nixosModules or {} // nixpkgs.lib.genAttrs ["eldiron" "backup-2"] cfg; }; | 44 | { nixosModules = openarc.nixosModules or {} // nix-lib.lib.genAttrs ["eldiron" "backup-2"] cfg; }; |
45 | } | 45 | } |
diff --git a/flakes/private/opendmarc/flake.lock b/flakes/private/opendmarc/flake.lock index ae07161..cdb3833 100644 --- a/flakes/private/opendmarc/flake.lock +++ b/flakes/private/opendmarc/flake.lock | |||
@@ -33,7 +33,9 @@ | |||
33 | "libspf2": { | 33 | "libspf2": { |
34 | "inputs": { | 34 | "inputs": { |
35 | "flake-utils": "flake-utils_2", | 35 | "flake-utils": "flake-utils_2", |
36 | "nixpkgs": "nixpkgs_2" | 36 | "nixpkgs": [ |
37 | "nixpkgs" | ||
38 | ] | ||
37 | }, | 39 | }, |
38 | "locked": { | 40 | "locked": { |
39 | "dir": "flakes/libspf2", | 41 | "dir": "flakes/libspf2", |
@@ -68,28 +70,13 @@ | |||
68 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | 70 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" |
69 | } | 71 | } |
70 | }, | 72 | }, |
71 | "nixpkgs": { | 73 | "nix-lib": { |
72 | "locked": { | ||
73 | "lastModified": 1611218116, | ||
74 | "narHash": "sha256-CcyGZ8cLlHgiViWyBjRIjdsdRZxJjP2MgtWeuqSv3CE=", | ||
75 | "owner": "NixOS", | ||
76 | "repo": "nixpkgs", | ||
77 | "rev": "30ab92ea31f6b7e9095b1e7e4b56a5000823efdf", | ||
78 | "type": "github" | ||
79 | }, | ||
80 | "original": { | ||
81 | "owner": "NixOS", | ||
82 | "repo": "nixpkgs", | ||
83 | "type": "github" | ||
84 | } | ||
85 | }, | ||
86 | "nixpkgs_2": { | ||
87 | "locked": { | 74 | "locked": { |
88 | "lastModified": 1597943282, | 75 | "lastModified": 1629674054, |
89 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", | 76 | "narHash": "sha256-Vl4SmTN1Cwz9T8Te85Bkq11e9VPl4JRNO+Rzmxxop+c=", |
90 | "owner": "NixOS", | 77 | "owner": "NixOS", |
91 | "repo": "nixpkgs", | 78 | "repo": "nixpkgs", |
92 | "rev": "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38", | 79 | "rev": "f118101266328f38241e266d30316cd3c50e43da", |
93 | "type": "github" | 80 | "type": "github" |
94 | }, | 81 | }, |
95 | "original": { | 82 | "original": { |
@@ -98,7 +85,7 @@ | |||
98 | "type": "github" | 85 | "type": "github" |
99 | } | 86 | } |
100 | }, | 87 | }, |
101 | "nixpkgs_3": { | 88 | "nixpkgs": { |
102 | "locked": { | 89 | "locked": { |
103 | "lastModified": 1597943282, | 90 | "lastModified": 1597943282, |
104 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", | 91 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", |
@@ -118,10 +105,10 @@ | |||
118 | "flake-utils": "flake-utils", | 105 | "flake-utils": "flake-utils", |
119 | "libspf2": "libspf2", | 106 | "libspf2": "libspf2", |
120 | "myuids": "myuids", | 107 | "myuids": "myuids", |
121 | "nixpkgs": "nixpkgs_3" | 108 | "nixpkgs": "nixpkgs" |
122 | }, | 109 | }, |
123 | "locked": { | 110 | "locked": { |
124 | "narHash": "sha256-V6elpT2t2bYOnY6RSwLIu+SU7Zajkk7oonjscoYpWKo=", | 111 | "narHash": "sha256-Fw06I3FREReXjXFSs8TuTVQv2kncP3toGdJE1KeHJO8=", |
125 | "path": "../../opendmarc", | 112 | "path": "../../opendmarc", |
126 | "type": "path" | 113 | "type": "path" |
127 | }, | 114 | }, |
@@ -132,7 +119,11 @@ | |||
132 | }, | 119 | }, |
133 | "root": { | 120 | "root": { |
134 | "inputs": { | 121 | "inputs": { |
135 | "nixpkgs": "nixpkgs", | 122 | "nix-lib": "nix-lib", |
123 | "nixpkgs": [ | ||
124 | "opendmarc", | ||
125 | "nixpkgs" | ||
126 | ], | ||
136 | "opendmarc": "opendmarc" | 127 | "opendmarc": "opendmarc" |
137 | } | 128 | } |
138 | } | 129 | } |
diff --git a/flakes/private/opendmarc/flake.nix b/flakes/private/opendmarc/flake.nix index 384bf98..3d500a2 100644 --- a/flakes/private/opendmarc/flake.nix +++ b/flakes/private/opendmarc/flake.nix | |||
@@ -3,10 +3,13 @@ | |||
3 | path = "../../opendmarc"; | 3 | path = "../../opendmarc"; |
4 | type = "path"; | 4 | type = "path"; |
5 | }; | 5 | }; |
6 | inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | 6 | inputs.nix-lib.url = "github:NixOS/nixpkgs"; |
7 | |||
8 | # Necessary for dependencies | ||
9 | inputs.nixpkgs.follows = "opendmarc/nixpkgs"; | ||
7 | 10 | ||
8 | description = "Private configuration for opendmarc"; | 11 | description = "Private configuration for opendmarc"; |
9 | outputs = { self, nixpkgs, opendmarc }: | 12 | outputs = { self, nix-lib, opendmarc, nixpkgs }: |
10 | let | 13 | let |
11 | cfg = name': { config, lib, pkgs, name, ... }: lib.mkIf (name == name') { | 14 | cfg = name': { config, lib, pkgs, name, ... }: lib.mkIf (name == name') { |
12 | users.users."${config.services.opendmarc.user}".extraGroups = [ "keys" ]; | 15 | users.users."${config.services.opendmarc.user}".extraGroups = [ "keys" ]; |
@@ -54,6 +57,6 @@ | |||
54 | }; | 57 | }; |
55 | in | 58 | in |
56 | opendmarc.outputs // | 59 | opendmarc.outputs // |
57 | { nixosModules = opendmarc.nixosModules or {} // nixpkgs.lib.genAttrs ["eldiron" "backup-2"] cfg; }; | 60 | { nixosModules = opendmarc.nixosModules or {} // nix-lib.lib.genAttrs ["eldiron" "backup-2"] cfg; }; |
58 | } | 61 | } |
59 | 62 | ||