From 75ea74614334d4cf3379274fe1b85a44eb4d56a7 Mon Sep 17 00:00:00 2001
From: DerGrumpf
Date: Tue, 17 Feb 2026 22:39:16 +0100
Subject: [PATCH] Added: Configuration for cyper-pi-2
---
flake.nix | 44 +++++++++++++++++-------------
hosts/cyper-pi-2/configuration.nix | 25 +++++++++++++++++
2 files changed, 50 insertions(+), 19 deletions(-)
create mode 100644 hosts/cyper-pi-2/configuration.nix
diff --git a/flake.nix b/flake.nix
index 362176d..8702b67 100644
--- a/flake.nix
+++ b/flake.nix
@@ -29,26 +29,32 @@
let
primaryUser = "phil";
system = "aarch64-linux";
+
+ mkNixosConfig =
+ hostName:
+ nixpkgs.lib.nixosSystem {
+ inherit system;
+ modules = [
+ ./nixos/default.nix
+ ./nixos/hardware.nix
+ ./hosts/${hostName}/configuration.nix
+ home-manager.nixosModules.home-manager
+ {
+ home-manager = {
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ users.${primaryUser} = import ./home/default.nix;
+ extraSpecialArgs = { inherit inputs primaryUser; };
+ backupFileExtension = "backup";
+ };
+ }
+ ];
+ specialArgs = { inherit inputs self primaryUser; };
+ };
in
{
- nixosConfigurations."cyper-pi-1" = nixpkgs.lib.nixosSystem {
- inherit system;
- modules = [
- ./nixos/default.nix
- ./nixos/hardware.nix
- ./hosts/cyper-pi-1/configuration.nix
- home-manager.nixosModules.home-manager
- {
- home-manager = {
- useGlobalPkgs = true;
- useUserPackages = true;
- users.${primaryUser} = import ./home/default.nix;
- extraSpecialArgs = { inherit inputs primaryUser; };
- backupFileExtension = "backup";
- };
- }
- ];
- specialArgs = { inherit inputs self primaryUser; };
- };
+ nixosConfigurations."cyper-pi-1" = mkNixosConfig "cyper-pi-1";
+ nixosConfigurations."cyper-pi-2" = mkNixosConfig "cyper-pi-2";
};
+
}
diff --git a/hosts/cyper-pi-2/configuration.nix b/hosts/cyper-pi-2/configuration.nix
new file mode 100644
index 0000000..3d41f41
--- /dev/null
+++ b/hosts/cyper-pi-2/configuration.nix
@@ -0,0 +1,25 @@
+{
+ lib,
+ ...
+}:
+
+{
+ imports = [
+ ./postgres.nix
+ ];
+
+ # Any RPi 4 specific customizations go here
+ networking = {
+ hostName = lib.mkForce "cyper-pi-2";
+ # interfaces.end0.ipv4.addresses = [
+ # {
+ # address = "192.168.2.41";
+ # prefixLength = 24;
+ # }
+ # ];
+
+ # firewall = {
+ # enable = false;
+ # };
+ };
+}