Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Edit this configuration file to declare what will be installed on your system.
- # Help is in configuration.nix(5) man page and NixOS manual (run ‘nixos-help’).
- { config, lib, pkgs, ... }:
- {
- system.stateVersion = "18.03"; # change this only if NixOS release notes say to
- imports = [ ./hardware-configuration.nix ];
- #nixpkgs = { overlays = [ (import ./overlays/overlay-1) ]; };
- nixpkgs.config.allowUnfree = true;
- time.timeZone = "America/Puerto_Rico";
- nix.nixPath = [ "/nix/var/nix/profiles/per-user/root/channels/nixos"
- "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs"
- "nixos-config=/etc/nixos/configuration.nix"
- "nixpkgs-overlays=/etc/nixos/overlays/" ];
- boot.loader.grub = { enable = true; version = 2; device = "/dev/sda"; };
- boot.initrd = { checkJournalingFS = false;
- kernelModules = [ "hv_vmbus" "hv_netvsc" "hv_utils" "hv_storsvc" ]; };
- boot.kernelParams = ["nomodeset" ];
- networking = { # Example from https://nixos.org/nix-dev/2012-August/009680.html
- hostName = "nixos"; # enableIPv6 = true;
- useDHCP = false;
- defaultGateway = "192.168.0.1";
- nameservers = [ "192.168.0.1" ];
- interfaces = [ { name = "eth0"; ipv4.addresses = [ { address = "192.168.0.2"; prefixLength = 24; } ]; } ];
- }; #localCommand = "ip route add default via 2a03:2900:2:1::1";
- i18n = { consoleFont = "Lat2-Terminus16"; consoleKeyMap = "us"; defaultLocale = "en_US.UTF-8"; };
- #nixpkgs.config.packageOverrides = with pkgs; {
- # timescaledb = callPackage <nixpkgs/timescaledb.nix { postgresql = pkgs.postgresql100; }; };
- environment.systemPackages = with pkgs; [
- ######### From 18.03
- vscode chromium firefox findutils mono58 telnet unrar unzip wine zip libreoffice
- nix-repl python27Packages.psycopg2 python36Packages.psycopg2
- clickhouse grafana fsharp41 azure-vhd-utils
- psqlodbc pgadmin pgcli pgmanage postgis pg_repack # postgres packages
- postgresql #timescaledb
- ######### /From 18.03
- #$$$$$$$$ From master-pinned-2018-05-16 to pick up newer packages
- #overlay1.postgresql overlay1.timescaledb
- #overlay1.pg_topn overlay1.pg_cron overlay1.cstore_fdw
- #$$$$$$$$ /From master-pinned-2018-05-16
- wget vim curl screen git python python36 gnumake
- ];
- # Some programs need SUID wrappers - configured further - or are started in user sessions.
- programs.bash.enableCompletion = true;
- programs.mtr.enable = true;
- # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
- networking.firewall.enable = false;
- services.openssh.enable = true;
- services.openssh.extraConfig = ''
- ClientAliveInterval 180
- '';
- services.xserver = { enable = true; layout = "us"; xkbOptions = "eurosign:e";
- displayManager.sddm.enable = true; # KDE
- desktopManager.plasma5.enable = true; # KDE = plasma5
- };
- # postgresql service; see nixos evolution of these options here:
- # https://github.com/NixOS/nixpkgs/pull/38698
- # For override syntax, see # https://github.com/NixOS/nixpkgs/issues/21042
- # # https://github.com/NixOS/nixpkgs/issues/38616
- services.postgresql = {
- enable = true; enableTCPIP = true;
- #package = pkgs.overlay1.postgresql100;
- package = pkgs.postgresql100;
- dataDir = "/data/pgdb";
- authentication = pkgs.lib.mkOverride 10 ''
- local all all trust
- host all all 192.168.0.0/24 trust
- '';
- #extraPlugins = [ (pkgs.timescaledb.override { postgresql = pkgs.postgresql100; }) ];
- #extraPlugins = [
- # (pkgs.postage.override { postgresql = pkgs.overlay1.postgresql100; })
- # (pkgs.pg_repack.override { postgresql = pkgs.overlay1.postgresql100; })
- # (pkgs.postgis.override { postgresql = pkgs.overlay1.postgresql100; })
- # (pkgs.overlay1.pg_cron.override { postgresql = pkgs.overlay1.postgresql100; })
- # (pkgs.overlay1.pg_topn.override { postgresql = pkgs.overlay1.postgresql100; })
- # (pkgs.overlay1.timescaledb.override { postgresql = pkgs.overlay1.postgresql100; })
- # (pkgs.overlay1.cstore_fdw.override { postgresql = pkgs.overlay1.postgresql100; })
- # ];
- #extraConfig = "shared_preload_libraries = 'timescaledb'";
- };
- #services.pgmanage.enable = true;
- #services.pgmanage.connections = { myserver = "host=localhost port=5432 dbname=postgres"; };
- #services.xserver.displayManager.sddm.enable = true; # Enable the KDE Desktop Environment.
- #services.xserver.desktopManager.plasma5.enable = true; # KDE = plasma5
- users.extraUsers.u = { # Define a user account. Don't forget to set a password with 'passwd'.
- isNormalUser = true; home = "/home/u"; description = "u";
- extraGroups = [ "wheel" "networkmanager" ]; uid = 1000; };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement