Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add pg db

+51 -12
+1
.gitignore
··· 36 36 .secret.envrc 37 37 38 38 target/ 39 + data/
+1
doc/ideas.org
··· 1 + * TODO add more metadata to seed, e.g. ref and branch 1 2 * TODO bail out nixos if not root 2 3 * TODO boot check for containers 3 4 can we just check if boot-system matches out_path?
+32
flake.lock
··· 357 357 "type": "github" 358 358 } 359 359 }, 360 + "process-compose-flake": { 361 + "locked": { 362 + "lastModified": 1708624100, 363 + "narHash": "sha256-zZPheCD9JGg2EtK4A9BsIdyl8447egOow4fjIfHFHRg=", 364 + "owner": "Platonic-Systems", 365 + "repo": "process-compose-flake", 366 + "rev": "44d260ddba5a51570dee54d5cd4d8984edaf98c2", 367 + "type": "github" 368 + }, 369 + "original": { 370 + "owner": "Platonic-Systems", 371 + "repo": "process-compose-flake", 372 + "type": "github" 373 + } 374 + }, 360 375 "root": { 361 376 "inputs": { 362 377 "attic": "attic", ··· 365 380 "lexical": "lexical", 366 381 "next-ls": "next-ls", 367 382 "nixpkgs": "nixpkgs_3", 383 + "process-compose-flake": "process-compose-flake", 368 384 "rust-overlay": "rust-overlay", 385 + "services-flake": "services-flake", 369 386 "typhon": "typhon" 370 387 } 371 388 }, ··· 409 426 "original": { 410 427 "owner": "oxalica", 411 428 "repo": "rust-overlay", 429 + "type": "github" 430 + } 431 + }, 432 + "services-flake": { 433 + "locked": { 434 + "lastModified": 1712209475, 435 + "narHash": "sha256-dcCCUS6R7gCyeVZyUcbuftVfwzN7luKBijeQxmDTUmw=", 436 + "owner": "juspay", 437 + "repo": "services-flake", 438 + "rev": "eb4364c92a6bb8ed0534b4b6eedcd5605161fa39", 439 + "type": "github" 440 + }, 441 + "original": { 442 + "owner": "juspay", 443 + "repo": "services-flake", 412 444 "type": "github" 413 445 } 414 446 },
+16 -11
flake.nix
··· 8 8 lexical.url = "github:lexical-lsp/lexical"; 9 9 next-ls.url = "github:elixir-tools/next-ls"; 10 10 nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable-small"; 11 + process-compose-flake.url = "github:Platonic-Systems/process-compose-flake"; 11 12 rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; 12 13 rust-overlay.url = "github:oxalica/rust-overlay"; 14 + services-flake.url = "github:juspay/services-flake"; 13 15 typhon.url = "github:typhon-ci/typhon"; 14 16 typhon.inputs.nixpkgs.follows = "nixpkgs"; 15 17 }; ··· 19 21 flake-parts.lib.mkFlake { inherit inputs; } ( 20 22 { lib, withSystem, ... }: 21 23 rec { 22 - imports = [ ./nix/flakemodule.nix ]; 24 + imports = [ 25 + ./nix/flakemodule.nix 26 + inputs.process-compose-flake.flakeModule 27 + ]; 23 28 24 29 systems = [ 25 30 "x86_64-linux" ··· 91 96 ''; 92 97 }; 93 98 94 - legacyPackages = { 95 - inherit beamPackages; 96 - }; 97 - packages = rec { 98 - 99 + packages = { 99 100 seed-ci = pkgs.callPackage ./nix/seed-ci.nix { inherit (inputs'.attic.packages) attic; }; 100 - 101 - # legacy alias 102 - cli = client; 103 - 104 101 client = pkgs.callPackage ./nix/client-package.nix { inherit craneLib rustTarget; }; 102 + server = pkgs.callPackage ./nix/server-package.nix { }; 103 + }; 105 104 106 - server = pkgs.callPackage ./nix/server-package.nix { inherit (self'.legacyPackages) beamPackages; }; 105 + process-compose."default" = { 106 + imports = [ inputs.services-flake.processComposeModules.default ]; 107 + 108 + services.postgres."pg1" = { 109 + enable = true; 110 + superuser = "postgres"; 111 + }; 107 112 }; 108 113 }; 109 114
+1 -1
nix/nixos-server.nix
··· 14 14 15 15 package = lib.mkOption { 16 16 type = lib.types.package; 17 - default = pkgs.sower; 17 + default = pkgs.callPackage ./server-package.nix { }; 18 18 }; 19 19 20 20 environment = lib.mkOption {