Compare commits
16 Commits
master
...
9d60b1fb94
Author | SHA1 | Date | |
---|---|---|---|
9d60b1fb94
|
|||
acbe74764d
|
|||
fa07aef5a3
|
|||
ca37ac3837
|
|||
103564bfab
|
|||
3742b84f63
|
|||
3d2f9a2841
|
|||
634e3a5d99
|
|||
1c7b7c4cae
|
|||
aabecfd68f
|
|||
75506d5acd
|
|||
81a46270b8
|
|||
18f1efdaff
|
|||
47c304833c
|
|||
f47fd2217e
|
|||
4ad4814bed
|
16
flake.lock
generated
16
flake.lock
generated
@@ -100,6 +100,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1701656485,
|
||||||
|
"narHash": "sha256-xDFormrGCKKGqngHa2Bz1GTeKlFMMjLnHhTDRdMJ1hs=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "fa194fc484fd7270ab324bb985593f71102e84d1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677676435,
|
"lastModified": 1677676435,
|
||||||
@@ -136,6 +151,7 @@
|
|||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"secrets": "secrets",
|
"secrets": "secrets",
|
||||||
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
|
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||||
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-23.11";
|
url = "github:nix-community/home-manager/release-23.11";
|
||||||
@@ -63,6 +64,7 @@
|
|||||||
eos = nixosSystem "x86_64-linux" "eos";
|
eos = nixosSystem "x86_64-linux" "eos";
|
||||||
helios = nixosSystem "x86_64-linux" "helios";
|
helios = nixosSystem "x86_64-linux" "helios";
|
||||||
odyssey = nixosSystem "x86_64-linux" "odyssey";
|
odyssey = nixosSystem "x86_64-linux" "odyssey";
|
||||||
|
pi = nixosSystem "aarch64-linux" "pi";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{ inherit nixosConfigurations; };
|
{ inherit nixosConfigurations; };
|
||||||
|
18
hosts/pi/README.md
Normal file
18
hosts/pi/README.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Pi
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Raspberry Pi 4
|
||||||
|
|
||||||
|
## Specs
|
||||||
|
* SoC - Broadcom BCM2711
|
||||||
|
* CPU - ARM Cortex-A72 @ 1.8 GHz
|
||||||
|
* Memory - 8 GB LPDDR4
|
||||||
|
|
||||||
|
### Disks
|
||||||
|
Device | Partitions _(filesystem, usage)_
|
||||||
|
--- | ---
|
||||||
|
SD card | `/dev/sda1` (ext4, NixOS Root)
|
||||||
|
|
||||||
|
### Networks
|
||||||
|
- DHCP on `10.0.1.0/24` subnet.
|
||||||
|
- Tailscale on `100.64.0.0/10` subnet. FQDN: `pi.mesh.vimium.net`.
|
80
hosts/pi/default.nix
Normal file
80
hosts/pi/default.nix
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../server.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostId = "731d1660";
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
raspberry-pi."4" = {
|
||||||
|
apply-overlays-dtmerge.enable = true;
|
||||||
|
audio = false;
|
||||||
|
fkms-3d.enable = true;
|
||||||
|
xhci.enable = true;
|
||||||
|
};
|
||||||
|
deviceTree = {
|
||||||
|
enable = true;
|
||||||
|
filter = "*rpi-4-*.dtb";
|
||||||
|
overlays = [
|
||||||
|
{ name = "hifiberry-digi-pro"; dtboFile = "${pkgs.device-tree_rpi.overlays}/hifiberry-digi-pro.dtbo"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
firmware = with pkgs; [
|
||||||
|
firmwareLinuxNonfree
|
||||||
|
wireless-regdb
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
console.enable = false;
|
||||||
|
|
||||||
|
age.secrets."passwords/networks.age" = {
|
||||||
|
file = "../../secrets/passwords/networks.age";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
wireless = {
|
||||||
|
enable = true;
|
||||||
|
interfaces = [ "wlan0" ];
|
||||||
|
environmentFile = config.age.secrets."passwords/networks.age".path;
|
||||||
|
networks = {
|
||||||
|
"Apollo 600 Mbps".psk = "@PSK_APOLLO@";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
systemWide = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.shairport-sync = {
|
||||||
|
enable = true;
|
||||||
|
group = [ "pipewire" ];
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.zigbee2mqtt = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
homeassistant = true;
|
||||||
|
frontend = true;
|
||||||
|
permit_join = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libraspberrypi
|
||||||
|
raspberrypi-eeprom
|
||||||
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "22.11";
|
||||||
|
}
|
||||||
|
|
18
hosts/pi/hardware-configuration.nix
Normal file
18
hosts/pi/hardware-configuration.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
<nixos-hardware/raspberry-pi/4>
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.cleanTmpDir = true;
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = [ "noatime" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
console.keyMap = "uk";
|
console.keyMap = "uk";
|
||||||
|
|
||||||
|
documentation.enable = false;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
Reference in New Issue
Block a user