diff --git a/hosts/aristotle/configuration.nix b/hosts/aristotle/configuration.nix new file mode 100644 index 0000000..53fc7bc --- /dev/null +++ b/hosts/aristotle/configuration.nix @@ -0,0 +1,44 @@ +{ config, pkgs, ... }: + +{ + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the extlinux boot loader. (NixOS wants to enable GRUB by default) + boot.loader.grub.enable = false; + # Enables the generation of /boot/extlinux/extlinux.conf + boot.loader.generic-extlinux-compatible.enable = true; + + boot.kernelPackages = pkgs.linuxPackages_rpi4; + boot.loader.raspberryPi = { + enable = true; + version = 4; + }; + + # networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + networking.useDHCP = false; + networking.interfaces.eth0.useDHCP = true; + networking.interfaces.wlan0.useDHCP = true; + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net" + ]; + + services.tailscale.enable = true; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "21.03"; # Did you read the comment? +} diff --git a/hosts/aristotle/hardware-configuration.nix b/hosts/aristotle/hardware-configuration.nix new file mode 100644 index 0000000..bb1fa45 --- /dev/null +++ b/hosts/aristotle/hardware-configuration.nix @@ -0,0 +1,22 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot.initrd.availableKernelModules = [ "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; +} diff --git a/nix/sources.json b/nix/sources.json index 09ae009..414aa01 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -17,10 +17,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5df05c902cde398e056eb6271d5fe13e418db4c6", - "sha256": "12plc7k251z1dmmrd29lyrpw0xmjvmf79yj568aapzrcki5mrw74", + "rev": "55fafd9e23aa3e674a8db89013a004512ec5d2a9", + "sha256": "02vy0544zvh7j6azmg35az0za55m2pyczb2361w0awriz2ckbpav", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5df05c902cde398e056eb6271d5fe13e418db4c6.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/55fafd9e23aa3e674a8db89013a004512ec5d2a9.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/ops/aristotle.nix b/ops/aristotle.nix new file mode 100644 index 0000000..efb5167 --- /dev/null +++ b/ops/aristotle.nix @@ -0,0 +1,39 @@ +{ + network = { description = "RPi 4 cluster"; }; + + agent = { config, pkgs, ... }: { + imports = [ ../hosts/aristotle/configuration.nix ]; + networking.hostName = "agent"; + nixpkgs.system = "aarch64-linux"; + + deployment.targetHost = "192.168.6.200"; + deployment.targetUser = "root"; + }; + + form = { config, pkgs, ... }: { + imports = [ ../hosts/aristotle/configuration.nix ]; + networking.hostName = "form"; + nixpkgs.system = "aarch64-linux"; + + deployment.targetHost = "192.168.6.201"; + deployment.targetUser = "root"; + }; + + matter = { config, pkgs, ... }: { + imports = [ ../hosts/aristotle/configuration.nix ]; + networking.hostName = "matter"; + nixpkgs.system = "aarch64-linux"; + + deployment.targetHost = "192.168.6.202"; + deployment.targetUser = "root"; + }; + + purpose = { config, pkgs, ... }: { + imports = [ ../hosts/aristotle/configuration.nix ]; + networking.hostName = "purpose"; + nixpkgs.system = "aarch64-linux"; + + deployment.targetHost = "192.168.6.203"; + deployment.targetUser = "root"; + }; +} diff --git a/shell.nix b/shell.nix index df4e0c7..d2241df 100644 --- a/shell.nix +++ b/shell.nix @@ -2,5 +2,5 @@ pkgs.mkShell { name = "athens"; - buildInputs = [ ]; + buildInputs = [ pkgs.morph ]; }