microserver.parents #6
No files matched your search
@@ -1,2 +1,12 @@
|
||||
# nixos
|
||||
|
||||
### Building Raspberry Pi images
|
||||
|
||||
Raspberry Pi images that support Tailscale and headless SSH can be built using a command. It is easiest to run this command on AArch64 on Linux, such as within a Linux VM or Docker container on an M1 Mac.
|
||||
|
||||
docker run -v $PWD:/src -it --rm nixos/nix:latest /bin/sh
|
||||
nix-env -f https://github.com/nix-community/nixos-generators/archive/master.tar.gz -i
|
||||
cd /src
|
||||
nixos-generate -f sd-aarch64-installer --system aarch64-linux -c hosts/microserver.home.ts.hillion.co.uk/default.nix
|
||||
cp SOME_OUTPUT out.img.zst
|
||||
|
||||
@@ -17,5 +17,16 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."microserver.parents.ts.hillion.co.uk" = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
./hosts/microserver.parents.ts.hillion.co.uk/default.nix
|
||||
{
|
||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
networking.hostName = "microserver";
|
||||
networking.domain = "parents.ts.hillion.co.uk";
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.raspberryPi = {
|
||||
enable = true;
|
||||
version = 4;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common/default.nix
|
||||
../../modules/secrets/tailscale/microserver.parents.ts.hillion.co.uk.nix
|
||||
];
|
||||
|
||||
tailscaleAdvertiseRoutes = "10.0.0.0/24";
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.ip_forward" = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# 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 = [ "xhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.vlan2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
}
|
||||
+1
-1
Submodule modules/secrets updated: 1f411f096e...f5dd82111a.
Reference in new issue
Block a user