neon_arch commited on
Commit
4243db9
2 Parent(s): d110f40 3cc4d17

Merge pull request #276 from dr460nf1r3/rolling

Browse files
Files changed (5) hide show
  1. .gitignore +5 -4
  2. Cargo.toml +1 -1
  3. docs/installation.md +34 -0
  4. flake.lock +94 -0
  5. flake.nix +52 -0
.gitignore CHANGED
@@ -1,7 +1,8 @@
 
1
  /target
2
- package.json
3
- package-lock.json
4
  dump.rdb
5
- .vscode
6
  megalinter-reports/
7
- dhat-heap.json
 
 
 
1
+ .vscode
2
  /target
3
+ dhat-heap.json
 
4
  dump.rdb
 
5
  megalinter-reports/
6
+ package-lock.json
7
+ package.json
8
+ result
Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
  [package]
2
  name = "websurfx"
3
- version = "0.23.5"
4
  edition = "2021"
5
  description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
6
  repository = "https://github.com/neon-mmd/websurfx"
 
1
  [package]
2
  name = "websurfx"
3
+ version = "0.23.6"
4
  edition = "2021"
5
  description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
6
  repository = "https://github.com/neon-mmd/websurfx"
docs/installation.md CHANGED
@@ -19,6 +19,40 @@ Once you have started the server, open your preferred web browser and navigate t
19
 
20
  If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ## Other Distros
23
 
24
  The package is currently not available on other Linux distros. With contribution and support it can be made available on other distros as well 🙂.
 
19
 
20
  If you want to change the port or the ip or any other configuration setting checkout the [configuration docs](./configuration.md).
21
 
22
+ ## NixOS
23
+
24
+ A `flake.nix` has been provided to allow installing `websurfx` easily. It utilizes [nearsk](https://github.com/nix-community/naersk) to automatically generate a derivation based on `Cargo.toml` and `Cargo.lock`.
25
+
26
+ The flake has several outputs, which may be consumed:
27
+
28
+ ```bash
29
+ nix build .#websurfx
30
+ nix run .#websurfx
31
+ ```
32
+
33
+ You may include it in your own flake by adding this repo to its inputs and adding it to `environment.systemPackages` as follows:
34
+
35
+ ```nix
36
+ {
37
+ description = "My awesome configuration";
38
+
39
+ inputs = {
40
+ websurfx.url = "github:neon-mmd/websurfx";
41
+ };
42
+
43
+ outputs = { nixpkgs, ... }@inputs: {
44
+ nixosConfigurations = {
45
+ hostname = nixpkgs.lib.nixosSystem {
46
+ system = "x86_64-linux";
47
+ modules = [{
48
+ environment.systemPackages = [inputs.websurfx.packages.x86_64-linux.websurfx];
49
+ }];
50
+ };
51
+ };
52
+ };
53
+ }
54
+ ```
55
+
56
  ## Other Distros
57
 
58
  The package is currently not available on other Linux distros. With contribution and support it can be made available on other distros as well 🙂.
flake.lock ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nodes": {
3
+ "naersk": {
4
+ "inputs": {
5
+ "nixpkgs": "nixpkgs"
6
+ },
7
+ "locked": {
8
+ "lastModified": 1694081375,
9
+ "narHash": "sha256-vzJXOUnmkMCm3xw8yfPP5m8kypQ3BhAIRe4RRCWpzy8=",
10
+ "owner": "nix-community",
11
+ "repo": "naersk",
12
+ "rev": "3f976d822b7b37fc6fb8e6f157c2dd05e7e94e89",
13
+ "type": "github"
14
+ },
15
+ "original": {
16
+ "owner": "nix-community",
17
+ "ref": "master",
18
+ "repo": "naersk",
19
+ "type": "github"
20
+ }
21
+ },
22
+ "nixpkgs": {
23
+ "locked": {
24
+ "lastModified": 1695318763,
25
+ "narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=",
26
+ "path": "/nix/store/p7iz0r8gs6ppkhj83zjmwyd21k8b7v3y-source",
27
+ "rev": "e12483116b3b51a185a33a272bf351e357ba9a99",
28
+ "type": "path"
29
+ },
30
+ "original": {
31
+ "id": "nixpkgs",
32
+ "type": "indirect"
33
+ }
34
+ },
35
+ "nixpkgs_2": {
36
+ "locked": {
37
+ "lastModified": 1695318763,
38
+ "narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=",
39
+ "owner": "NixOS",
40
+ "repo": "nixpkgs",
41
+ "rev": "e12483116b3b51a185a33a272bf351e357ba9a99",
42
+ "type": "github"
43
+ },
44
+ "original": {
45
+ "owner": "NixOS",
46
+ "ref": "nixpkgs-unstable",
47
+ "repo": "nixpkgs",
48
+ "type": "github"
49
+ }
50
+ },
51
+ "root": {
52
+ "inputs": {
53
+ "naersk": "naersk",
54
+ "nixpkgs": "nixpkgs_2",
55
+ "utils": "utils"
56
+ }
57
+ },
58
+ "systems": {
59
+ "locked": {
60
+ "lastModified": 1681028828,
61
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
62
+ "owner": "nix-systems",
63
+ "repo": "default",
64
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
65
+ "type": "github"
66
+ },
67
+ "original": {
68
+ "owner": "nix-systems",
69
+ "repo": "default",
70
+ "type": "github"
71
+ }
72
+ },
73
+ "utils": {
74
+ "inputs": {
75
+ "systems": "systems"
76
+ },
77
+ "locked": {
78
+ "lastModified": 1694529238,
79
+ "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
80
+ "owner": "numtide",
81
+ "repo": "flake-utils",
82
+ "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
83
+ "type": "github"
84
+ },
85
+ "original": {
86
+ "owner": "numtide",
87
+ "repo": "flake-utils",
88
+ "type": "github"
89
+ }
90
+ }
91
+ },
92
+ "root": "root",
93
+ "version": 7
94
+ }
flake.nix ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ # Websurfx NixOS flake
3
+ inputs = {
4
+ naersk.url = "github:nix-community/naersk/master";
5
+ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6
+ utils.url = "github:numtide/flake-utils";
7
+ };
8
+
9
+ outputs = {
10
+ naersk,
11
+ nixpkgs,
12
+ self,
13
+ utils,
14
+ }:
15
+ # We do this for all systems - namely x86_64-linux, aarch64-linux,
16
+ # x86_64-darwin and aarch64-darwin
17
+ utils.lib.eachDefaultSystem (system: let
18
+ pkgs = import nixpkgs {inherit system;};
19
+ naersk-lib = pkgs.callPackage naersk {};
20
+ in rec {
21
+ # Build via "nix build .#default"
22
+ packages.default = naersk-lib.buildPackage {
23
+ # The build dependencies
24
+ buildInputs = with pkgs; [pkg-config openssl];
25
+ src = ./.;
26
+ };
27
+
28
+ # Enter devshell with all the tools via "nix develop"
29
+ # or "nix-shell"
30
+ devShells.default = with pkgs;
31
+ mkShell {
32
+ buildInputs = [
33
+ actionlint
34
+ cargo
35
+ haskellPackages.hadolint
36
+ nodePackages_latest.cspell
37
+ nodePackages_latest.eslint
38
+ nodePackages_latest.markdownlint-cli2
39
+ nodePackages_latest.stylelint
40
+ redis
41
+ rustPackages.clippy
42
+ rustc
43
+ yamllint
44
+ ];
45
+ RUST_SRC_PATH = rustPlatform.rustLibSrc;
46
+ };
47
+
48
+ # Build via "nix build .#websurfx", which is basically just
49
+ # calls the build function
50
+ packages.websurfx = packages.default;
51
+ });
52
+ }