wip(rpi-5): working on rpi-5 server support
This commit is contained in:
12
flake.nix
12
flake.nix
@@ -63,6 +63,7 @@
|
|||||||
url = "github:Nixos/nixpkgs?rev=8fcb6f1c4948305af52d19f887b89011ee2c080d";
|
url = "github:Nixos/nixpkgs?rev=8fcb6f1c4948305af52d19f887b89011ee2c080d";
|
||||||
};
|
};
|
||||||
font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher";
|
font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher";
|
||||||
|
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
inputs@{
|
inputs@{
|
||||||
@@ -154,6 +155,7 @@
|
|||||||
};
|
};
|
||||||
inherit (utils) mkHost;
|
inherit (utils) mkHost;
|
||||||
configurations = [
|
configurations = [
|
||||||
|
# Desktops
|
||||||
(mkHost {
|
(mkHost {
|
||||||
hardware = "doloro";
|
hardware = "doloro";
|
||||||
host = "doloro";
|
host = "doloro";
|
||||||
@@ -173,6 +175,16 @@
|
|||||||
rocmSupport = false;
|
rocmSupport = false;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
# Servers
|
||||||
|
(mkHost {
|
||||||
|
hardware = "rpi-5";
|
||||||
|
host = "rpi-5";
|
||||||
|
system = "aarch64-linux";
|
||||||
|
stateVersion = "25.11";
|
||||||
|
nixpkgsConfig = {
|
||||||
|
rocmSupport = false;
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
(utils.deepMerge configurations);
|
(utils.deepMerge configurations);
|
||||||
|
|||||||
64
hardwares/rpi-5/disks.nix
Normal file
64
hardwares/rpi-5/disks.nix
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ inputs.disko.nixosModules.disko ];
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
device = "/dev/mmcblk0";
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
name = "boot";
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02";
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
name = "ESP";
|
||||||
|
priority = 1;
|
||||||
|
size = "4G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plainSwap = {
|
||||||
|
size = "8G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
discardPolicy = "both"; # Both "once" and page discard policies
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # Override existing partition
|
||||||
|
# Subvolumes must set a mountpoint in order to be mounted,
|
||||||
|
# unless their parent is mounted
|
||||||
|
subvolumes = {
|
||||||
|
# Subvolume name is different from mountpoint
|
||||||
|
"@" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
# Subvolume name is the same as the mountpoint
|
||||||
|
"@home" = {
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
# Parent is not mounted so the mountpoint must be set
|
||||||
|
"@nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
1
hardwares/rpi-5/home.nix
Normal file
1
hardwares/rpi-5/home.nix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{...}: {}
|
||||||
7
hardwares/rpi-5/nixos.nix
Normal file
7
hardwares/rpi-5/nixos.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ lib, inputs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./disks.nix
|
||||||
|
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user