Update Nix Flake to use unified config :-)
All checks were successful
continuous-integration/drone the build was successful

This commit is contained in:
Olivier 'reivilibre' 2022-04-06 22:01:58 +01:00
parent 8ac99c154f
commit 41066948fc
6 changed files with 34 additions and 22 deletions

22
.gitignore vendored
View File

@ -5,20 +5,18 @@
/qp_raker.toml /qp_raker.toml
.*.swp .*.swp
quickpeep_static/.parcel-cache /quickpeep_static/.parcel-cache
quickpeep_static/dist /quickpeep_static/dist
quickpeep_static/node_modules /quickpeep_static/node_modules
quickpeep/testdb.sqlite /quickpeep/testdb.sqlite
qp_web.ron
/dist /dist
/book /book
/workbench /workbench
/rakepacks /rakepacks
/index /index
qp_indexer.toml /nix_flake/result
nix_flake/result /nix_flake/test_vm/nixos.qcow2
nix_flake/test_vm/nixos.qcow2 /nix_flake/test_vm/result
nix_flake/test_vm/result /quickpeep.ron
quickpeep.ron /index_icons
index_icons /index_icons-lck
index_icons-lck

8
nix_flake/flake.lock generated
View File

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1648544490, "lastModified": 1649096192,
"narHash": "sha256-EoBDcccV70tfz2LAs5lK0BjC7en5mzUVlgLsd5E6DW4=", "narHash": "sha256-7O8e+eZEYeU+ET98u/zW5epuoN/xYx9G+CIh4DjZVzY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "e30ef9a5ce9b3de8bb438f15829c50f9525ca730", "rev": "d626f73332a8f587b613b0afe7293dd0777be07d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -57,7 +57,7 @@
"src": { "src": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-9DWcuVadnJPko8LjBbV7nnYhCBc2VGQKKfo5QYUJFk0=", "narHash": "sha256-1/06n6MpN2m2LMteAwFqZ2qWADpGSo7MFQplLFEJRSc=",
"path": "..", "path": "..",
"type": "path" "type": "path"
}, },

View File

@ -41,12 +41,19 @@ with lib;
Port upon which to bind the web interface. 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 { config = mkIf cfg.enable {
users.users."${cfg.user}" = { users.users."${cfg.user}" = {
description = "Hallo daemon user"; description = "QuickPeep User";
isSystemUser = true; isSystemUser = true;
group = "${cfg.user}"; group = "${cfg.user}";
}; };
@ -56,6 +63,10 @@ with lib;
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
description = "Start the QuickPeep Search web interface."; description = "Start the QuickPeep Search web interface.";
environment = {
QUICKPEEP_CONFIG = cfg.configPath;
};
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
User = "${cfg.user}"; User = "${cfg.user}";

View File

@ -36,11 +36,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1648544490, "lastModified": 1649096192,
"narHash": "sha256-EoBDcccV70tfz2LAs5lK0BjC7en5mzUVlgLsd5E6DW4=", "narHash": "sha256-7O8e+eZEYeU+ET98u/zW5epuoN/xYx9G+CIh4DjZVzY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "e30ef9a5ce9b3de8bb438f15829c50f9525ca730", "rev": "d626f73332a8f587b613b0afe7293dd0777be07d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -152,7 +152,7 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"narHash": "sha256-ottHXBWVE2yM6xPwbKQuBL39BZTa1hlMYR30QA7TmzY=", "narHash": "sha256-1d++tjw6o2hWRzS5H++HOHGc8RqwcT3KMaWk7Ed5cVw=",
"path": "..", "path": "..",
"type": "path" "type": "path"
}, },
@ -172,7 +172,7 @@
"src": { "src": {
"flake": false, "flake": false,
"locked": { "locked": {
"narHash": "sha256-9DWcuVadnJPko8LjBbV7nnYhCBc2VGQKKfo5QYUJFk0=", "narHash": "sha256-1/06n6MpN2m2LMteAwFqZ2qWADpGSo7MFQplLFEJRSc=",
"path": "..", "path": "..",
"type": "path" "type": "path"
}, },

View File

@ -12,4 +12,6 @@
}; };
services.quickpeepSearch.enable = true; services.quickpeepSearch.enable = true;
services.quickpeepSearch.configPath = ./quickpeep.ron;
} }

View File

@ -0,0 +1 @@
()