Add morph ops to deploy aristotle #1
44
hosts/aristotle/configuration.nix
Normal file
44
hosts/aristotle/configuration.nix
Normal file
@ -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?
|
||||||
|
}
|
22
hosts/aristotle/hardware-configuration.nix
Normal file
22
hosts/aristotle/hardware-configuration.nix
Normal file
@ -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";
|
||||||
|
}
|
@ -17,10 +17,10 @@
|
|||||||
"homepage": "",
|
"homepage": "",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5df05c902cde398e056eb6271d5fe13e418db4c6",
|
"rev": "55fafd9e23aa3e674a8db89013a004512ec5d2a9",
|
||||||
"sha256": "12plc7k251z1dmmrd29lyrpw0xmjvmf79yj568aapzrcki5mrw74",
|
"sha256": "02vy0544zvh7j6azmg35az0za55m2pyczb2361w0awriz2ckbpav",
|
||||||
"type": "tarball",
|
"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/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
39
ops/aristotle.nix
Normal file
39
ops/aristotle.nix
Normal file
@ -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";
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user