Guest User

Untitled

a guest
May 17th, 2026
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  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
  3. # and in the NixOS manual (accessible by running ‘nixos-help’).
  4.  
  5. { config, pkgs, ... }:
  6.  
  7. {
  8. imports =
  9. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ];
  12.  
  13. # Bootloader.
  14. boot.loader.systemd-boot.enable = true;
  15. boot.loader.efi.canTouchEfiVariables = true;
  16.  
  17. networking.hostName = "nixos"; # Define your hostname.
  18. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  19.  
  20. # Configure network proxy if necessary
  21. # networking.proxy.default = "http://user:password@proxy:port/";
  22. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  23.  
  24. # Enable networking
  25. networking.networkmanager.enable = true;
  26.  
  27. # Set your time zone.
  28. time.timeZone = "Europe/Budapest";
  29.  
  30. # Select internationalisation properties.
  31. i18n.defaultLocale = "en_US.UTF-8";
  32.  
  33. i18n.extraLocaleSettings = {
  34. LC_ADDRESS = "hu_HU.UTF-8";
  35. LC_IDENTIFICATION = "hu_HU.UTF-8";
  36. LC_MEASUREMENT = "hu_HU.UTF-8";
  37. LC_MONETARY = "hu_HU.UTF-8";
  38. LC_NAME = "hu_HU.UTF-8";
  39. LC_NUMERIC = "hu_HU.UTF-8";
  40. LC_PAPER = "hu_HU.UTF-8";
  41. LC_TELEPHONE = "hu_HU.UTF-8";
  42. LC_TIME = "hu_HU.UTF-8";
  43. };
  44.  
  45. # Configure keymap in X11
  46. services.xserver.xkb = {
  47. layout = "hu";
  48. variant = "";
  49. };
  50.  
  51. # Configure console keymap
  52. console.keyMap = "hu";
  53.  
  54. # Define a user account. Don't forget to set a password with ‘passwd’.
  55. users.users.admin = {
  56. isNormalUser = true;
  57. description = "admin";
  58. extraGroups = [ "networkmanager" "wheel" ];
  59. packages = with pkgs; [];
  60. };
  61.  
  62. # Allow unfree packages
  63. nixpkgs.config.allowUnfree = true;
  64.  
  65. # List packages installed in system profile. To search, run:
  66. # $ nix search wget
  67. environment.systemPackages = with pkgs; [
  68. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  69. wget
  70. htop
  71. fastfetch
  72. cowsay
  73. mdadm
  74. samba
  75. ];
  76.  
  77. # Some programs need SUID wrappers, can be configured further or are
  78. # started in user sessions.
  79. # programs.mtr.enable = true;
  80. # programs.gnupg.agent = {
  81. # enable = true;
  82. # enableSSHSupport = true;
  83. # };
  84.  
  85. # List services that you want to enable:
  86.  
  87. # Enable the OpenSSH daemon.
  88. services.openssh = {
  89. enable = true;
  90. settings = {
  91. PasswordAuthentication = true;
  92. PermitRootLogin = "yes";
  93. };
  94. };
  95.  
  96. # Open ports in the firewall.
  97. networking.firewall.allowedTCPPorts = [ 22 80 443 ];
  98. # networking.firewall.allowedUDPPorts = [ ... ];
  99. # Or disable the firewall altogether.
  100. # networking.firewall.enable = false;
  101.  
  102. boot.swraid.enable = true;
  103.  
  104. fileSystems."/mnt/raid1" = {
  105. device = "/dev/md0";
  106. fsType = "ext4";
  107. };
  108.  
  109. services.samba = {
  110. enable = true;
  111. openFirewall = true;
  112.  
  113. settings = {
  114. global = {
  115. workgroup = "WORKGROUP";
  116. security = "user";
  117. };
  118.  
  119. raid = {
  120. path = "/mnt/raid1";
  121. browsable = "yes";
  122. writable = "yes";
  123. "guest ok" = "yes";
  124. "valid users" = "sambauser";
  125. };
  126. };
  127. };
  128.  
  129. users.users.sambauser = {
  130. isNormalUser = true;
  131. description = "Samba User";
  132. extraGroups = [ "wheel" ];
  133. initialPassword = "smb";
  134. };
  135.  
  136. services.nginx = {
  137. enable = true;
  138.  
  139. virtualHosts."bodornorbert.tk" = {
  140. root = "/var/www/site";
  141. };
  142. };
  143.  
  144. # This value determines the NixOS release from which the default
  145. # settings for stateful data, like file locations and database versions
  146. # on your system were taken. It‘s perfectly fine and recommended to leave
  147. # this value at the release version of the first install of this system.
  148. # Before changing this value read the documentation for this option
  149. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  150. system.stateVersion = "25.11"; # Did you read the comment?
  151.  
  152. }
Advertisement
Add Comment
Please, Sign In to add comment