From 3ebd34c8304f7024ca818ded15f4baf03fa44d8c Mon Sep 17 00:00:00 2001
From: DerGrumpf
Date: Sat, 14 Feb 2026 18:46:39 +0100
Subject: [PATCH] Added: Network Configuration; .gitignore
---
.gitignore | 46 ++++++++++++++++++++++++++++--
hosts/cyper-pi-1/configuration.nix | 29 ++++++++++---------
nixos/default.nix | 30 +++++++++----------
3 files changed, 73 insertions(+), 32 deletions(-)
diff --git a/.gitignore b/.gitignore
index 984bc58..6bc3095 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,43 @@
-./cyber-rpi.tar.gz
-./result
-./nixos-rpi4.img
+# Nix build outputs
+result
+result-*
+*.img
+*.img.zst
+*.qcow2
+
+# Nix store
+.dirlocals
+
+# Build artifacts
+*.o
+*.a
+*.so
+*.dylib
+
+# IDE/Editor
+.vscode/
+.idea/
+*.swp
+*.swo
+*~
+.DS_Store
+
+# OS
+.DS_Store
+Thumbs.db
+
+# Archives
+*.tar.gz
+*.tar.bz2
+*.zip
+
+# Local development
+.envrc
+direnv.allow
+
+# Flake lock (optional - usually committed, but some prefer not to)
+# flake.lock
+
+# Temporary files
+*.tmp
+*.bak
diff --git a/hosts/cyper-pi-1/configuration.nix b/hosts/cyper-pi-1/configuration.nix
index a50d8cb..f93c1cc 100644
--- a/hosts/cyper-pi-1/configuration.nix
+++ b/hosts/cyper-pi-1/configuration.nix
@@ -1,23 +1,24 @@
{
- #pkgs,
+ lib,
...
}:
{
- # 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;
- }
- ];
+ hostName = lib.mkForce "cyper-pi-1";
+ interfaces.end0 = {
+ useDHCP = false;
+ ipv4.addresses = [
+ {
+ address = "192.168.2.41";
+ prefixLength = 24;
+ }
+ ];
+ };
+
+ firewall = {
+ enable = false;
+ };
};
}
diff --git a/nixos/default.nix b/nixos/default.nix
index dae365a..ea9bacc 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -1,8 +1,5 @@
{
- config,
pkgs,
- inputs,
- self,
primaryUser,
...
}:
@@ -16,6 +13,9 @@
nixpkgs.config.allowUnfree = true;
+ # Speeding up builds
+ documentation.enable = false;
+
# Override python-lsp-server to skip tests (flaky tests cause timeout)
nixpkgs.config.packageOverrides = pkgs: {
python3 = pkgs.python3.override {
@@ -29,14 +29,10 @@
networking = {
hostName = "cyper-pi";
- networkmanager = {
- enable = true;
- unmanaged = [
- "*"
- "except:type:wwan"
- "except:type:gsm"
- ];
- };
+
+ useDHCP = false;
+ dhcpcd.enable = false;
+ networkmanager.enable = false;
defaultGateway = "192.168.2.1";
nameservers = [
@@ -45,6 +41,10 @@
"1.1.1.1"
];
+ interfaces.wlan0 = {
+ useDHCP = true;
+ };
+
wireless = {
enable = true;
networks = {
@@ -55,10 +55,6 @@
};
enableIPv6 = false;
-
- firewall = {
- enable = false;
- };
};
# SSH configuration
@@ -78,6 +74,10 @@
"networkmanager"
];
shell = pkgs.fish;
+ openssh.authorizedKeys.keys = [
+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCaLHfxVylghDMYR8t4QMUpeRRqXasNABQKBEy9MmhbUXCcWiPbPMSZH8FMHON34rm2OrXP1kY/8jQxqBJDA+SqpFR2AZ4Khk9iVMaq5GHxxpn2amZUjoBa+fB29WaiE1npV5JVJV3O0ylw6GtiCnpneE6fGx2MO1vOY/7zKrUX/OK7WfwkDpeEzZgV/j/md917HrzUVeZwdeTq3WCRO8Gew6R8Xs6FRjSiGuH0dq14D4Ow5Zf1cI1jx+JfD/5vGasw8HXPu1NdxsOE+6D7/22IKqGr+S74/lAoyyD5qqk0s05lw8UY/PXBLJaNLZu9Fwx0BqTHpJEvftpmvd9wUxgR3msx9VXtKNSrqivIbDgeU+3oGzzkrGZODl7FCp4XKGmbrX85Z6lKwEGgv5jez4MLZcmT86bxB7m1wIbqSbVtfhS+GI7yPTA/kLzzFa14Im/+LTj95pb8qs2ALMwTMP1j2f9A6D3RriOFihL+68qn+YbK58KuV1R0f+CQRmlfVbk= phil@web.cyperpunk.de"
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuYuGhqRC/QLoRBH91c3DG5JHlAdRLQsvde18k5ipY2 phil@cyperpunk.de"
+ ];
};
# Shell