diff --git a/nix-system-configs/modules/system/database.nix b/nix-system-configs/modules/system/database.nix index 499e8bc..a840cb8 100644 --- a/nix-system-configs/modules/system/database.nix +++ b/nix-system-configs/modules/system/database.nix @@ -45,6 +45,7 @@ in { (choose [./modules/toolsets/grafana_metric.nix ../toolsets/grafana_metric.nix]) (choose [./modules/secrets-config/sops-database.nix ../secrets-config/sops-database.nix]) (choose [./modules/system_scripts/gcloud_backup.nix ../system_scripts/gcloud_backup.nix]) + (modulesPath + "/profiles/qemu-guest.nix") ## TODO: Make this more elegant and less risky for unexpected errors happening. ] ++ lib.optional (builtins.pathExists ./hardware-configuration.nix) ./hardware-configuration.nix @@ -56,6 +57,34 @@ in { local.userDescription = "NixOS Dedicated Database"; local.address = "10.1.1.251"; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + # Filesystems (explicitly configured) + fileSystems."/" = { + device = "/dev/disk/by-uuid/0ebe91dc-d396-43d1-8111-5d48a69868eb"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/home" = { + device = "/dev/disk/by-uuid/0ebe91dc-d396-43d1-8111-5d48a69868eb"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D517-B83D"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + networking.firewall.allowedTCPPorts = [ 5432 # PostgreSQL 3306 # MariaDB/MySQL