···140141- [nostr-rs-relay](https://git.sr.ht/~gheartsfield/nostr-rs-relay/), This is a nostr relay, written in Rust. Available as [services.nostr-rs-relay](options.html#opt-services.nostr-rs-relay.enable).
14200143- [strfry](https://github.com/hoytech/strfry), a relay for the nostr protocol. Available as [services.strfry](options.html#opt-services.strfry.enable).
144145- [Prometheus Node Cert Exporter](https://github.com/amimof/node-cert-exporter), a prometheus exporter to check for SSL cert expiry. Available under [services.prometheus.exporters.node-cert](#opt-services.prometheus.exporters.node-cert.enable).
···140141- [nostr-rs-relay](https://git.sr.ht/~gheartsfield/nostr-rs-relay/), This is a nostr relay, written in Rust. Available as [services.nostr-rs-relay](options.html#opt-services.nostr-rs-relay.enable).
142143+- [haven](https://github.com/bitvora/haven), is a high availability vault for events on nostr. Available as [services.haven](options.html#opt-services.haven.enable).
144+145- [strfry](https://github.com/hoytech/strfry), a relay for the nostr protocol. Available as [services.strfry](options.html#opt-services.strfry.enable).
146147- [Prometheus Node Cert Exporter](https://github.com/amimof/node-cert-exporter), a prometheus exporter to check for SSL cert expiry. Available under [services.prometheus.exporters.node-cert](#opt-services.prometheus.exporters.node-cert.enable).
···1415 config = lib.mkIf config.services.paretosecurity.enable {
16 environment.systemPackages = [ config.services.paretosecurity.package ];
17+ systemd.packages = [ config.services.paretosecurity.package ];
1819+ # In traditional Linux distributions, systemd would read the [Install] section from
20+ # unit files and automatically create the appropriate symlinks to enable services.
21+ # However, in NixOS, due to its immutable nature and the way the Nix store works,
22+ # the [Install] sections are not processed during system activation. Instead, we
23+ # must explicitly tell NixOS which units to enable by specifying their target
24+ # dependencies here. This creates the necessary symlinks in the proper locations.
25+ systemd.sockets.paretosecurity.wantedBy = [ "sockets.target" ];
26+27+ # Enable the tray icon and timer services if the trayIcon option is enabled
28+ systemd.user = lib.mkIf config.services.paretosecurity.trayIcon {
29+ services.paretosecurity-trayicon = {
30+ wantedBy = [ "graphical-session.target" ];
31 };
32+ services.paretosecurity-user = {
33+ wantedBy = [ "graphical-session.target" ];
0000000000000034 };
35+ timers.paretosecurity-user = {
36+ wantedBy = [ "timers.target" ];
000037 };
38 };
039 };
40}
···18 inherit elemType placeholder;
19 };
200000000021 settingsOption = {
22 description = ''
23 Declare systemd-tmpfiles rules to create, delete, and clean up volatile
···126127 # generates a single entry for a tmpfiles.d rule
128 settingsEntryToRule = path: entry: ''
129- '${entry.type}' '${path}' '${entry.mode}' '${entry.user}' '${entry.group}' '${entry.age}' ${entry.argument}
130 '';
131132 # generates a list of tmpfiles.d rules from the attrs (paths) under tmpfiles.settings.<name>
···199 "boot.initrd.systemd.storePaths will lead to errors in the future."
200 "Found these problematic files: ${lib.concatStringsSep ", " paths}"
201 ]
202- );
000000000000000000203204 systemd.additionalUpstreamSystemUnits = [
205 "systemd-tmpfiles-clean.service"
···18 inherit elemType placeholder;
19 };
2021+ escapeArgument = lib.strings.escapeC [
22+ "\t"
23+ "\n"
24+ "\r"
25+ " "
26+ "\\"
27+ ];
28+29 settingsOption = {
30 description = ''
31 Declare systemd-tmpfiles rules to create, delete, and clean up volatile
···134135 # generates a single entry for a tmpfiles.d rule
136 settingsEntryToRule = path: entry: ''
137+ '${entry.type}' '${path}' '${entry.mode}' '${entry.user}' '${entry.group}' '${entry.age}' ${escapeArgument entry.argument}
138 '';
139140 # generates a list of tmpfiles.d rules from the attrs (paths) under tmpfiles.settings.<name>
···207 "boot.initrd.systemd.storePaths will lead to errors in the future."
208 "Found these problematic files: ${lib.concatStringsSep ", " paths}"
209 ]
210+ )
211+ ++ (lib.flatten (
212+ lib.mapAttrsToList (
213+ name: paths:
214+ lib.mapAttrsToList (
215+ path: entries:
216+ lib.mapAttrsToList (
217+ type': entry:
218+ lib.optional (lib.match ''.*\\([nrt]|x[0-9A-Fa-f]{2}).*'' entry.argument != null) (
219+ lib.concatStringsSep " " [
220+ "The argument option of ${name}.${type'}.${path} appears to"
221+ "contain escape sequences, which will be escaped again."
222+ "Unescape them if this is not intended: \"${entry.argument}\""
223+ ]
224+ )
225+ ) entries
226+ ) paths
227+ ) cfg.settings
228+ ));
229230 systemd.additionalUpstreamSystemUnits = [
231 "systemd-tmpfiles-clean.service"
···910buildGoModule rec {
11 pname = "paretosecurity";
12- version = "0.0.91";
1314 src = fetchFromGitHub {
15 owner = "ParetoSecurity";
16 repo = "agent";
17 rev = version;
18- hash = "sha256-/kGwV96Jp7U08jh/wPQMcoV48zQe9ixY7gpNdtFyOkk=";
19 };
2021- vendorHash = "sha256-kGrYoN0dGcSuQW47Y4LUFdHQYAoY74NOM1LLPdhmLhc=";
22 proxyVendor = true;
2324- subPackages = [
25- "cmd/paretosecurity"
26- ];
27-28 ldflags = [
29 "-s"
30 "-X=github.com/ParetoSecurity/agent/shared.Version=${version}"
···32 "-X=github.com/ParetoSecurity/agent/shared.Date=1970-01-01T00:00:00Z"
33 ];
340000000000000000035 passthru.tests = {
36 version = testers.testVersion {
37 version = "${version}";
···50 settings such as if you have disk encryption and firewall enabled.
5152 If you use the `services.paretosecurity` NixOS module, you also get a
53- root helper, so that you can run the checker in userspace. Some checks
54 require root permissions, and the checker asks the helper to run those.
5556 Additionally, if you enable `services.paretosecurity.trayIcon`, you get a
57 little Vilfredo Pareto living in your systray showing your the current
58- status of checks.
05960 Finally, you can run `paretosecurity link` to configure the agent
61 to send the status of checks to https://dash.paretosecurity.com to make
···910buildGoModule rec {
11 pname = "paretosecurity";
12+ version = "0.0.96";
1314 src = fetchFromGitHub {
15 owner = "ParetoSecurity";
16 repo = "agent";
17 rev = version;
18+ hash = "sha256-SyeIGSDvrnOvyOJ0zC8CulpaMa+iZeRaMTJUSydz2tw=";
19 };
2021+ vendorHash = "sha256-O/OF3Y6HiiikMxf657k9eIM7UfkicIImAUxVVf/TgR8=";
22 proxyVendor = true;
23000024 ldflags = [
25 "-s"
26 "-X=github.com/ParetoSecurity/agent/shared.Version=${version}"
···28 "-X=github.com/ParetoSecurity/agent/shared.Date=1970-01-01T00:00:00Z"
29 ];
3031+ postInstall = ''
32+ # Install global systemd files
33+ install -Dm400 ${src}/apt/paretosecurity.socket $out/lib/systemd/system/paretosecurity.socket
34+ install -Dm400 ${src}/apt/paretosecurity.service $out/lib/systemd/system/paretosecurity.service
35+ substituteInPlace $out/lib/systemd/system/paretosecurity.service \
36+ --replace-fail "/usr/bin/paretosecurity" "$out/bin/paretosecurity"
37+38+ # Install user systemd files
39+ install -Dm444 ${src}/apt/paretosecurity-user.timer $out/lib/systemd/user/paretosecurity-user.timer
40+ install -Dm444 ${src}/apt/paretosecurity-user.service $out/lib/systemd/user/paretosecurity-user.service
41+ substituteInPlace $out/lib/systemd/user/paretosecurity-user.service \
42+ --replace-fail "/usr/bin/paretosecurity" "$out/bin/paretosecurity"
43+ install -Dm444 ${src}/apt/paretosecurity-trayicon.service $out/lib/systemd/user/paretosecurity-trayicon.service
44+ substituteInPlace $out/lib/systemd/user/paretosecurity-trayicon.service \
45+ --replace-fail "/usr/bin/paretosecurity" "$out/bin/paretosecurity"
46+ '';
47+48 passthru.tests = {
49 version = testers.testVersion {
50 version = "${version}";
···63 settings such as if you have disk encryption and firewall enabled.
6465 If you use the `services.paretosecurity` NixOS module, you also get a
66+ root helper that allows you to run the checker in userspace. Some checks
67 require root permissions, and the checker asks the helper to run those.
6869 Additionally, if you enable `services.paretosecurity.trayIcon`, you get a
70 little Vilfredo Pareto living in your systray showing your the current
71+ status of checks. This will also enable a systemd timer to update the
72+ status of checks once per hour.
7374 Finally, you can run `paretosecurity link` to configure the agent
75 to send the status of checks to https://dash.paretosecurity.com to make
···12# all get the same sources with the same patches applied.
1314stdenv.mkDerivation rec {
15- version = "10.6.rc1";
16 pname = "sage-src";
1718 src = fetchFromGitHub {
19 owner = "sagemath";
20 repo = "sage";
21 rev = version;
22- hash = "sha256-fhCKe0mz3Rwz+HQJWkMj6/0gbvpVW1/ENCMNWkK5ngQ=";
23 };
2425 # contains essential files (e.g., setup.cfg) generated by the bootstrap script.
···27 configure-src = fetchurl {
28 # the hash below is the tagged commit's _parent_. it can also be found by looking for
29 # the "configure" asset at https://github.com/sagemath/sage/releases/tag/${version}
30- url = "mirror://sageupstream/configure/configure-8dab37468c9feb4a5a1fcc22bbccc12321aaa475.tar.gz";
31- hash = "sha256-WqaUbmqZ7qwrgp8hRjOO7vhTejE0tCiQeMhBcJLsqvI=";
32 };
3334 # Patches needed because of particularities of nix or the way this is packaged.
···12# all get the same sources with the same patches applied.
1314stdenv.mkDerivation rec {
15+ version = "10.6";
16 pname = "sage-src";
1718 src = fetchFromGitHub {
19 owner = "sagemath";
20 repo = "sage";
21 rev = version;
22+ hash = "sha256-ZDYFq2lJXjnADFdX6y7sskaF0rkT5EIcdN8/bs00TlQ=";
23 };
2425 # contains essential files (e.g., setup.cfg) generated by the bootstrap script.
···27 configure-src = fetchurl {
28 # the hash below is the tagged commit's _parent_. it can also be found by looking for
29 # the "configure" asset at https://github.com/sagemath/sage/releases/tag/${version}
30+ url = "mirror://sageupstream/configure/configure-10741006a4794b7db82942db55b97033d5905431.tar.gz";
31+ hash = "sha256-7LqY+vwBlyukDfcRtuR99vpC3hcBo8WRUuJjiFFq9xk=";
32 };
3334 # Patches needed because of particularities of nix or the way this is packaged.
+5-5
pkgs/by-name/ta/tailwindcss_4/package.nix
···7 makeWrapper,
8}:
9let
10- version = "4.1.0";
11 inherit (stdenv.hostPlatform) system;
12 throwSystem = throw "tailwindcss has not been packaged for ${system} yet.";
13···2223 hash =
24 {
25- aarch64-darwin = "sha256-g9Gj/LN4tEJRrNjAjtfhX+5l35PoL0O/aydCP1vSuTs=";
26- aarch64-linux = "sha256-85HVxqx9GPqfa6CgSBi42sW9LbmqKrKqjHyENjrb4HM=";
27- x86_64-darwin = "sha256-i4jtB/5K3jp7ujcj2Yk2JntEDnC1hHWohgvWxuV29OA=";
28- x86_64-linux = "sha256-hTek5N0YFtYAzMF/XrGolxxuDwvOanABe/8p5385RNk=";
29 }
30 .${system} or throwSystem;
31in
···7 makeWrapper,
8}:
9let
10+ version = "4.1.1";
11 inherit (stdenv.hostPlatform) system;
12 throwSystem = throw "tailwindcss has not been packaged for ${system} yet.";
13···2223 hash =
24 {
25+ aarch64-darwin = "sha256-moydWSkhoHmxd+4zeWwgneUNHOlJ9yqPXlGHhCQmYXA=";
26+ aarch64-linux = "sha256-zTW+fGIkpwWRYMRJjZRJmO4YI5J6gOXOKUfq9KtGxKI=";
27+ x86_64-darwin = "sha256-JPnnUj30uQVvj+dnq7+fG4Trt7ArLVPsP4G1RVUeZAA=";
28+ x86_64-linux = "sha256-jIW4NmIW7dk3iTS0JY5V7PF9LfnWIVEDcYOUP0nWp1Y=";
29 }
30 .${system} or throwSystem;
31in
+3-3
pkgs/by-name/tt/ttfb/package.nix
···89rustPlatform.buildRustPackage rec {
10 pname = "ttfb";
11- version = "1.14.0";
1213 src = fetchCrate {
14 inherit pname version;
15- hash = "sha256-TElRWWPTwigyLikda7FdDh0tSC67XdPDg/Gu5aVQlAw=";
16 };
1718 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
···20 ];
2122 useFetchCargoVendor = true;
23- cargoHash = "sha256-NXwSqTshaC5hnyruSQFgFQRqRTmINMnMZsaisuudqvY=";
2425 # The bin feature activates all dependencies of the binary. Otherwise,
26 # only the library is build.
···89rustPlatform.buildRustPackage rec {
10 pname = "ttfb";
11+ version = "1.15.0";
1213 src = fetchCrate {
14 inherit pname version;
15+ hash = "sha256-OOVqCWeF5cHMweEGWYIiWWWsw1QlNDFgnia05Qxo7uo=";
16 };
1718 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
···20 ];
2122 useFetchCargoVendor = true;
23+ cargoHash = "sha256-4Nsg5/66enMgAfPrUQHuhOTTwG2OWyyvKMHIhPnlHko=";
2425 # The bin feature activates all dependencies of the binary. Otherwise,
26 # only the library is build.