This commit is contained in:
Fern Garden 2025-07-04 21:37:09 +08:00
parent 9678036869
commit 82ccb37f5e
5 changed files with 59 additions and 39 deletions

View file

@ -11,7 +11,7 @@
# Allow unfree packages. # Allow unfree packages.
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Set time zone. # Set time zone.
time.timeZone = "Australia/Perth"; time.timeZone = "Australia/Perth";
@ -109,4 +109,4 @@
enable = true; enable = true;
nssmdns4 = true; nssmdns4 = true;
}; };
} }

View file

@ -1,6 +1,6 @@
{ {
# Configure the bootloader. # Configure the bootloader.
boot.loader.grub = { boot.loader.grub = {
enable = true; enable = true;
device = "/dev/sda"; device = "/dev/sda";
}; };

View file

@ -5,7 +5,7 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; # Stable nixpkgs. nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; # Stable nixpkgs.
lanzaboote.url = "github:nix-community/lanzaboote"; # Secure boot. lanzaboote.url = "github:nix-community/lanzaboote"; # Secure boot.
nixos-hardware.url = "github:NixOS/nixos-hardware"; # Hardware specific config. nixos-hardware.url = "github:NixOS/nixos-hardware"; # Hardware specific config.
# Updated packages. # Updated packages.
fluffychat2.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0 fluffychat2.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0
feishin0_16_0.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.16.0 feishin0_16_0.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.16.0
@ -47,20 +47,20 @@
modules = [ modules = [
{ networking.hostName = "minecraft"; } { networking.hostName = "minecraft"; }
./configuration/common.nix ./configuration/common.nix
./configuration/vm.nix ./configuration/vm.nix
./hardware-configuration/vm-minecraft.nix # Include the results of the hardware scan. ./hardware-configuration/vm-minecraft.nix # Include the results of the hardware scan.
]; ];
}; };
nixosConfigurations.lxc-technitium = nixpkgs.lib.nixosSystem { nixosConfigurations.lxc-technitium = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
(nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix") (nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
{ {
networking.hostName = "technitium"; networking.hostName = "technitium";
services.technitium-dns-server = { services.technitium-dns-server = {
@ -79,7 +79,7 @@
modules = [ modules = [
(nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix") (nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
{ {
networking.hostName = "firefox-syncserver"; networking.hostName = "firefox-syncserver";
services.mysql.package = nixpkgs.legacyPackages.${system}.mariadb; services.mysql.package = nixpkgs.legacyPackages.${system}.mariadb;

View file

@ -1,27 +1,41 @@
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/63d79656-aa5b-466a-b369-be5eac3f51ab"; device = "/dev/disk/by-uuid/63d79656-aa5b-466a-b369-be5eac3f51ab";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-93fa00bc-777f-4359-bad5-880c29faca0d".device = "/dev/disk/by-uuid/93fa00bc-777f-4359-bad5-880c29faca0d"; boot.initrd.luks.devices."luks-93fa00bc-777f-4359-bad5-880c29faca0d".device =
"/dev/disk/by-uuid/93fa00bc-777f-4359-bad5-880c29faca0d";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/EBD7-3E1C"; device = "/dev/disk/by-uuid/EBD7-3E1C";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];

View file

@ -1,30 +1,36 @@
{ lib, modulesPath, ... }: { lib, modulesPath, ... }:
{ {
imports = imports = [
[ (modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ]; boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/cbd70e61-fcdc-4b1f-af03-d3da8a2866ea"; device = "/dev/disk/by-uuid/cbd70e61-fcdc-4b1f-af03-d3da8a2866ea";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/home/docker/volumes" = fileSystems."/home/docker/volumes" = {
{ device = "/dev/disk/by-uuid/3730e48a-8784-4c49-8692-473c9b4bc8c3"; device = "/dev/disk/by-uuid/3730e48a-8784-4c49-8692-473c9b4bc8c3";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/3123f58e-63a9-44fa-ac29-3e79dc520b8f"; } { device = "/dev/disk/by-uuid/3123f58e-63a9-44fa-ac29-3e79dc520b8f"; }
]; ];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
} }