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