This commit is contained in:
parent
cc7e1aeddd
commit
798cd55c7d
2 changed files with 72 additions and 0 deletions
|
@ -50,6 +50,7 @@
|
|||
nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "green"; };
|
||||
backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
||||
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
||||
quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
||||
};
|
||||
homeConfigurations = {
|
||||
"albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; };
|
||||
|
@ -60,6 +61,7 @@
|
|||
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "green"; };
|
||||
"albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
||||
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
||||
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
||||
};
|
||||
deploy.nodes = {
|
||||
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
|
||||
|
@ -70,6 +72,7 @@
|
|||
# nixos-framework = libx.deploy { hostname = "nixos-framework"; };
|
||||
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; platform = "aarch64-linux"; };
|
||||
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; platform = "aarch64-linux"; };
|
||||
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; platform = "aarch64-linux"; };
|
||||
};
|
||||
imageConfigurations = {
|
||||
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
|
||||
|
|
69
nixos/hosts/quitman-rpi4/default.nix
Normal file
69
nixos/hosts/quitman-rpi4/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
# 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.
|
||||
{ inputs, config, lib, pkgs, modulesPath, ... }: {
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
# Enable distributed Builds
|
||||
nix.distributedBuilds = true;
|
||||
|
||||
hardware = {
|
||||
raspberry-pi."4".apply-overlays-dtmerge.enable = true;
|
||||
deviceTree = {
|
||||
enable = true;
|
||||
filter = "*rpi-4-*.dtb";
|
||||
};
|
||||
};
|
||||
console.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
libraspberrypi
|
||||
raspberrypi-eeprom
|
||||
];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Central";
|
||||
|
||||
#####################################################################################
|
||||
# BEGIN hardware config
|
||||
#####################################################################################
|
||||
|
||||
# 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.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
networking.hostName = "quitman-rpi4";
|
||||
#####################################################################################
|
||||
# END hardware config
|
||||
#####################################################################################
|
||||
|
||||
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
|
||||
# Set up the secrets file:
|
||||
sops.secrets."tailscale_keys/quitman-rpi4" = {
|
||||
owner = "root";
|
||||
sopsFile = ../../../secrets/tailscale.yaml;
|
||||
restartUnits = [
|
||||
"tailscaled.service"
|
||||
"tailscaled-autoconnect.service"
|
||||
];
|
||||
};
|
||||
services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/quitman-rpi4";
|
||||
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
|
||||
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
|
||||
}
|
Loading…
Reference in a new issue