Skip to content

Commit

Permalink
Add disko option for aizen
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Feb 7, 2025
1 parent 19c31d7 commit 0f32b6b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
# Firewall
# narouter.usernames = [ "mirza" ];
# Server
# aizen.usernames = [ "mirza" ];
aizen.usernames = [ "mirza" ];

# Work
# Crappy Work PC
Expand Down
1 change: 1 addition & 0 deletions systems/aizen/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
imports = [
./configuration.nix
./disk.nix
./hardware-configuration.nix
];
}
60 changes: 60 additions & 0 deletions systems/aizen/disk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Example to create a bios compatible gpt partition
{ inputs, lib, ... }:
{
imports = [ inputs.disko.nixosModules.disko ];

config = {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/vda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
};
}

0 comments on commit 0f32b6b

Please sign in to comment.