deploy woodpecker

This commit is contained in:
Vivian 2022-11-07 13:21:09 +01:00
parent b04d93811e
commit ab44c1f1d1
4 changed files with 77 additions and 12 deletions

View file

@ -355,11 +355,11 @@
"utils": "utils_2"
},
"locked": {
"lastModified": 1667691670,
"narHash": "sha256-9MgKg5LbTRuZ6oonP49go4jcUzkTOhVD3ZnQsi9aWM0=",
"lastModified": 1667708081,
"narHash": "sha256-FChEy05x4ed/pttjfTeKxjPCnHknMYrUtDyBiYbreT4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c5adf29545b553089ccf9c28b68973ce6f812c1c",
"rev": "1ef0da321217c6c19b7a30509631c080a19321e5",
"type": "github"
},
"original": {
@ -374,11 +374,11 @@
"wlroots": "wlroots"
},
"locked": {
"lastModified": 1667673266,
"narHash": "sha256-grIxeuXZjil9dj97/RW1Jhf+8dsCKfzop4PR2CqOrgo=",
"lastModified": 1667758253,
"narHash": "sha256-MO9Qgsps6wtrn4K2Dv15mLgbYlmpzyFda4xnmzNP5OA=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "976b44443ae1603699a5fc4ef1eb3c6e0f5886c8",
"rev": "efbc3f819459da9f50ed4e22d648c222ea5c7ec1",
"type": "github"
},
"original": {
@ -394,11 +394,11 @@
]
},
"locked": {
"lastModified": 1667425292,
"narHash": "sha256-Cu4VWp0DLj7AS+CQYtBugxPA4r7NoX0u+BEo3GW6Sl4=",
"lastModified": 1667775402,
"narHash": "sha256-+k/21qDW+RKBKFKkjRmntWemJR8/5bZyyoDTKr/emCU=",
"owner": "hyprwm",
"repo": "hyprpaper",
"rev": "1f55dda5e2af30648d7d58dbb49dd5dfbef7bcf3",
"rev": "6d3a15f33cedaa8f01b0f96c8d2a1f8de24bbb33",
"type": "github"
},
"original": {
@ -870,11 +870,11 @@
},
"utils_2": {
"locked": {
"lastModified": 1667077288,
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {

View file

@ -168,6 +168,11 @@
ip = "10.42.42.32";
mac = "7A:17:9E:80:72:01";
}
{
hostname = "woodpecker";
ip = "10.42.42.33";
mac = "1E:24:DA:DB:4A:1A";
}
{
hostname = "nuc";
ip = "10.42.42.42";

View file

@ -54,6 +54,7 @@ in {
virtualHosts."outline.0x76.dev" = proxy "http://outline.olympus:3000";
virtualHosts."id.0x76.dev" = proxy "http://keycloak.olympus:80";
virtualHosts."ntfy.0x76.dev" = proxy "http://ntfy.olympus:80";
virtualHosts."ci.0x76.dev" = proxy "http://woodpecker.olympus:8000";
virtualHosts."pass.0x76.dev" = {
enableACME = true;
forceSSL = true;

View file

@ -0,0 +1,59 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
let vs = config.vault-secrets.secrets;
in {
imports = [ ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.11"; # Did you read the comment?
# Additional packages
environment.systemPackages = with pkgs; [ ];
networking.firewall.allowedTCPPorts = [ ];
vault-secrets.secrets.woodpecker = {
services = [ "podman-woodpecker-server" "podman-woodpecker-agent" ];
quoteEnvironmentValues = false; # Needed for docker
};
virtualisation.podman = {
enable = true;
dockerSocket.enable = true;
};
virtualisation.oci-containers = {
backend = "podman";
containers = {
woodpecker-server = {
image = "woodpeckerci/woodpecker-server:latest";
ports = [ "8000:8000" ];
volumes = [ "woodpecker-server-data:/var/lib/woodpecker/" ];
environmentFiles = [ "${vs.woodpecker}/environment" ];
environment = {
WOODPECKER_OPEN = "true";
WOODPECKER_HOST = "https://ci.0x76.dev";
WOODPECKER_GITEA = "true";
WOODPECKER_GITEA_URL = "https://git.0x76.dev";
WOODPECKER_ADMIN = "v";
};
};
woodpecker-agent = {
image = "woodpeckerci/woodpecker-agent:latest";
dependsOn = [ "woodpecker-server" ];
cmd = [ "agent" ];
volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ];
environmentFiles = [ "${vs.woodpecker}/environment" ];
environment = { WOODPECKER_SERVER = "woodpecker-server:9000"; };
};
};
};
}