two virtual hosts
This commit is contained in:
parent
658b1008f7
commit
4b4bed8cc3
|
@ -27,7 +27,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
stateVersion = "25.05";
|
stateVersion = "24.11";
|
||||||
# enable auto updates
|
# enable auto updates
|
||||||
autoUpgrade = {
|
autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
46
flake.lock
46
flake.lock
|
@ -1,9 +1,30 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"cccb-www": {
|
"cccb-www-production": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749149612,
|
||||||
|
"narHash": "sha256-pJupKln0bASMiE/ysmx4vN7+JOpNc1apXBfTvGpDA04=",
|
||||||
|
"ref": "production",
|
||||||
|
"rev": "85ce3943793c4b200566dfa11b4997682eca30d6",
|
||||||
|
"revCount": 425,
|
||||||
|
"submodules": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.berlin.ccc.de/cccb-website-team/www.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"ref": "production",
|
||||||
|
"submodules": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.berlin.ccc.de/cccb-website-team/www.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cccb-www-staging": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749316976,
|
"lastModified": 1749316976,
|
||||||
"narHash": "sha256-9SI0mbcquU9XPa2J1/NCABnfQVu8wPr/3xP8Pi6FYoY=",
|
"narHash": "sha256-9SI0mbcquU9XPa2J1/NCABnfQVu8wPr/3xP8Pi6FYoY=",
|
||||||
|
@ -22,6 +43,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741332913,
|
||||||
|
"narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "20755fa05115c84be00b04690630cb38f0a203ad",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748995628,
|
"lastModified": 1748995628,
|
||||||
"narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=",
|
"narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=",
|
||||||
|
@ -37,7 +74,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749086602,
|
"lastModified": 1749086602,
|
||||||
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
|
"narHash": "sha256-DJcgJMekoxVesl9kKjfLPix2Nbr42i7cpEHJiTnBUwU=",
|
||||||
|
@ -55,8 +92,9 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cccb-www": "cccb-www",
|
"cccb-www-production": "cccb-www-production",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"cccb-www-staging": "cccb-www-staging",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
13
flake.nix
13
flake.nix
|
@ -3,23 +3,24 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
|
||||||
cccb-www = {
|
cccb-www-staging.url = "git+https://git.berlin.ccc.de/cccb-website-team/www.git?ref=staging&submodules=1";
|
||||||
url = "git+https://git.berlin.ccc.de/cccb-website-team/www.git?ref=staging&submodules=1";
|
# TODO: change to staging
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
cccb-www-production.url = "git+https://git.berlin.ccc.de/cccb-website-team/www.git?ref=staging&submodules=1";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
cccb-www,
|
cccb-www-staging,
|
||||||
|
cccb-www-production,
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
nixosConfigurations.nix-www = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nix-www = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
mkWwwContent = cccb-www.lib.mkWwwContent;
|
mkWwwContentStaging = cccb-www-staging.lib.mkWwwContent;
|
||||||
|
mkWwwContentProduction = cccb-www-production.lib.mkWwwContent;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
|
21
nginx.nix
21
nginx.nix
|
@ -1,4 +1,9 @@
|
||||||
{ pkgs, mkWwwContent, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
mkWwwContentStaging,
|
||||||
|
mkWwwContentProduction,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
|
@ -20,11 +25,19 @@
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"nix-www.cccb.zerforschen.plus" = {
|
"staging.cccb.zerforschen.plus" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
root = mkWwwContent {
|
root = mkWwwContentStaging {
|
||||||
domain = "nix-www.cccb.zerforschen.plus";
|
domain = "staging.cccb.zerforschen.plus";
|
||||||
|
inherit (pkgs) system;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"production.cccb.zerforschen.plus" = {
|
||||||
|
addSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
root = mkWwwContentProduction {
|
||||||
|
domain = "production.cccb.zerforschen.plus";
|
||||||
inherit (pkgs) system;
|
inherit (pkgs) system;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue