nixos-osaka-vultr-01 start config
This commit is contained in:
parent
2d49bb5440
commit
61f5e0e0cd
2 changed files with 46 additions and 21 deletions
|
@ -2,37 +2,24 @@
|
|||
imports = [ ];
|
||||
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.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# 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";
|
||||
virtualization.hyprvGuest.enable = true;
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
time.timeZone = "Asia/Tokyo";
|
||||
networking.hostName = "nixos-amd-osaka-01";
|
||||
networking.hostName = "nixos-osaka-vultr-01";
|
||||
|
||||
boot.loader.grub = {
|
||||
enableCryptodisk = true;
|
||||
#enableCryptodisk = true;
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
useOSProber = true;
|
||||
#device = "/dev/vda";
|
||||
#useOSProber = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
time.timezone = "Asia/Tokyo";
|
||||
}
|
38
nixos/hosts/nixos-osaka-vultr-01/disks.nix
Normal file
38
nixos/hosts/nixos-osaka-vultr-01/disks.nix
Normal 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 = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue