Test
This commit is contained in:
parent
914982bbd6
commit
eda2899a46
2 changed files with 55 additions and 35 deletions
|
@ -1,5 +1,7 @@
|
||||||
{ config, lib, pkgs, modulesPath, desktop, username, ... }: {
|
{ config, lib, pkgs, modulesPath, desktop, username, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
# This machine won't be using secureboot
|
||||||
|
../../common/modules/boot.nix
|
||||||
./disks.nix
|
./disks.nix
|
||||||
];
|
];
|
||||||
nixpkgs.config.allowUnfree = false;
|
nixpkgs.config.allowUnfree = false;
|
||||||
|
|
|
@ -1,39 +1,57 @@
|
||||||
{
|
{
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.initrd.luks.devices."vda2".device = "/dev/vda2";
|
boot.initrd.luks.devices."vda2".device = "/dev/vda2";
|
||||||
disko.devices = {
|
services.btrfs.autoScrub.enable = true;
|
||||||
disk = {
|
services.btrfs.autoScrub.interval = "weekly";
|
||||||
vda = {
|
|
||||||
type = "disk";
|
disko.devices.disk.vda = {
|
||||||
device = "/dev/vda";
|
device = "/dev/vda";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "table";
|
||||||
partitions = {
|
format = "gpt";
|
||||||
ESP = {
|
partitions = [
|
||||||
size = "100M";
|
{
|
||||||
type = "EF00";
|
name = "BOOT";
|
||||||
|
start = "0%";
|
||||||
|
end = "550MiB";
|
||||||
|
bootable = true;
|
||||||
|
flags = [ "esp" ];
|
||||||
|
fs-type = "fat32";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
};
|
};
|
||||||
};
|
} # partition 1 (ESP)
|
||||||
luks = {
|
{
|
||||||
size = "100%";
|
name = "LUKS";
|
||||||
|
start = "550MiB";
|
||||||
|
end = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "crypted";
|
name = "ROOT";
|
||||||
extraOpenArgs = [ "--allow-discards" ];
|
extraOpenArgs = [ "--allow-discards" ];
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "btrfs";
|
||||||
format = "ext4";
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
};
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
};
|
}; # root
|
||||||
};
|
"/home" = {
|
||||||
};
|
mountpoint = "/home";
|
||||||
};
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
};
|
}; # home
|
||||||
};
|
"/nix" = {
|
||||||
};
|
mountpoint = "/nix";
|
||||||
}
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
}; # nix
|
||||||
|
}; # subvolumes
|
||||||
|
}; # content.content
|
||||||
|
}; # content
|
||||||
|
} # partition 2 (/ BTRFS)
|
||||||
|
]; # partitions
|
||||||
|
}; # content
|
||||||
|
}; # disko.devices.disk.vda
|
||||||
|
} # root
|
Loading…
Reference in a new issue