From 779fca17415296a795b9887d52993934c8a3bcd2 Mon Sep 17 00:00:00 2001
From: DerGrumpf
Date: Wed, 11 Feb 2026 23:50:01 +0100
Subject: [PATCH] Added: Static IP Configuration
---
flake.nix | 23 +++++++++++++--------
hosts/cyper-pi-1/configuration.nix | 23 +++++++++++++++++++++
hosts/rpi-4/configuration.nix | 12 -----------
nixos/default.nix | 33 ++++++++++++++++++++++++++++--
4 files changed, 69 insertions(+), 22 deletions(-)
create mode 100644 hosts/cyper-pi-1/configuration.nix
delete mode 100644 hosts/rpi-4/configuration.nix
diff --git a/flake.nix b/flake.nix
index 79117a6..d2ab74a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,13 +20,20 @@
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
};
- outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs:
+ outputs =
+ {
+ self,
+ nixpkgs,
+ home-manager,
+ nixvim,
+ ...
+ }@inputs:
let
primaryUser = "phil";
system = "aarch64-linux";
in
{
- nixosConfigurations."rpi-4" = nixpkgs.lib.nixosSystem {
+ nixosConfigurations."cyper-pi-1" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./nixos/default.nix
@@ -34,12 +41,12 @@
home-manager.nixosModules.home-manager
{
home-manager = {
- useGlobalPkgs = true;
- useUserPackages = true;
- users.${primaryUser} = import ./home/default.nix;
- extraSpecialArgs = { inherit inputs primaryUser; };
- backupFileExtension = "backup";
- };
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ users.${primaryUser} = import ./home/default.nix;
+ extraSpecialArgs = { inherit inputs primaryUser; };
+ backupFileExtension = "backup";
+ };
}
];
specialArgs = { inherit inputs self primaryUser; };
diff --git a/hosts/cyper-pi-1/configuration.nix b/hosts/cyper-pi-1/configuration.nix
new file mode 100644
index 0000000..a50d8cb
--- /dev/null
+++ b/hosts/cyper-pi-1/configuration.nix
@@ -0,0 +1,23 @@
+{
+ #pkgs,
+ ...
+}:
+
+{
+ # Host-specific packages
+ #environment.systemPackages = with pkgs; [
+ # python3
+ # nodejs
+ #];
+
+ # Any RPi 4 specific customizations go here
+ networking = {
+ hostName = "cyper-pi-1";
+ interfaces.end0.ipv4.addresses = [
+ {
+ address = "192.168.2.41";
+ prefixLength = 24;
+ }
+ ];
+ };
+}
diff --git a/hosts/rpi-4/configuration.nix b/hosts/rpi-4/configuration.nix
deleted file mode 100644
index ea4fc71..0000000
--- a/hosts/rpi-4/configuration.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ config, pkgs, primaryUser, ... }:
-
-{
- # Host-specific packages
- environment.systemPackages = with pkgs; [
-# python3
-# nodejs
- ];
-
- # Any RPi 4 specific customizations go here
- networking.hostName = "rpi-4";
-}
diff --git a/nixos/default.nix b/nixos/default.nix
index c887e8d..dae365a 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -28,8 +28,37 @@
};
networking = {
- hostName = "rpi-4";
- networkmanager.enable = true;
+ hostName = "cyper-pi";
+ networkmanager = {
+ enable = true;
+ unmanaged = [
+ "*"
+ "except:type:wwan"
+ "except:type:gsm"
+ ];
+ };
+
+ defaultGateway = "192.168.2.1";
+ nameservers = [
+ "192.168.2.2"
+ "8.8.8.8"
+ "1.1.1.1"
+ ];
+
+ wireless = {
+ enable = true;
+ networks = {
+ LANFRED = {
+ pskRaw = "36e2b41b51328800a9582be1a05f13f796f943569610ccdb61304803b86ce3da";
+ };
+ };
+ };
+
+ enableIPv6 = false;
+
+ firewall = {
+ enable = false;
+ };
};
# SSH configuration