Advertisement
Guest User

Untitled

a guest
Aug 19th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. 1 { nixpkgs ? import <nixpkgs> {} }:
  2. 2 let
  3. 3 inherit (nixpkgs) pkgs;
  4. 4 inherit (pkgs) haskellPackages;
  5. 5
  6. 6 project = import ./release.nix;
  7. 7 in
  8. 8 pkgs.stdenv.mkDerivation {
  9. 9 name = "shell";
  10. 10 buildInputs = project.env.nativeBuildInputs ++ [
  11. 11 haskellPackages.cabal-install
  12. 12 haskellPackages.yesod-bin
  13. 13 pkgs.cabal2nix
  14. 14 pkgs.nix
  15. 15 pkgs.postgresql
  16. 16 (import ~/.config/nixpkgs/vim.nix)
  17. 17 ];
  18. 18 };
  19. 19
  20. 20 systemd.user.services.work_postgres = {
  21. 21 Unit = { Description = "work postgres"; };
  22. 22 Service = {
  23. 23 WorkingDirectory = "./db";
  24. 24
  25. 25 ExecStart =
  26. 26 "${pkgs.postgresql}/bin/postgres -D ./.postgres/data -k ./.postgres/run";
  27. 27 Restart = "always";
  28. 28 };
  29. 29 };
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement