bcachefs iso

This commit is contained in:
Tao Tien 2024-10-14 00:11:06 -07:00
parent d8ce8bddef
commit c5414fa008
3 changed files with 39 additions and 7 deletions

16
flake.lock generated
View file

@ -316,6 +316,21 @@
"url": "https://flakehub.com/f/NixOS/nix/%3D2.24.9"
}
},
"nixos": {
"locked": {
"lastModified": 1728740863,
"narHash": "sha256-u+rxA79a0lyhG+u+oPBRtTDtzz8kvkc9a6SWSt9ekVc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a3f9ad65a0bf298ed5847629a57808b97e6e8077",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"type": "indirect"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -519,6 +534,7 @@
"determinate": "determinate",
"disko": "disko",
"home-manager": "home-manager_2",
"nixos": "nixos",
"nixos-cosmic": "nixos-cosmic",
"nixos-facter-modules": "nixos-facter-modules",
"nixos-hardware": "nixos-hardware",

View file

@ -36,6 +36,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1";
nixos.url = "nixpkgs/nixos-24.05";
};
nixConfig = {
@ -62,6 +63,7 @@
nixos-cosmic,
zen-browser,
determinate,
nixos,
...
} @ inputs: {
nixosConfigurations = {
@ -141,6 +143,20 @@
./extras/minecraft-server.nix
];
};
bcachefs-iso = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
({
lib,
pkgs,
...
}: {
boot.supportedFilesystems = ["bcachefs"];
boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
})
];
};
};
};
}

View file

@ -1,7 +1,7 @@
{lib, ...}: {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/disk/by-diskseq/1";
device = lib.mkDefault "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
@ -30,13 +30,13 @@
content = {
type = "filesystem";
format = "bcachefs";
mountOptions = ["noatime"];
mountpoint = "/";
extraArgs = [
"--compression zstd"
"--background_compression zstd"
"--discard"
mountOptions = [
"noatime"
"compression=zstd"
"background_compression=zstd"
"discard"
];
mountpoint = "/";
# subvolumes = {
# "/home" = {};
# "/nix" = {};