From a3f6cdbf684a45d376d8dd02e7c8530325e5e973 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Wed, 10 Dec 2025 12:03:16 +0700 Subject: [PATCH] mob next [ci-skip] [ci skip] [skip ci] lastFile:inventories/default.nix --- inventories/default.nix | 1 + machines/buna/configuration.nix | 13 ++++++++ machines/buna/disko.nix | 56 +++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 machines/buna/configuration.nix create mode 100644 machines/buna/disko.nix diff --git a/inventories/default.nix b/inventories/default.nix index c5f0bd9..e5281c9 100644 --- a/inventories/default.nix +++ b/inventories/default.nix @@ -19,6 +19,7 @@ "alpheratz" "mirach" "adhil" + "buna" ]; }; diff --git a/machines/buna/configuration.nix b/machines/buna/configuration.nix new file mode 100644 index 0000000..88a9d14 --- /dev/null +++ b/machines/buna/configuration.nix @@ -0,0 +1,13 @@ +{ config, ... }: +{ + nixpkgs.hostPlatform = { + system = "x86_64-linux"; + }; + system.stateVersion = "25.11"; + clan.core.sops.defaultGroups = [ "admins" ]; + # clan.core.networking.targetHost = "root@"; + + clan.meta.name = "buna"; + clan.meta.description = "Radxa X4 SBC board for one of w phone network. (With w whitehouse)"; + +} diff --git a/machines/buna/disko.nix b/machines/buna/disko.nix new file mode 100644 index 0000000..e51f90f --- /dev/null +++ b/machines/buna/disko.nix @@ -0,0 +1,56 @@ +{ ... }: +let + hashDisk = disk: "os-${builtins.substring 0 5 (builtins.hashString "sha256" disk)}"; + os = "/dev/disk/by-id/usb-Generic_MassStorageClass_000000001539-0:0"; +in +{ + + boot.loader = { + systemd-boot = { + enable = true; + }; + efi = { + canTouchEfiVariables = true; + }; + }; + + disko.devices = { + disk = { + "os-${hashDisk os}" = { + type = "disk"; + device = os; + content = { + type = "gpt"; + partitions = { + ESP = { + end = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + name = "root"; + end = "-0"; + content = { + type = "filesystem"; + format = "f2fs"; + mountpoint = "/"; + extraArgs = [ + "-O" + "extra_attr,inode_checksum,sb_checksum,compression" + ]; + mountOptions = [ + "compress_algorithm=zstd:6,compress_chksum,atgc,gc_merge,lazytime,nodiscard" + ]; + }; + }; + }; + }; + }; + }; + }; +}