diff --git a/config/hosts/audio-hauptraum-kueche/configuration.nix b/config/hosts/audio-hauptraum-kueche/configuration.nix index 93a6b53..afab440 100644 --- a/config/hosts/audio-hauptraum-kueche/configuration.nix +++ b/config/hosts/audio-hauptraum-kueche/configuration.nix @@ -2,7 +2,6 @@ { networking = { hostName = "audio-hauptraum-kueche"; - domain = "z9.ccchh.net"; }; system.stateVersion = "23.05"; diff --git a/config/hosts/audio-hauptraum-tafel/configuration.nix b/config/hosts/audio-hauptraum-tafel/configuration.nix index 2f14d0c..d7b128c 100644 --- a/config/hosts/audio-hauptraum-tafel/configuration.nix +++ b/config/hosts/audio-hauptraum-tafel/configuration.nix @@ -2,7 +2,6 @@ { networking = { hostName = "audio-hauptraum-tafel"; - domain = "z9.ccchh.net"; }; system.stateVersion = "23.05"; diff --git a/config/hosts/esphome/configuration.nix b/config/hosts/esphome/configuration.nix index 0ef1dce..fc13d89 100644 --- a/config/hosts/esphome/configuration.nix +++ b/config/hosts/esphome/configuration.nix @@ -2,7 +2,6 @@ { networking = { hostName = "esphome"; - domain = "z9.ccchh.net"; }; system.stateVersion = "23.05"; diff --git a/config/hosts/nix-box-june/default.nix b/config/hosts/nix-box-june/default.nix index 489fd67..cb94765 100644 --- a/config/hosts/nix-box-june/default.nix +++ b/config/hosts/nix-box-june/default.nix @@ -3,7 +3,6 @@ { imports = [ ./configuration.nix - ./emulated-systems.nix ./networking.nix ./users.nix ]; diff --git a/config/hosts/nix-box-june/emulated-systems.nix b/config/hosts/nix-box-june/emulated-systems.nix deleted file mode 100644 index b6065dd..0000000 --- a/config/hosts/nix-box-june/emulated-systems.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; -} diff --git a/config/hosts/ptouch-print-server/configuration.nix b/config/hosts/ptouch-print-server/configuration.nix index 33f9681..1bb1448 100644 --- a/config/hosts/ptouch-print-server/configuration.nix +++ b/config/hosts/ptouch-print-server/configuration.nix @@ -1,10 +1,7 @@ { ... }: { - networking = { - hostName = "ptouch-print-server"; - domain = "z9.ccchh.net"; - }; + networking.hostName = "ptouch-print-server"; system.stateVersion = "23.11"; } diff --git a/config/hosts/public-reverse-proxy/configuration.nix b/config/hosts/public-reverse-proxy/configuration.nix index a80f516..31aa8e8 100644 --- a/config/hosts/public-reverse-proxy/configuration.nix +++ b/config/hosts/public-reverse-proxy/configuration.nix @@ -1,10 +1,7 @@ { config, pkgs, ... }: { - networking = { - hostName = "public-reverse-proxy"; - domain = "z9.ccchh.net"; - }; + networking.hostName = "public-reverse-proxy"; system.stateVersion = "23.05"; } diff --git a/flake.nix b/flake.nix index dd47820..8f76279 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,6 @@ outputs = { nixpkgs, nixpkgs-unstable, nixos-generators, sops-nix, ... }: let - system = "x86_64-linux"; # Shairport Sync 4.3.1 (with nqptp 1.2.4) with metadata, MQTT and AirPlay 2 support. shairportSync431ExtendedNixpkgsUnstableOverlay = final: prev: { 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"; in { - nixosConfigurations = { - audio-hauptraum-kueche = nixpkgs-unstable.lib.nixosSystem { - inherit system; - modules = [ + colmena = { + meta = { + nixpkgs = nixpkgs.legacyPackages."x86_64-linux"; + 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/proxmox-vm - { nixpkgs.overlays = [ shairportSync431ExtendedNixpkgsUnstableOverlay ]; } ./config/hosts/audio-hauptraum-kueche ]; }; - audio-hauptraum-tafel = nixpkgs-unstable.lib.nixosSystem { - inherit system; - modules = [ + audio-hauptraum-tafel = { + deployment = { + targetHost = "audio-hauptraum-tafel.z9.ccchh.net"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "thinkcccluster" ]; + }; + imports = [ ./config/common ./config/proxmox-vm - { nixpkgs.overlays = [ shairportSync431ExtendedNixpkgsUnstableOverlay ]; } ./config/hosts/audio-hauptraum-tafel ]; }; - esphome = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + esphome = { + deployment = { + targetHost = "esphome.z9.ccchh.net"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "thinkcccluster" ]; + }; + imports = [ ./config/common ./config/proxmox-vm ./config/hosts/esphome ]; }; - public-reverse-proxy = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + public-reverse-proxy = { + deployment = { + targetHost = "public-reverse-proxy.z9.ccchh.net"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "thinkcccluster" ]; + }; + imports = [ ./config/common ./config/proxmox-vm ./config/hosts/public-reverse-proxy ]; }; - netbox = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + netbox = { + deployment = { + targetHost = "netbox-intern.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "chaosknoten" ]; + }; + imports = [ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops @@ -117,9 +150,14 @@ ]; }; - matrix = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + matrix = { + deployment = { + targetHost = "matrix-intern.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "chaosknoten" ]; + }; + imports = [ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops @@ -127,9 +165,14 @@ ]; }; - public-web-static = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + public-web-static = { + deployment = { + targetHost = "public-web-static-intern.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "chaosknoten" ]; + }; + imports = [ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops @@ -137,22 +180,29 @@ ]; }; - git = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + git = { + deployment = { + targetHost = "git.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "chaosknoten" ]; + }; + imports = [ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops ./config/hosts/git ]; - specialArgs = { - inherit pkgs-unstable; - }; }; - forgejo-actions-runner = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + forgejo-actions-runner = { + deployment = { + targetHost = "forgejo-actions-runner-intern.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "chaosknoten" ]; + }; + imports = [ ./config/common ./config/proxmox-vm sops-nix.nixosModules.sops @@ -160,27 +210,41 @@ ]; }; - ptouch-print-server = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + ptouch-print-server = { + deployment = { + targetHost = "ptouch-print-server.z9.ccchh.net"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "thinkcccluster" ]; + }; + imports = [ ./config/common ./config/proxmox-vm ./config/hosts/ptouch-print-server ]; }; - eh22-wiki = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + eh22-wiki = { + deployment = { + targetHost = "eh22-wiki-intern.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + tags = [ "chaosknoten" ]; + }; + imports = [ ./config/common ./config/proxmox-vm ./config/hosts/eh22-wiki ]; }; - nix-box-june = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ + nix-box-june = { + deployment = { + targetHost = "nix-box-june-intern.hamburg.ccc.de"; + targetPort = 22; + targetUser = "colmena-deploy"; + }; + imports = [ ./config/common ./config/proxmox-vm ./config/hosts/nix-box-june