Skip to content

Commit

Permalink
vimPlugins: fix the case of nvimRequirecheck (NixOS#365018)
Browse files Browse the repository at this point in the history
seems like several 'nvimRequirecheck' have been added instead of 'nvimRequireCheck'.

removed it for neotest-gtest since it makes the build fail apparently

nixos/modules/services/web-apps: add nostr-rs-relay

nixos/modules/services/web-apps: add nostr-rs-relay
  • Loading branch information
teto authored and felixzieger committed Dec 13, 2024
1 parent b057d9a commit 70d0bd4
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 12 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

- [waagent](https://github.com/Azure/WALinuxAgent), the Microsoft Azure Linux Agent (waagent) manages Linux provisioning and VM interaction with the Azure Fabric Controller. Available with [services.waagent](options.html#opt-services.waagent.enable).

- [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).

- [mqtt-exporter](https://github.com/kpetremann/mqtt-exporter/), a Prometheus exporter for exposing messages from MQTT. Available as [services.prometheus.exporters.mqtt](#opt-services.prometheus.exporters.mqtt.enable).

- [Buffyboard](https://gitlab.postmarketos.org/postmarketOS/buffybox/-/tree/master/buffyboard), a framebuffer on-screen keyboard. Available as [services.buffyboard](option.html#opt-services.buffyboard).
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,7 @@
./services/web-apps/nexus.nix
./services/web-apps/nifi.nix
./services/web-apps/node-red.nix
./services/web-apps/nostr-rs-relay.nix
./services/web-apps/ocis.nix
./services/web-apps/onlyoffice.nix
./services/web-apps/openvscode-server.nix
Expand Down
97 changes: 97 additions & 0 deletions nixos/modules/services/web-apps/nostr-rs-relay.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.services.nostr-rs-relay;
settingsFormat = pkgs.formats.toml { };
configFile = settingsFormat.generate "config.toml" (
cfg.settings
// {
database = {
data_directory = config.services.nostr-rs-relay.dataDir;
};
network = {
port = config.services.nostr-rs-relay.port;
};
}
);
in
{
options.services.nostr-rs-relay = {
enable = lib.mkEnableOption { };

package = lib.mkPackageOption pkgs "nostr-rs-relay" { };

port = lib.mkOption {
default = 12849;
type = lib.types.port;
description = ''
Listen on this port.
'';
};

dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/nostr-rs-relay";
description = lib.mdDoc "Directory for SQLite files.";
};

settings = lib.mkOption {
inherit (settingsFormat) type;
default = { };
description = lib.mdDoc ''
See https://git.sr.ht/~gheartsfield/nostr-rs-relay/#configuration for documentation.
'';
};
};

config = lib.mkIf cfg.enable {
systemd.services.nostr-rs-relay = {
description = "nostr-rs-relay";
wants = [ "network.target" ];
wantedBy = [ "multi-user.target" ];

serviceConfig = {
ExecStart = "${cfg.package}/bin/nostr-rs-relay --config ${configFile}";
DynamicUser = true;
Restart = "on-failure";
Type = "simple";

ReadWritePaths = [ cfg.dataDir ];

RuntimeDirectory = "nostr-rs-relay";
StateDirectory = "nostr-rs-relay";

PrivateTmp = true;
PrivateUsers = true;
PrivateDevices = true;
ProtectSystem = "strict";
ProtectHome = true;
NoNewPrivileges = true;
MemoryDenyWriteExecute = true;
ProtectKernelTunables = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
ProtectClock = true;
ProtectProc = "invisible";
ProcSubset = "pid";
ProtectControlGroups = true;
LockPersonality = true;
RestrictSUIDSGID = true;
RemoveIPC = true;
RestrictRealtime = true;
ProtectHostname = true;
CapabilityBoundingSet = "";
SystemCallFilter = [
"@system-service"
];
SystemCallArchitectures = "native";
};
};
};

meta.maintainers = with lib.maintainers; [ felixzieger ];
}
25 changes: 13 additions & 12 deletions pkgs/applications/editors/vim/plugins/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest";
nvimRequireCheck = "neotest";
};

neotest-bash = super.neotest-bash.overrideAttrs {
Expand Down Expand Up @@ -1962,7 +1962,8 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-gtest";
# broken
# nvimRequireCheck = "neotest-gtest";
};

neotest-haskell = super.neotest-haskell.overrideAttrs {
Expand All @@ -1978,7 +1979,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-java";
nvimRequireCheck = "neotest-java";
};

neotest-jest = super.neotest-jest.overrideAttrs {
Expand All @@ -2003,7 +2004,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-pest";
nvimRequireCheck = "neotest-pest";
};

neotest-phpunit = super.neotest-phpunit.overrideAttrs {
Expand Down Expand Up @@ -2031,7 +2032,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-plenary";
nvimRequireCheck = "neotest-plenary";
};

neotest-python = super.neotest-python.overrideAttrs {
Expand All @@ -2040,7 +2041,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-python";
nvimRequireCheck = "neotest-python";
};

neotest-rspec = super.neotest-rspec.overrideAttrs {
Expand All @@ -2064,7 +2065,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-scala";
nvimRequireCheck = "neotest-scala";
};

neotest-testthat = super.neotest-testthat.overrideAttrs {
Expand All @@ -2073,7 +2074,7 @@ in
nvim-nio
plenary-nvim
];
nvimRequirecheck = "neotest-testthat";
nvimRequireCheck = "neotest-testthat";
};

neotest-vitest = super.neotest-vitest.overrideAttrs {
Expand All @@ -2099,7 +2100,7 @@ in
plenary-nvim
nui-nvim
];
nvimRequirecheck = "neo-tree";
nvimRequireCheck = "neo-tree";
};

netman-nvim = super.netman-nvim.overrideAttrs {
Expand Down Expand Up @@ -2129,7 +2130,7 @@ in

noice-nvim = super.noice-nvim.overrideAttrs {
dependencies = [ self.nui-nvim ];
nvimRequirecheck = "noice";
nvimRequireCheck = "noice";
};

none-ls-nvim = super.none-ls-nvim.overrideAttrs {
Expand Down Expand Up @@ -2548,7 +2549,7 @@ in

otter-nvim = super.otter-nvim.overrideAttrs {
dependencies = [ self.nvim-lspconfig ];
nvimRequirecheck = "otter";
nvimRequireCheck = "otter";
};

outline-nvim = super.outline-nvim.overrideAttrs {
Expand Down Expand Up @@ -3670,7 +3671,7 @@ in
};

vim-tabby = super.vim-tabby.overrideAttrs {
nvimRequirecheck = "tabby";
nvimRequireCheck = "tabby";
};

vim-textobj-entire = super.vim-textobj-entire.overrideAttrs {
Expand Down

0 comments on commit 70d0bd4

Please sign in to comment.