configuration.nix 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Edit this configuration file to define what should be installed on
  2. # your system. Help is available in the configuration.nix(5) man page, on
  3. # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
  4. {
  5. lib,
  6. config,
  7. pkgs,
  8. ...
  9. }:
  10. {
  11. imports = [
  12. # Include the results of the hardware scan.
  13. ./hardware-configuration.nix
  14. ];
  15. networking.hostName = "sforza"; # Define your hostname.
  16. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
  17. # Use the systemd-boot EFI boot loader.
  18. boot = {
  19. loader = {
  20. systemd-boot.enable = true;
  21. systemd-boot.configurationLimit = 3;
  22. efi.canTouchEfiVariables = true;
  23. efi.efiSysMountPoint = "/boot";
  24. };
  25. initrd = {
  26. availableKernelModules = [
  27. "nvme"
  28. "xhci_pci"
  29. "ahci"
  30. "usbhid"
  31. "usb_storage"
  32. "sd_mod"
  33. ];
  34. kernelModules = [
  35. "amdgpu"
  36. "bcachefs"
  37. "btrfs"
  38. "dm-snapshot"
  39. ];
  40. };
  41. kernelModules = [ "kvm-amd" ];
  42. extraModulePackages = [ ];
  43. supportedFilesystems = [
  44. "btrfs"
  45. "ntfs"
  46. "xfs"
  47. ];
  48. kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
  49. };
  50. # OpenGL
  51. hardware = {
  52. bluetooth = {
  53. enable = true;
  54. settings = {
  55. General = {
  56. Experimental = true;
  57. };
  58. };
  59. };
  60. graphics = {
  61. enable = true;
  62. enable32Bit = true;
  63. extraPackages = with pkgs; [
  64. rocmPackages.clr.icd
  65. rocmPackages.clr
  66. ];
  67. };
  68. };
  69. sops.secrets."asfIpcPassword" = {
  70. owner = config.systemd.services.archisteamfarm.serviceConfig.User;
  71. };
  72. services = {
  73. # ArchiSteamFarm
  74. archisteamfarm = {
  75. enable = true;
  76. settings = {
  77. Statistics = false;
  78. PluginsUpdateMode = 1;
  79. AutoClaimItemBotNames = "ASF";
  80. AutoClaimItemPeriod = 23;
  81. };
  82. ipcPasswordFile = config.sops.secrets."asfIpcPassword".path;
  83. ipcSettings = {
  84. Kestrel = {
  85. Endpoints = {
  86. HTTP = {
  87. Url = "http://*:1242";
  88. };
  89. };
  90. };
  91. };
  92. };
  93. };
  94. # Select internationalisation properties.
  95. i18n.defaultLocale = "en_US.UTF-8";
  96. console = {
  97. font = "Lat2-Terminus16";
  98. keyMap = lib.mkForce "us";
  99. useXkbConfig = true; # use xkb.options in tty.
  100. };
  101. }