feat(ymir): add simple disko config.
This commit is contained in:
parent
f5278e1255
commit
52f8b67bf4
3 changed files with 67 additions and 0 deletions
|
@ -270,6 +270,8 @@
|
|||
# Still no specific modules here
|
||||
# ./modules/cross-platform/nixos
|
||||
agenix.nixosModules.default
|
||||
# Use disko for creating filesystem
|
||||
disko.nixosModules.disko
|
||||
# Setup home manager for my user
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
|
|
64
hosts/ymir/disk-config.nix
Normal file
64
hosts/ymir/disk-config.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["umask=0077"];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypt";
|
||||
passwordFile = "/tmp/secret.key"; # Interactive
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
keyFile = "/tmp/secret.key";
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue