Advertisement
fp01

Untitled

May 20th, 2018
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 4.86 KB | None | 0 0
  1. # Edit this configuration file to declare what will be installed on your system.
  2. # Help is in configuration.nix(5) man page and NixOS manual (run ‘nixos-help’).
  3. { config, lib, pkgs, ... }:
  4. {
  5.   system.stateVersion = "18.03"; # change this only if NixOS release notes say to
  6.   imports = [ ./hardware-configuration.nix ];
  7.   #nixpkgs = { overlays = [ (import ./overlays/overlay-1) ]; };
  8.   nixpkgs.config.allowUnfree = true;
  9.   time.timeZone     = "America/Puerto_Rico";
  10.   nix.nixPath       = [ "/nix/var/nix/profiles/per-user/root/channels/nixos"
  11.                         "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs"
  12.                         "nixos-config=/etc/nixos/configuration.nix"
  13.                         "nixpkgs-overlays=/etc/nixos/overlays/" ];
  14.   boot.loader.grub  = { enable = true; version = 2; device = "/dev/sda"; };
  15.   boot.initrd       = { checkJournalingFS = false;
  16.     kernelModules = [ "hv_vmbus" "hv_netvsc" "hv_utils" "hv_storsvc" ]; };
  17.   boot.kernelParams = ["nomodeset" ];
  18.   networking       = { # Example from https://nixos.org/nix-dev/2012-August/009680.html
  19.     hostName       = "nixos"; # enableIPv6 = true;
  20.     useDHCP        = false;
  21.     defaultGateway = "192.168.0.1";
  22.     nameservers    = [ "192.168.0.1"  ];
  23.     interfaces     = [ { name = "eth0"; ipv4.addresses = [ { address = "192.168.0.2"; prefixLength = 24; } ]; } ];
  24.     }; #localCommand = "ip route add default via 2a03:2900:2:1::1";
  25.   i18n = { consoleFont = "Lat2-Terminus16"; consoleKeyMap = "us"; defaultLocale = "en_US.UTF-8"; };
  26.   #nixpkgs.config.packageOverrides = with pkgs; {
  27.   #  timescaledb = callPackage <nixpkgs/timescaledb.nix { postgresql = pkgs.postgresql100; }; };
  28.   environment.systemPackages = with pkgs; [
  29.     ######### From 18.03
  30.     vscode chromium firefox findutils mono58 telnet unrar unzip wine zip libreoffice
  31.     nix-repl python27Packages.psycopg2 python36Packages.psycopg2
  32.     clickhouse grafana fsharp41 azure-vhd-utils
  33.     psqlodbc pgadmin pgcli pgmanage postgis pg_repack # postgres packages
  34.     postgresql #timescaledb
  35.     ######### /From 18.03
  36.     #$$$$$$$$ From master-pinned-2018-05-16 to pick up newer packages
  37.     #overlay1.postgresql overlay1.timescaledb
  38.     #overlay1.pg_topn overlay1.pg_cron overlay1.cstore_fdw
  39.     #$$$$$$$$ /From master-pinned-2018-05-16
  40.     wget vim curl screen git python python36 gnumake
  41.     ];
  42.   # Some programs need SUID wrappers - configured further - or are started in user sessions.
  43.   programs.bash.enableCompletion = true;
  44.   programs.mtr.enable = true;
  45.   # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  46.   networking.firewall.enable = false;
  47.   services.openssh.enable = true;
  48.   services.openssh.extraConfig = ''
  49.     ClientAliveInterval 180
  50.   '';
  51.   services.xserver = { enable = true; layout = "us"; xkbOptions = "eurosign:e";
  52.     displayManager.sddm.enable = true; # KDE
  53.     desktopManager.plasma5.enable = true; # KDE = plasma5
  54.     };
  55.   # postgresql service; see nixos evolution of these options here:
  56.   #                     https://github.com/NixOS/nixpkgs/pull/38698
  57.   # For override syntax, see # https://github.com/NixOS/nixpkgs/issues/21042
  58.   #                          # https://github.com/NixOS/nixpkgs/issues/38616
  59.   services.postgresql = {
  60.       enable = true; enableTCPIP = true;
  61.       #package = pkgs.overlay1.postgresql100;
  62.       package = pkgs.postgresql100;
  63.       dataDir = "/data/pgdb";
  64.       authentication = pkgs.lib.mkOverride 10 ''
  65.         local all all trust
  66.         host all all 192.168.0.0/24 trust
  67.       '';
  68.       #extraPlugins = [ (pkgs.timescaledb.override { postgresql = pkgs.postgresql100; }) ];
  69.       #extraPlugins = [
  70.       #    (pkgs.postage.override          { postgresql = pkgs.overlay1.postgresql100; })
  71.       #    (pkgs.pg_repack.override        { postgresql = pkgs.overlay1.postgresql100; })
  72.       #    (pkgs.postgis.override          { postgresql = pkgs.overlay1.postgresql100; })
  73.  
  74.       #    (pkgs.overlay1.pg_cron.override     { postgresql = pkgs.overlay1.postgresql100; })
  75.       #    (pkgs.overlay1.pg_topn.override     { postgresql = pkgs.overlay1.postgresql100; })
  76.       #    (pkgs.overlay1.timescaledb.override { postgresql = pkgs.overlay1.postgresql100; })
  77.       #    (pkgs.overlay1.cstore_fdw.override  { postgresql = pkgs.overlay1.postgresql100; })
  78.       # ];
  79.       #extraConfig = "shared_preload_libraries = 'timescaledb'";
  80.       };
  81.   #services.pgmanage.enable = true;
  82.   #services.pgmanage.connections = { myserver = "host=localhost port=5432 dbname=postgres"; };
  83.   #services.xserver.displayManager.sddm.enable = true; # Enable the KDE Desktop Environment.
  84.   #services.xserver.desktopManager.plasma5.enable = true; # KDE = plasma5
  85.   users.extraUsers.u = { # Define a user account. Don't forget to set a password with 'passwd'.
  86.     isNormalUser = true; home = "/home/u"; description = "u";
  87.     extraGroups = [ "wheel" "networkmanager" ]; uid = 1000; };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement