Compare commits
No commits in common. "46e43e51aaca3865ed1eaaff86b3307d00b645cb" and "a7541eefa8fc17ccd72bccd84a0831fea8d18bef" have entirely different histories.
46e43e51aa
...
a7541eefa8
20
README.md
20
README.md
|
@ -1,20 +0,0 @@
|
||||||
# nix-infra
|
|
||||||
|
|
||||||
nix infrastructure configuration for CCCHH.
|
|
||||||
|
|
||||||
For deployment we're using [infra-rebuild](https://git.hamburg.ccc.de/CCCHH/infra-rebuild). \
|
|
||||||
To easily get a shell with `infra-rebuild` going, use the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
nix shell git+https://git.hamburg.ccc.de/CCCHH/infra-rebuild#infra-rebuild
|
|
||||||
```
|
|
||||||
|
|
||||||
After that you can simply run the following to deploy e.g. the git and matrix hosts:
|
|
||||||
|
|
||||||
```
|
|
||||||
infra-rebuild switch git matrix
|
|
||||||
```
|
|
||||||
|
|
||||||
By default infra-rebuild tries to use the FQDN from the nixosConfiguration of the host for deployment.
|
|
||||||
However to override individual parts of the deployment target, a [`deployment_configuration.json`](./deployment_configuration.json) can be used.
|
|
||||||
This is exactly what we're doing to set the default deployment user to `colmena-deploy` and have custom target hostnames for Chaosknoten hosts, since they don't have an FQDN defined in their nixosConfiguration.
|
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "audio-hauptraum-kueche";
|
hostName = "audio-hauptraum-kueche";
|
||||||
domain = "z9.ccchh.net";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "audio-hauptraum-tafel";
|
hostName = "audio-hauptraum-tafel";
|
||||||
domain = "z9.ccchh.net";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "esphome";
|
hostName = "esphome";
|
||||||
domain = "z9.ccchh.net";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./emulated-systems.nix
|
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
}
|
|
|
@ -1,10 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking.hostName = "ptouch-print-server";
|
||||||
hostName = "ptouch-print-server";
|
|
||||||
domain = "z9.ccchh.net";
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking.hostName = "public-reverse-proxy";
|
||||||
hostName = "public-reverse-proxy";
|
|
||||||
domain = "z9.ccchh.net";
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
"default": {
|
|
||||||
"targetUser": "colmena-deploy"
|
|
||||||
},
|
|
||||||
"hosts": {
|
|
||||||
"netbox": {
|
|
||||||
"targetHostname": "netbox-intern.hamburg.ccc.de"
|
|
||||||
},
|
|
||||||
"matrix": {
|
|
||||||
"targetHostname": "matrix-intern.hamburg.ccc.de"
|
|
||||||
},
|
|
||||||
"public-web-static": {
|
|
||||||
"targetHostname": "public-web-static-intern.hamburg.ccc.de"
|
|
||||||
},
|
|
||||||
"git": {
|
|
||||||
"targetHostname": "git.hamburg.ccc.de"
|
|
||||||
},
|
|
||||||
"forgejo-actions-runner": {
|
|
||||||
"targetHostname": "forgejo-actions-runner-intern.hamburg.ccc.de"
|
|
||||||
},
|
|
||||||
"eh22-wiki": {
|
|
||||||
"targetHostname": "eh22-wiki-intern.hamburg.ccc.de"
|
|
||||||
},
|
|
||||||
"nix-box-june": {
|
|
||||||
"targetHostname": "nix-box-june-intern.hamburg.ccc.de"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
150
flake.nix
150
flake.nix
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
outputs = { nixpkgs, nixpkgs-unstable, nixos-generators, sops-nix, ... }:
|
outputs = { nixpkgs, nixpkgs-unstable, nixos-generators, sops-nix, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
|
||||||
# Shairport Sync 4.3.1 (with nqptp 1.2.4) with metadata, MQTT and AirPlay 2 support.
|
# Shairport Sync 4.3.1 (with nqptp 1.2.4) with metadata, MQTT and AirPlay 2 support.
|
||||||
shairportSync431ExtendedNixpkgsUnstableOverlay = final: prev: {
|
shairportSync431ExtendedNixpkgsUnstableOverlay = final: prev: {
|
||||||
shairport-sync = (prev.shairport-sync.override { enableMetadata = true; enableAirplay2 = true; }).overrideAttrs (finalAttr: previousAttr: {
|
shairport-sync = (prev.shairport-sync.override { enableMetadata = true; enableAirplay2 = true; }).overrideAttrs (finalAttr: previousAttr: {
|
||||||
|
@ -68,48 +67,82 @@
|
||||||
pkgs-unstable = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
pkgs-unstable = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
colmena = {
|
||||||
audio-hauptraum-kueche = nixpkgs-unstable.lib.nixosSystem {
|
meta = {
|
||||||
inherit system;
|
nixpkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||||
modules = [
|
nodeNixpkgs = {
|
||||||
|
audio-hauptraum-kueche = nixpkgs-unstable.legacyPackages."x86_64-linux".extend shairportSync431ExtendedNixpkgsUnstableOverlay;
|
||||||
|
audio-hauptraum-tafel = nixpkgs-unstable.legacyPackages."x86_64-linux".extend shairportSync431ExtendedNixpkgsUnstableOverlay;
|
||||||
|
};
|
||||||
|
nodeSpecialArgs = {
|
||||||
|
git = { inherit pkgs-unstable; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
audio-hauptraum-kueche = {
|
||||||
|
deployment = {
|
||||||
|
targetHost = "audio-hauptraum-kueche.z9.ccchh.net";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "thinkcccluster" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
{ nixpkgs.overlays = [ shairportSync431ExtendedNixpkgsUnstableOverlay ]; }
|
|
||||||
./config/hosts/audio-hauptraum-kueche
|
./config/hosts/audio-hauptraum-kueche
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
audio-hauptraum-tafel = nixpkgs-unstable.lib.nixosSystem {
|
audio-hauptraum-tafel = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "audio-hauptraum-tafel.z9.ccchh.net";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "thinkcccluster" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
{ nixpkgs.overlays = [ shairportSync431ExtendedNixpkgsUnstableOverlay ]; }
|
|
||||||
./config/hosts/audio-hauptraum-tafel
|
./config/hosts/audio-hauptraum-tafel
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
esphome = nixpkgs.lib.nixosSystem {
|
esphome = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "esphome.z9.ccchh.net";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "thinkcccluster" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
./config/hosts/esphome
|
./config/hosts/esphome
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
public-reverse-proxy = nixpkgs.lib.nixosSystem {
|
public-reverse-proxy = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "public-reverse-proxy.z9.ccchh.net";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "thinkcccluster" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
./config/hosts/public-reverse-proxy
|
./config/hosts/public-reverse-proxy
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
netbox = nixpkgs.lib.nixosSystem {
|
netbox = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "netbox-intern.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "chaosknoten" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
|
@ -117,9 +150,14 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
matrix = nixpkgs.lib.nixosSystem {
|
matrix = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "matrix-intern.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "chaosknoten" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
|
@ -127,9 +165,14 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
public-web-static = nixpkgs.lib.nixosSystem {
|
public-web-static = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "public-web-static-intern.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "chaosknoten" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
|
@ -137,22 +180,29 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
git = nixpkgs.lib.nixosSystem {
|
git = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "git.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "chaosknoten" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
./config/hosts/git
|
./config/hosts/git
|
||||||
];
|
];
|
||||||
specialArgs = {
|
|
||||||
inherit pkgs-unstable;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
forgejo-actions-runner = nixpkgs.lib.nixosSystem {
|
forgejo-actions-runner = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "forgejo-actions-runner-intern.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "chaosknoten" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
|
@ -160,27 +210,41 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
ptouch-print-server = nixpkgs.lib.nixosSystem {
|
ptouch-print-server = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "ptouch-print-server.z9.ccchh.net";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "thinkcccluster" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
./config/hosts/ptouch-print-server
|
./config/hosts/ptouch-print-server
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
eh22-wiki = nixpkgs.lib.nixosSystem {
|
eh22-wiki = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "eh22-wiki-intern.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
tags = [ "chaosknoten" ];
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
./config/hosts/eh22-wiki
|
./config/hosts/eh22-wiki
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-box-june = nixpkgs.lib.nixosSystem {
|
nix-box-june = {
|
||||||
inherit system;
|
deployment = {
|
||||||
modules = [
|
targetHost = "nix-box-june-intern.hamburg.ccc.de";
|
||||||
|
targetPort = 22;
|
||||||
|
targetUser = "colmena-deploy";
|
||||||
|
};
|
||||||
|
imports = [
|
||||||
./config/common
|
./config/common
|
||||||
./config/proxmox-vm
|
./config/proxmox-vm
|
||||||
./config/hosts/nix-box-june
|
./config/hosts/nix-box-june
|
||||||
|
|
Loading…
Reference in a new issue