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" "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": { "nixos-cosmic": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -519,6 +534,7 @@
"determinate": "determinate", "determinate": "determinate",
"disko": "disko", "disko": "disko",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixos": "nixos",
"nixos-cosmic": "nixos-cosmic", "nixos-cosmic": "nixos-cosmic",
"nixos-facter-modules": "nixos-facter-modules", "nixos-facter-modules": "nixos-facter-modules",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",

View file

@ -36,6 +36,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1"; determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1";
nixos.url = "nixpkgs/nixos-24.05";
}; };
nixConfig = { nixConfig = {
@ -62,6 +63,7 @@
nixos-cosmic, nixos-cosmic,
zen-browser, zen-browser,
determinate, determinate,
nixos,
... ...
} @ inputs: { } @ inputs: {
nixosConfigurations = { nixosConfigurations = {
@ -141,6 +143,20 @@
./extras/minecraft-server.nix ./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, ...}: { {lib, ...}: {
disko.devices = { disko.devices = {
disk.disk1 = { disk.disk1 = {
device = lib.mkDefault "/dev/disk/by-diskseq/1"; device = lib.mkDefault "/dev/nvme0n1";
type = "disk"; type = "disk";
content = { content = {
type = "gpt"; type = "gpt";
@ -30,13 +30,13 @@
content = { content = {
type = "filesystem"; type = "filesystem";
format = "bcachefs"; format = "bcachefs";
mountOptions = ["noatime"]; mountOptions = [
mountpoint = "/"; "noatime"
extraArgs = [ "compression=zstd"
"--compression zstd" "background_compression=zstd"
"--background_compression zstd" "discard"
"--discard"
]; ];
mountpoint = "/";
# subvolumes = { # subvolumes = {
# "/home" = {}; # "/home" = {};
# "/nix" = {}; # "/nix" = {};