NixOS configs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
4.3 KiB

3 years ago
  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. { config, pkgs, ... }:
  5. {
  6. imports =
  7. [ # Include the results of the hardware scan.
  8. ./hardware-configuration.nix
  9. ./home.nix
  10. ];
  11. # Use the GRUB 2 boot loader.
  12. boot.loader.grub.enable = true;
  13. boot.loader.grub.version = 2;
  14. # boot.loader.grub.efiSupport = true;
  15. # boot.loader.grub.efiInstallAsRemovable = true;
  16. # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  17. # Define on which hard drive you want to install Grub.
  18. boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
  19. networking.hostName = "nixbox"; # Define your hostname.
  20. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  21. # Set your time zone.
  22. time.timeZone = "US/Eastern";
  23. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  24. # Per-interface useDHCP will be mandatory in the future, so this generated config
  25. # replicates the default behaviour.
  26. networking.useDHCP = false;
  27. networking.interfaces.enp1s0.useDHCP = true;
  28. # Configure network proxy if necessary
  29. # networking.proxy.default = "http://user:password@proxy:port/";
  30. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  31. # Select internationalisation properties.
  32. i18n.defaultLocale = "en_US.UTF-8";
  33. console = {
  34. font = "Lat2-Terminus16";
  35. keyMap = "us";
  36. };
  37. # Enable the X11 windowing system.
  38. services.xserver.enable = true;
  39. services.xserver.displayManager.startx.enable = true;
  40. # use nix flakes
  41. nix = {
  42. package = pkgs.nixFlakes; # or versioned attributes like nix_2_7
  43. extraOptions = ''
  44. experimental-features = nix-command flakes
  45. '';
  46. };
  47. # Configure keymap in X11
  48. services.xserver.layout = "us";
  49. services.xserver.xkbOptions = "eurosign:e";
  50. # Enable CUPS to print documents.
  51. # services.printing.enable = true;
  52. # Enable sound.
  53. sound.enable = true;
  54. hardware.pulseaudio.enable = true;
  55. # Enable touchpad support (enabled default in most desktopManager).
  56. services.xserver.libinput.enable = true;
  57. # Define a user account. Don't forget to set a password with ‘passwd’.
  58. users.users.junikim = {
  59. isNormalUser = true;
  60. extraGroups = [ "wheel" "video" "audio" "input" ]; # Enable ‘sudo’ for the user.
  61. shell = pkgs.zsh;
  62. };
  63. programs.zsh.enable = true;
  64. programs.zsh.ohMyZsh.enable = true;
  65. programs.zsh.autosuggestions.enable = true;
  66. programs.zsh.shellAliases = {
  67. "gac" = "git add . && git commit";
  68. "v" = "nvim";
  69. "c" = "clear";
  70. "s" = "ls";
  71. "e" = "exit";
  72. "sy" = "systemctl";
  73. "cp" = "cp -r";
  74. };
  75. programs.zsh.ohMyZsh.plugins = [ "git" "command-not-found" ];
  76. programs.zsh.syntaxHighlighting.enable = true;
  77. nixpkgs.config.allowUnfree = true;
  78. environment.homeBinInPath = true;
  79. environment.variables = {
  80. "EDITOR" = "nvim";
  81. };
  82. services.gnome3.gnome-keyring.enable = true;
  83. # List packages installed in system profile. To search, run:
  84. # $ nix search wget
  85. fonts.fonts = with pkgs; [ jetbrains-mono dejavu_fonts ];
  86. environment.systemPackages = with pkgs; [
  87. vim neovim neofetch tmux
  88. fff
  89. nodejs shellcheck
  90. dash git
  91. wget brave
  92. nfs-utils gcc gnumake
  93. ];
  94. # Some programs need SUID wrappers, can be configured further or are
  95. # started in user sessions.
  96. # programs.mtr.enable = true;
  97. programs.gnupg.agent = {
  98. enable = true;
  99. #enableSSHSupport = true;
  100. };
  101. # List services that you want to enable:
  102. # Enable the OpenSSH daemon.
  103. # services.openssh.enable = true;
  104. # Open ports in the firewall.
  105. # networking.firewall.allowedTCPPorts = [ ... ];
  106. # networking.firewall.allowedUDPPorts = [ ... ];
  107. # Or disable the firewall altogether.
  108. # networking.firewall.enable = false;
  109. # This value determines the NixOS release from which the default
  110. # settings for stateful data, like file locations and database versions
  111. # on your system were taken. It‘s perfectly fine and recommended to leave
  112. # this value at the release version of the first install of this system.
  113. # Before changing this value read the documentation for this option
  114. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  115. system.stateVersion = "21.11"; # Did you read the comment?
  116. }