This commit is contained in:
2026-01-21 16:54:09 +00:00
parent d294038801
commit dfbc1ea5a2
4 changed files with 76 additions and 27 deletions

View File

@@ -1,10 +1,10 @@
{ inputs, ... }:
{ inputs, lib, ... }:
{
imports = [ inputs.disko.nixosModules.disko ];
disko.devices = {
disk = {
main = {
device = "/dev/mmcblk0";
device = "/dev/disk/by-label/NIXOS_SD";
type = "disk";
content = {
type = "gpt";
@@ -36,24 +36,9 @@
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";
};
};
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};

View File

@@ -1,7 +1,36 @@
{ lib, inputs, ... }:
{
lib,
inputs,
modulesPath,
...
}:
{
imports = [
./disks.nix
# ./disks.nix
inputs.nixos-hardware.nixosModules.raspberry-pi-4
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
boot.supportedFilesystems = lib.mkForce [
"btrfs"
"reiserfs"
"vfat"
"ext4"
"f2fs"
"xfs"
"ntfs"
"cifs"
];
nixpkgs.overlays = [
# https://github.com/NixOS/nixpkgs/issues/126755#issuecomment-869149243
(final: super: {
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
})
];
}