2024-06-12 18:50:57 +07:00
|
|
|
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
|
|
|
# and may be overwritten by future invocations. Please make changes
|
|
|
|
|
# to /etc/nixos/configuration.nix instead.
|
2024-10-21 12:31:30 +07:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
modulesPath,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
|
|
|
|
{
|
2024-10-21 12:31:30 +07:00
|
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
2024-09-02 14:10:05 +07:00
|
|
|
|
config = {
|
2024-10-21 12:31:30 +07:00
|
|
|
|
boot.initrd.availableKernelModules = [
|
|
|
|
|
"xhci_pci"
|
|
|
|
|
"ahci"
|
|
|
|
|
"nvme"
|
|
|
|
|
"usbhid"
|
|
|
|
|
"usb_storage"
|
|
|
|
|
"sd_mod"
|
|
|
|
|
];
|
2024-09-02 14:10:05 +07:00
|
|
|
|
boot.initrd.kernelModules = [ ];
|
2024-10-21 12:31:30 +07:00
|
|
|
|
boot.kernelModules = [
|
|
|
|
|
"kvm-amd"
|
|
|
|
|
"nct6775"
|
|
|
|
|
];
|
2024-09-02 14:10:05 +07:00
|
|
|
|
boot.extraModulePackages = [ ];
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
2024-10-21 12:31:30 +07:00
|
|
|
|
fileSystems."/" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/439a1beb-1443-495b-9891-012605819803";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
2024-09-02 14:10:05 +07:00
|
|
|
|
|
2024-10-21 12:31:30 +07:00
|
|
|
|
fileSystems."/boot" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/47A1-0296";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
options = [
|
|
|
|
|
"fmask=0022"
|
|
|
|
|
"dmask=0022"
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
2024-09-02 14:10:05 +07:00
|
|
|
|
fileSystems."/nas" = {
|
|
|
|
|
device = "/dev/disk/by-label/WD_RED_4T_1";
|
2024-06-12 18:50:57 +07:00
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
2024-09-02 14:10:05 +07:00
|
|
|
|
fileSystems."/nas/public/Music" = {
|
|
|
|
|
device = "/nas/Syncthing/Sync/Music";
|
|
|
|
|
fsType = "auto";
|
|
|
|
|
options = [
|
|
|
|
|
"defaults"
|
|
|
|
|
"nofail"
|
|
|
|
|
"nobootwait"
|
|
|
|
|
"bind"
|
|
|
|
|
];
|
2024-06-12 18:50:57 +07:00
|
|
|
|
};
|
2024-09-02 14:10:05 +07:00
|
|
|
|
fileSystems."/nas/public/Public" = {
|
|
|
|
|
device = "/nas/Syncthing/Sync/Public";
|
|
|
|
|
fsType = "auto";
|
|
|
|
|
options = [
|
|
|
|
|
"defaults"
|
|
|
|
|
"nofail"
|
|
|
|
|
"nobootwait"
|
|
|
|
|
"bind"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
fileSystems = {
|
|
|
|
|
"/nas/telemetry/grafana" = lib.mkIf config.profile.services.telemetry.grafana.enable {
|
|
|
|
|
device = "/var/lib/grafana";
|
|
|
|
|
fsType = "auto";
|
|
|
|
|
options = [
|
|
|
|
|
"defaults"
|
|
|
|
|
"nofail"
|
|
|
|
|
"nobootwait"
|
|
|
|
|
"bind"
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
2024-09-02 14:10:05 +07:00
|
|
|
|
"/nas/telemetry/loki" = lib.mkIf config.profile.services.telemetry.loki.enable {
|
|
|
|
|
device = "/var/lib/loki";
|
|
|
|
|
fsType = "auto";
|
|
|
|
|
options = [
|
|
|
|
|
"defaults"
|
|
|
|
|
"nofail"
|
|
|
|
|
"nobootwait"
|
|
|
|
|
"bind"
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-09-02 18:17:03 +07:00
|
|
|
|
|
|
|
|
|
"/nas/telemetry/tempo" = lib.mkIf config.profile.services.telemetry.tempo.enable {
|
|
|
|
|
device = "/var/lib/tempo";
|
|
|
|
|
fsType = "auto";
|
|
|
|
|
options = [
|
|
|
|
|
"defaults"
|
|
|
|
|
"nofail"
|
|
|
|
|
"nobootwait"
|
|
|
|
|
"bind"
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-09-07 10:27:25 +07:00
|
|
|
|
|
|
|
|
|
"/nas/telemetry/mimir" = lib.mkIf config.profile.services.telemetry.mimir.enable {
|
|
|
|
|
device = "/var/lib/mimir";
|
|
|
|
|
fsType = "auto";
|
|
|
|
|
options = [
|
|
|
|
|
"defaults"
|
|
|
|
|
"nofail"
|
|
|
|
|
"nobootwait"
|
|
|
|
|
"bind"
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-09-02 14:10:05 +07:00
|
|
|
|
};
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
2024-09-02 14:10:05 +07:00
|
|
|
|
swapDevices = [ ];
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
2024-09-02 14:10:05 +07:00
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
|
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
|
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
|
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
|
networking.defaultGateway = "192.168.100.1";
|
|
|
|
|
networking.interfaces.enp9s0 = {
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
ipv4.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "192.168.100.3";
|
|
|
|
|
prefixLength = 24;
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
address = "192.168.100.4";
|
|
|
|
|
prefixLength = 24;
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
address = "192.168.100.5";
|
|
|
|
|
prefixLength = 24;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-06-12 18:50:57 +07:00
|
|
|
|
|
2024-11-24 20:16:30 +07:00
|
|
|
|
services.nginx.virtualHosts."public.tigor.web.id" = {
|
|
|
|
|
enableACME = true;
|
|
|
|
|
forceSSL = true;
|
|
|
|
|
locations."/" = {
|
|
|
|
|
root = "/nas/public";
|
|
|
|
|
tryFiles = "$uri $uri/ $uri.html =404";
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
autoindex on;
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-08-17 11:24:57 +07:00
|
|
|
|
|
2024-09-02 14:10:05 +07:00
|
|
|
|
systemd.tmpfiles.settings = {
|
|
|
|
|
"100-nas-public-dir" = {
|
|
|
|
|
"/nas/public" = {
|
|
|
|
|
d = {
|
|
|
|
|
group = config.profile.user.name;
|
|
|
|
|
mode = "0777";
|
|
|
|
|
user = config.profile.user.name;
|
|
|
|
|
};
|
2024-08-17 11:24:57 +07:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-02 14:10:05 +07:00
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
hardware.enableAllFirmware = true;
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
2024-11-24 12:07:59 +07:00
|
|
|
|
hardware.graphics = {
|
2024-09-02 14:10:05 +07:00
|
|
|
|
enable = true;
|
2024-11-24 12:07:59 +07:00
|
|
|
|
enable32Bit = true;
|
2024-09-02 14:10:05 +07:00
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
|
intel-media-driver
|
|
|
|
|
intel-vaapi-driver
|
|
|
|
|
libvdpau-va-gl
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-10-21 12:31:30 +07:00
|
|
|
|
environment.sessionVariables = {
|
|
|
|
|
LIBVA_DRIVER_NAME = "iHD";
|
|
|
|
|
}; # Force intel-media-driver
|
2024-07-26 15:53:53 +07:00
|
|
|
|
};
|
2024-06-12 18:50:57 +07:00
|
|
|
|
}
|