diff --git a/.gitignore b/.gitignore index e335f2a..8915a65 100644 --- a/.gitignore +++ b/.gitignore @@ -5,20 +5,18 @@ /qp_raker.toml .*.swp -quickpeep_static/.parcel-cache -quickpeep_static/dist -quickpeep_static/node_modules -quickpeep/testdb.sqlite -qp_web.ron +/quickpeep_static/.parcel-cache +/quickpeep_static/dist +/quickpeep_static/node_modules +/quickpeep/testdb.sqlite /dist /book /workbench /rakepacks /index -qp_indexer.toml -nix_flake/result -nix_flake/test_vm/nixos.qcow2 -nix_flake/test_vm/result -quickpeep.ron -index_icons -index_icons-lck \ No newline at end of file +/nix_flake/result +/nix_flake/test_vm/nixos.qcow2 +/nix_flake/test_vm/result +/quickpeep.ron +/index_icons +/index_icons-lck diff --git a/nix_flake/flake.lock b/nix_flake/flake.lock index 3ae3fe9..d989260 100644 --- a/nix_flake/flake.lock +++ b/nix_flake/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1648544490, - "narHash": "sha256-EoBDcccV70tfz2LAs5lK0BjC7en5mzUVlgLsd5E6DW4=", + "lastModified": 1649096192, + "narHash": "sha256-7O8e+eZEYeU+ET98u/zW5epuoN/xYx9G+CIh4DjZVzY=", "owner": "nix-community", "repo": "naersk", - "rev": "e30ef9a5ce9b3de8bb438f15829c50f9525ca730", + "rev": "d626f73332a8f587b613b0afe7293dd0777be07d", "type": "github" }, "original": { @@ -57,7 +57,7 @@ "src": { "flake": false, "locked": { - "narHash": "sha256-9DWcuVadnJPko8LjBbV7nnYhCBc2VGQKKfo5QYUJFk0=", + "narHash": "sha256-1/06n6MpN2m2LMteAwFqZ2qWADpGSo7MFQplLFEJRSc=", "path": "..", "type": "path" }, diff --git a/nix_flake/modules/quickpeepSearch.nix b/nix_flake/modules/quickpeepSearch.nix index 0e83383..4d07183 100644 --- a/nix_flake/modules/quickpeepSearch.nix +++ b/nix_flake/modules/quickpeepSearch.nix @@ -41,12 +41,19 @@ with lib; Port upon which to bind the web interface. ''; }; + + configPath = mkOption { + type = with types; path; + description = '' + Config path to use, in RON format. + ''; + }; }; }; config = mkIf cfg.enable { users.users."${cfg.user}" = { - description = "Hallo daemon user"; + description = "QuickPeep User"; isSystemUser = true; group = "${cfg.user}"; }; @@ -56,6 +63,10 @@ with lib; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; description = "Start the QuickPeep Search web interface."; + + environment = { + QUICKPEEP_CONFIG = cfg.configPath; + }; serviceConfig = { Type = "simple"; User = "${cfg.user}"; diff --git a/nix_flake/test_vm/flake.lock b/nix_flake/test_vm/flake.lock index c9e473c..54bf5f1 100644 --- a/nix_flake/test_vm/flake.lock +++ b/nix_flake/test_vm/flake.lock @@ -36,11 +36,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1648544490, - "narHash": "sha256-EoBDcccV70tfz2LAs5lK0BjC7en5mzUVlgLsd5E6DW4=", + "lastModified": 1649096192, + "narHash": "sha256-7O8e+eZEYeU+ET98u/zW5epuoN/xYx9G+CIh4DjZVzY=", "owner": "nix-community", "repo": "naersk", - "rev": "e30ef9a5ce9b3de8bb438f15829c50f9525ca730", + "rev": "d626f73332a8f587b613b0afe7293dd0777be07d", "type": "github" }, "original": { @@ -152,7 +152,7 @@ "utils": "utils" }, "locked": { - "narHash": "sha256-ottHXBWVE2yM6xPwbKQuBL39BZTa1hlMYR30QA7TmzY=", + "narHash": "sha256-1d++tjw6o2hWRzS5H++HOHGc8RqwcT3KMaWk7Ed5cVw=", "path": "..", "type": "path" }, @@ -172,7 +172,7 @@ "src": { "flake": false, "locked": { - "narHash": "sha256-9DWcuVadnJPko8LjBbV7nnYhCBc2VGQKKfo5QYUJFk0=", + "narHash": "sha256-1/06n6MpN2m2LMteAwFqZ2qWADpGSo7MFQplLFEJRSc=", "path": "..", "type": "path" }, diff --git a/nix_flake/test_vm/nixos_config.nix b/nix_flake/test_vm/nixos_config.nix index 55e8922..d63f1f1 100644 --- a/nix_flake/test_vm/nixos_config.nix +++ b/nix_flake/test_vm/nixos_config.nix @@ -12,4 +12,6 @@ }; services.quickpeepSearch.enable = true; + + services.quickpeepSearch.configPath = ./quickpeep.ron; } diff --git a/nix_flake/test_vm/quickpeep.ron b/nix_flake/test_vm/quickpeep.ron new file mode 100644 index 0000000..6a452c1 --- /dev/null +++ b/nix_flake/test_vm/quickpeep.ron @@ -0,0 +1 @@ +()