pastila: add paste.py

This commit is contained in:
root 2024-06-15 19:54:39 +02:00
parent 7f9ca9b1f0
commit b08fe0485e
4 changed files with 173 additions and 1 deletions

View file

@ -1,5 +1,45 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"paste-py",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703863825,
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718208800, "lastModified": 1718208800,
@ -16,9 +56,121 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1718419000,
"narHash": "sha256-v4+aJpRDbJil691DXo5SydqowcB01B6E9+wFH/pNk6k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "24b048f70e34020c93ed7c11491bc050ff6eb142",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"paste-py": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1718472648,
"narHash": "sha256-eugtFG0Z2uycs29m9XsezGoE7xBWYD7EaysDH4+RMz4=",
"ref": "refs/heads/pastisserie",
"rev": "fd4b051067a09b1f76df5516514330e0d53398f7",
"revCount": 126,
"type": "git",
"url": "https://github.com/Armael/paste-py"
},
"original": {
"rev": "fd4b051067a09b1f76df5516514330e0d53398f7",
"type": "git",
"url": "https://github.com/Armael/paste-py"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2",
"systems": "systems_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1718285706,
"narHash": "sha256-DScsBM+kZvxOva7QegfdtleebMXh30XPxDQr/1IGKYo=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "a5be1bbbe0af0266147a88e0ec43b18c722f2bb9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"paste-py": "paste-py"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"paste-py",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717850719,
"narHash": "sha256-npYqVg+Wk4oxnWrnVG7416fpfrlRhp/lQ6wQ4DHI8YE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "4fc1c45a5f50169f9f29f6a98a438fb910b834ed",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
} }
} }
}, },

View file

@ -1,5 +1,7 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
inputs.paste-py.url = "git+https://github.com/Armael/paste-py?rev=fd4b051067a09b1f76df5516514330e0d53398f7";
inputs.paste-py.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, ... }@attrs: { outputs = { self, nixpkgs, ... }@attrs: {
nixosConfigurations."oven" = nixpkgs.lib.nixosSystem { nixosConfigurations."oven" = nixpkgs.lib.nixosSystem {

View file

@ -16,6 +16,7 @@ in
./weechat-relay.nix ./weechat-relay.nix
./prosody.nix ./prosody.nix
./headscale.nix ./headscale.nix
./paste.nix
]; ];
# Use the GRUB 2 boot loader. # Use the GRUB 2 boot loader.

17
pastila/paste.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, lib, pkgs, paste-py, ... }:
{
# import the nixos module exported by the paste-py flake
imports = [ paste-py.nixosModules.default ];
custom.paste-py.enable = true;
services.nginx.enable = true;
services.nginx.virtualHosts."paste.isomorphis.me" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8888";
};
};
}