mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-18 17:09:37 +00:00
iron: init
add installer for macbook-pro-2009 repurpose tungsten disko config for iron installer-macbook-pro-2009: enable b43 driver README: document how to wipe filesystem iron: generate hardware-configuration iron: discard unused modules iron: include macbook specific modules iron: remove custom fs configurations
This commit is contained in:
parent
1e63c7bb53
commit
99b1dda7ba
19 changed files with 761 additions and 1 deletions
95
nix/disko/iron/btrfs.nix
Normal file
95
nix/disko/iron/btrfs.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Use LUKS for disk encryption
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ ];
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Use LVM to create a partition for swap
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
# Set swap device as resume device
|
||||
swap = {
|
||||
size = "4G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Use btrfs over ext4 for:
|
||||
# - compression
|
||||
# nix store can be shrinked using this feature
|
||||
# - more transparent partitions (subvolumes)
|
||||
# no more "I need more space here and not there"
|
||||
btrfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
|
||||
mountpoint = "/btrfs-root";
|
||||
|
||||
# # DANGER:
|
||||
# # Override existing partition at partition creation
|
||||
# extraArgs = ["-f"];
|
||||
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue