mirror of
https://github.com/lxstinthesky/matrix.git
synced 2025-11-03 17:32:44 +00:00
updated disko setup
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./users/users.nix
|
./users/users.nix
|
||||||
./modules/ssh.nix
|
./modules/ssh.nix
|
||||||
./hardware-configuration.nix
|
./vps/hetzner/hardware-configuration.nix
|
||||||
./modules/zsh.nix
|
./modules/zsh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -14,6 +14,10 @@
|
|||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
||||||
|
boot.kernelParams = [ "console=tty" ];
|
||||||
|
|
||||||
networking.hostName = "matrix";
|
networking.hostName = "matrix";
|
||||||
|
|
||||||
# time zone
|
# time zone
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
# other examples, see https://github.com/nix-community/disko/blob/master/example/
|
||||||
{
|
{
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
@@ -8,22 +8,24 @@
|
|||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
boot = {
|
|
||||||
size = "1M";
|
|
||||||
type = "EF02";
|
|
||||||
priority = 1;
|
|
||||||
};
|
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "512M";
|
size = "500M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
root = {
|
luks = {
|
||||||
size = "100%";
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "crypted";
|
||||||
|
settings.allowDiscards = true; # Enable SSD TRIM support
|
||||||
|
passwordFile = "/tmp/secret.key"; # install time key file location
|
||||||
|
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
@@ -35,4 +37,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "virtio_blk" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
# aarch64-linux?
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
}
|
|
||||||
11
nix/vps/hetzner/aarch64.nix
Normal file
11
nix/vps/hetzner/aarch64.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Specific settings for Hetzner Cloud AArch64 instances
|
||||||
|
# https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud#AArch64_(CAX_instance_type)_specifics
|
||||||
|
boot.initrd.kernelModules = [ "virtio_gpu" ];
|
||||||
|
boot.kernelParams = [ "console=tty" ];
|
||||||
|
|
||||||
|
# aarch64-linux
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||||
|
}
|
||||||
10
nix/vps/hetzner/hardware-configuration.nix
Normal file
10
nix/vps/hetzner/hardware-configuration.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
./aarch64.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user