mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-03-13 18:19:00 +00:00
hosts/ni: add disko device config
This commit is contained in:
parent
6c7939e7da
commit
9af237e242
@ -38,6 +38,10 @@ in
|
||||
})
|
||||
];
|
||||
|
||||
disko.devices = import ./disko.nix {
|
||||
disks = [ "/dev/nvme0n1" ];
|
||||
};
|
||||
|
||||
services.openssh.hostKeys = [{
|
||||
path = config.sops.secrets."ni/ssh-key".path;
|
||||
type = "ed25519";
|
||||
|
48
hosts/ni/disko.nix
Normal file
48
hosts/ni/disko.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ disks ? [ "/dev/nvme0n1" ], ... }:
|
||||
|
||||
{
|
||||
disk.nvme0n1 = {
|
||||
device = builtins.elemAt disks 0;
|
||||
type = "disk";
|
||||
content = {
|
||||
format = "gpt";
|
||||
type = "table";
|
||||
partitions = [
|
||||
{
|
||||
name = "root";
|
||||
start = "512MiB";
|
||||
end = "-8GiB";
|
||||
part-type = "primary";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
mountpoint = "/";
|
||||
format = "ext4";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
name = "ESP";
|
||||
start = "0";
|
||||
end = "512MiB";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
mountpoint = "/boot";
|
||||
format = "vfat";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
name = "swap";
|
||||
start = "-8GiB";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -42,22 +42,6 @@
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
label = "root";
|
||||
options = [
|
||||
"defaults"
|
||||
"noatime"
|
||||
];
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
label = "boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{ label = "swap"; }];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user