configuration.nix 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. [
  8. ./hardware.nix
  9. ./local.nix
  10. ./includes/cli
  11. ./includes/desktop
  12. ./includes/local-dns
  13. ./includes/kubernetes
  14. ];
  15. nixpkgs.config.allowUnfree = true;
  16. networking.networkmanager.enable = true;
  17. console.font = "Lat2-Terminus16";
  18. console.keyMap = "us";
  19. i18n.defaultLocale = "en_US.UTF-8";
  20. # Set your time zone.
  21. time.timeZone = "Asia/Tokyo";
  22. # Enable sound.
  23. sound.enable = true;
  24. hardware.pulseaudio.enable = true;
  25. virtualisation.libvirtd = {
  26. enable = true;
  27. onBoot = "ignore";
  28. };
  29. # Define a user account. Don't forget to set a password with ‘passwd’.
  30. users.users.thomas = {
  31. uid = 1000;
  32. isNormalUser = true;
  33. extraGroups = [ "wheel" "video" "networkmanager" "libvirtd" ];
  34. shell = pkgs.zsh;
  35. subUidRanges = [
  36. { count = 65535; startUid = 100001; }
  37. ];
  38. subGidRanges = [
  39. { count = 65535; startGid = 100001; }
  40. ];
  41. };
  42. users.groups.thomas = {
  43. gid = 1000;
  44. members = [ "thomas" ];
  45. };
  46. nix.gc = {
  47. automatic = true;
  48. options = "--delete-older-than 14d";
  49. };
  50. systemd.timers.nix-gc.timerConfig.Persistent = true;
  51. # This value determines the NixOS release with which your system is to be
  52. # compatible, in order to avoid breaking some software such as database
  53. # servers. You should change this only after NixOS release notes say you
  54. # should.
  55. system.stateVersion = "19.09"; # Did you read the comment?
  56. }