nixos-osaka-vultr-01 start config

This commit is contained in:
iFargle 2023-09-20 19:40:48 +09:00
parent 2d49bb5440
commit 61f5e0e0cd
2 changed files with 46 additions and 21 deletions

View file

@ -1,38 +1,25 @@
{ config, lib, pkgs, modulesPath, desktop, username, ... }: { { config, lib, pkgs, modulesPath, desktop, username, ... }: {
imports = [ ]; imports = [ ];
nixpkgs.config.allowUnfree = false; nixpkgs.config.allowUnfree = false;
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "virtio_pci" "virtio_blk" "sr_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
virtualization.hyprvGuest.enable = true;
# For cross-architecture builds
boot.binfmt.emulatedSystems = [
"aarch64-linux"
"armv7l-linux"
];
fileSystems."/" = {
device = "/dev/mapper/DISK";
fsType = "btrfs";
options = [ "subvol=@" ];
};
boot.initrd.luks.devices."DISK".device = "/dev/vda";
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
time.timeZone = "Asia/Tokyo"; time.timeZone = "Asia/Tokyo";
networking.hostName = "nixos-amd-osaka-01"; networking.hostName = "nixos-osaka-vultr-01";
boot.loader.grub = { boot.loader.grub = {
enableCryptodisk = true; #enableCryptodisk = true;
enable = true; enable = true;
device = "/dev/vda"; #device = "/dev/vda";
useOSProber = true; #useOSProber = true;
}; };
networking.firewall.allowedTCPPorts = [ 22 ]; networking.firewall.allowedTCPPorts = [ 22 ];
time.timezone = "Asia/Tokyo";
} }

View file

@ -0,0 +1,38 @@
{
disko.devices = {
disk = {
vdb = {
type = "disk";
device = "/dev/vda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "100M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = [ "--allow-discards" ];
passwordFile = "/tmp/secret.key";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
}