Skip to content

Commit

Permalink
Configure kenpachi with disko... hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Oct 29, 2024
1 parent 7750b85 commit e257d12
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 14 deletions.
1 change: 1 addition & 0 deletions hosts/kenpachi/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
imports = [
./configuration.nix
./disk.nix
./hardware-configuration.nix

../../modules/nixos
Expand Down
58 changes: 58 additions & 0 deletions hosts/kenpachi/disk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Example to create a bios compatible gpt partition
{ inputs, lib, ... }:
{
imports = [ inputs.disko.nixosModules.disko ];

disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
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"
];
};
};
};
};
};
};
}
40 changes: 26 additions & 14 deletions hosts/kenpachi/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:

{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/69fce8d5-9f64-494a-b4ea-020af548a346";
fsType = "ext4";
};
# fileSystems."/" =
# { device = "/dev/disk/by-uuid/69fce8d5-9f64-494a-b4ea-020af548a346";
# fsType = "ext4";
# };

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D372-C606";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
# fileSystems."/boot" =
# { device = "/dev/disk/by-uuid/D372-C606";
# fsType = "vfat";
# options = [ "fmask=0022" "dmask=0022" ];
# };

swapDevices = [ ];

Expand Down

0 comments on commit e257d12

Please sign in to comment.