Refactoring common parts.
This commit is contained in:
		
							parent
							
								
									b80b3da9bc
								
							
						
					
					
						commit
						b644d30f65
					
				
							
								
								
									
										175
									
								
								archachatina.nix
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										175
									
								
								archachatina.nix
									
									
									
									
									
								
							@ -1,184 +1,15 @@
 | 
				
			|||||||
# Edit this configuration file to define what should be installed on
 | 
					 | 
				
			||||||
# your system.  Help is available in the configuration.nix(5) man page
 | 
					 | 
				
			||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{ config, pkgs, ... }:
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports =
 | 
				
			||||||
    [ # Include the results of the hardware scan.
 | 
					    [
 | 
				
			||||||
      ./hardware-configuration.nix
 | 
					      ./common.nix
 | 
				
			||||||
 | 
					      ./uefi.nix
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Use the gummiboot efi boot loader.
 | 
					 | 
				
			||||||
  boot.loader.gummiboot.enable = true;
 | 
					 | 
				
			||||||
  boot.loader.efi.canTouchEfiVariables = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  boot.initrd.luks.devices = [ { name = "sda2_crypt"; device = "/dev/disk/by-uuid/663dcfda-081e-40d5-9ba4-62ad73dc5098"; preLVM = true; } ];
 | 
					  boot.initrd.luks.devices = [ { name = "sda2_crypt"; device = "/dev/disk/by-uuid/663dcfda-081e-40d5-9ba4-62ad73dc5098"; preLVM = true; } ];
 | 
				
			||||||
  boot.initrd.kernelModules = [ "fbcon" ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  boot.kernelPackages = pkgs.linuxPackages_latest;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  networking.hostName = "archachatina"; # Define your hostname.
 | 
					  networking.hostName = "archachatina"; # Define your hostname.
 | 
				
			||||||
  networking.hostId = "cc7ea3ba";
 | 
					  networking.hostId = "cc7ea3ba";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # nix.binaryCaches = [ https://hydra.nixos.org https://cache.nixos.org http://hydra.cryp.to/ ];
 | 
					 | 
				
			||||||
  # nix.trustedBinaryCaches = [ https://hydra.nixos.org https://cache.nixos.org http://hydra.cryp.to/ ];
 | 
					 | 
				
			||||||
  nix.binaryCaches = [ https://hydra.nixos.org https://cache.nixos.org ];
 | 
					 | 
				
			||||||
  nix.trustedBinaryCaches = [ https://hydra.nixos.org https://cache.nixos.org ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  networking.networkmanager.enable = true;
 | 
					 | 
				
			||||||
  networking.firewall.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # networking.extraHosts = ''
 | 
					 | 
				
			||||||
  #   127.1.0.80 compile compile.logic.tuwien.ac.at
 | 
					 | 
				
			||||||
  # '';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  time.timeZone = "Europe/Vienna";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Select internationalisation properties.
 | 
					 | 
				
			||||||
  # i18n = {
 | 
					 | 
				
			||||||
  #   consoleFont = "lat9w-16";
 | 
					 | 
				
			||||||
  #   consoleKeyMap = "us";
 | 
					 | 
				
			||||||
  #   defaultLocale = "en_US.UTF-8";
 | 
					 | 
				
			||||||
  # };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  programs.ibus.enable = true;
 | 
					 | 
				
			||||||
  programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  environment.systemPackages = with pkgs; with haskellngPackages; [
 | 
					 | 
				
			||||||
    stdenv
 | 
					 | 
				
			||||||
    nox
 | 
					 | 
				
			||||||
    wget
 | 
					 | 
				
			||||||
    vim_configurable
 | 
					 | 
				
			||||||
    zsh
 | 
					 | 
				
			||||||
    gitFull gitAndTools.hub tig gitg
 | 
					 | 
				
			||||||
    gnumake
 | 
					 | 
				
			||||||
    m4
 | 
					 | 
				
			||||||
    openjdk8
 | 
					 | 
				
			||||||
    # icedtea7_jdk
 | 
					 | 
				
			||||||
    sbt scala
 | 
					 | 
				
			||||||
    idea.idea-community
 | 
					 | 
				
			||||||
    screen
 | 
					 | 
				
			||||||
    psmisc
 | 
					 | 
				
			||||||
    firefoxWrapper
 | 
					 | 
				
			||||||
    thunderbird
 | 
					 | 
				
			||||||
    gnupg
 | 
					 | 
				
			||||||
    pass xclip
 | 
					 | 
				
			||||||
    gcc
 | 
					 | 
				
			||||||
    # remmina
 | 
					 | 
				
			||||||
    silver-searcher
 | 
					 | 
				
			||||||
    tree
 | 
					 | 
				
			||||||
    python
 | 
					 | 
				
			||||||
    python34
 | 
					 | 
				
			||||||
    python34Packages.ipython
 | 
					 | 
				
			||||||
    ledger
 | 
					 | 
				
			||||||
    hledger
 | 
					 | 
				
			||||||
    hledger-diff
 | 
					 | 
				
			||||||
    cmake
 | 
					 | 
				
			||||||
    vimPlugins.YouCompleteMe
 | 
					 | 
				
			||||||
    gdb
 | 
					 | 
				
			||||||
    mpv
 | 
					 | 
				
			||||||
    xlibs.xwininfo # for gnome maximus extension
 | 
					 | 
				
			||||||
    dstat
 | 
					 | 
				
			||||||
    which
 | 
					 | 
				
			||||||
    zip
 | 
					 | 
				
			||||||
    file
 | 
					 | 
				
			||||||
    unzip
 | 
					 | 
				
			||||||
    elinks
 | 
					 | 
				
			||||||
    ctags
 | 
					 | 
				
			||||||
    mutt
 | 
					 | 
				
			||||||
    nix-prefetch-scripts
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #texLiveFull biber
 | 
					 | 
				
			||||||
    androidsdk_4_4
 | 
					 | 
				
			||||||
    gimp
 | 
					 | 
				
			||||||
    inkscape
 | 
					 | 
				
			||||||
    # libreoffice
 | 
					 | 
				
			||||||
    jabref
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # haskell dev
 | 
					 | 
				
			||||||
    cabal2nix
 | 
					 | 
				
			||||||
    cabal-install
 | 
					 | 
				
			||||||
    # ghc-mod
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    gnome3.libgweather
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  environment.gnome3.packageSet = pkgs.gnome3_16;
 | 
					 | 
				
			||||||
  nixpkgs.config.packageOverrides = pkgs: rec {
 | 
					 | 
				
			||||||
    # gtk3 = pkgs.gtk3_16;
 | 
					 | 
				
			||||||
    gnome3 = pkgs.gnome3_16;
 | 
					 | 
				
			||||||
    jre = pkgs.openjdk8;
 | 
					 | 
				
			||||||
    jdk = pkgs.openjdk8;
 | 
					 | 
				
			||||||
    # vim_configurable = pkgs.vim_configurable.override { source = "vim-nox"; };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fonts = {
 | 
					 | 
				
			||||||
    fonts = with pkgs; [
 | 
					 | 
				
			||||||
      inconsolata
 | 
					 | 
				
			||||||
      dejavu_fonts
 | 
					 | 
				
			||||||
      ipafont
 | 
					 | 
				
			||||||
      unifont
 | 
					 | 
				
			||||||
      ubuntu_font_family
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  environment.variables.EDITOR = "${pkgs.vim}/bin/vim";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # List services that you want to enable:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Enable the OpenSSH daemon.
 | 
					 | 
				
			||||||
  services.openssh = {
 | 
					 | 
				
			||||||
    enable = true;
 | 
					 | 
				
			||||||
    permitRootLogin = "no";
 | 
					 | 
				
			||||||
    passwordAuthentication = false;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
  programs.ssh.startAgent = false;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Enable CUPS to print documents.
 | 
					 | 
				
			||||||
  services.avahi.enable = true; # cups browsing support
 | 
					 | 
				
			||||||
  services.printing.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Enable the X11 windowing system.
 | 
					 | 
				
			||||||
  services.xserver.enable = true;
 | 
					 | 
				
			||||||
  services.xserver.displayManager.gdm.enable = true;
 | 
					 | 
				
			||||||
  services.xserver.displayManager.desktopManagerHandlesLidAndPower = false;
 | 
					 | 
				
			||||||
  services.xserver.desktopManager.gnome3.enable = true;
 | 
					 | 
				
			||||||
  services.xserver.xkbOptions = "ctrl:nocaps";
 | 
					 | 
				
			||||||
  # services.xserver.displayManager.lightdm.enable = true;
 | 
					 | 
				
			||||||
  # services.xserver.desktopManager.kde5.enable = true;
 | 
					 | 
				
			||||||
  # services.xserver.layout = "us";
 | 
					 | 
				
			||||||
  # services.xserver.xkbOptions = "eurosign:e";
 | 
					 | 
				
			||||||
  services.dbus.packages = [ pkgs.colord ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # services.jenkins.enable = true;
 | 
					 | 
				
			||||||
  # services.jenkinsSlave.enable = true;
 | 
					 | 
				
			||||||
  # services.jenkins.port = 8888;
 | 
					 | 
				
			||||||
  # services.jenkins.packages = with pkgs; [ stdenv gitFull jdk openssh sbt prover9 minisat veriT bash gnutar gzip ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # TODO: ntp enabled anyhow
 | 
					 | 
				
			||||||
  # services.timesyncd.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # IntelliJ
 | 
					 | 
				
			||||||
  boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fileSystems."/mnt/vaccaria" = {
 | 
					 | 
				
			||||||
    device = "//vaccaria.mtlaa.gebner.org/export";
 | 
					 | 
				
			||||||
    fsType = "cifs";
 | 
					 | 
				
			||||||
    options = "x-systemd.automount,credentials=/etc/smbcredentials/vaccaria";
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fileSystems."/mnt/aruanus" = {
 | 
					 | 
				
			||||||
    device = "//aruanus.htdf.gebner.org/export";
 | 
					 | 
				
			||||||
    fsType = "cifs";
 | 
					 | 
				
			||||||
    options = "x-systemd.automount,credentials=/etc/smbcredentials/aruanus";
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  users.extraUsers.gebner = {
 | 
					 | 
				
			||||||
    isNormalUser = true;
 | 
					 | 
				
			||||||
    extraGroups = [ "wheel" "networkmanager" ];
 | 
					 | 
				
			||||||
    shell = "${pkgs.zsh}/bin/zsh";
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										122
									
								
								common.nix
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										122
									
								
								common.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,122 @@
 | 
				
			|||||||
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  imports =
 | 
				
			||||||
 | 
					    [
 | 
				
			||||||
 | 
					      /etc/nixos/hardware-configuration.nix
 | 
				
			||||||
 | 
					      ./gnome3.nix
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  boot.kernelPackages = pkgs.linuxPackages_latest;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  nix.binaryCaches = [ https://hydra.nixos.org https://cache.nixos.org ];
 | 
				
			||||||
 | 
					  nix.trustedBinaryCaches = [ https://hydra.nixos.org https://cache.nixos.org ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  networking.networkmanager.enable = true;
 | 
				
			||||||
 | 
					  networking.firewall.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  time.timeZone = "Europe/Vienna";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Select internationalisation properties.
 | 
				
			||||||
 | 
					  # i18n = {
 | 
				
			||||||
 | 
					  #   consoleFont = "lat9w-16";
 | 
				
			||||||
 | 
					  #   consoleKeyMap = "us";
 | 
				
			||||||
 | 
					  #   defaultLocale = "en_US.UTF-8";
 | 
				
			||||||
 | 
					  # };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  environment.systemPackages = with pkgs; with haskellngPackages; [
 | 
				
			||||||
 | 
					    stdenv
 | 
				
			||||||
 | 
					    nox
 | 
				
			||||||
 | 
					    wget
 | 
				
			||||||
 | 
					    vim_configurable
 | 
				
			||||||
 | 
					    zsh
 | 
				
			||||||
 | 
					    gitFull gitAndTools.hub tig gitg
 | 
				
			||||||
 | 
					    gnumake
 | 
				
			||||||
 | 
					    m4
 | 
				
			||||||
 | 
					    openjdk8
 | 
				
			||||||
 | 
					    sbt scala
 | 
				
			||||||
 | 
					    idea.idea-community
 | 
				
			||||||
 | 
					    screen
 | 
				
			||||||
 | 
					    psmisc
 | 
				
			||||||
 | 
					    firefoxWrapper
 | 
				
			||||||
 | 
					    thunderbird
 | 
				
			||||||
 | 
					    gnupg
 | 
				
			||||||
 | 
					    pass xclip
 | 
				
			||||||
 | 
					    gcc
 | 
				
			||||||
 | 
					    # remmina
 | 
				
			||||||
 | 
					    silver-searcher
 | 
				
			||||||
 | 
					    tree
 | 
				
			||||||
 | 
					    python
 | 
				
			||||||
 | 
					    python34
 | 
				
			||||||
 | 
					    python34Packages.ipython
 | 
				
			||||||
 | 
					    ledger
 | 
				
			||||||
 | 
					    hledger
 | 
				
			||||||
 | 
					    hledger-diff
 | 
				
			||||||
 | 
					    cmake
 | 
				
			||||||
 | 
					    vimPlugins.YouCompleteMe
 | 
				
			||||||
 | 
					    gdb
 | 
				
			||||||
 | 
					    mpv
 | 
				
			||||||
 | 
					    dstat
 | 
				
			||||||
 | 
					    which
 | 
				
			||||||
 | 
					    zip
 | 
				
			||||||
 | 
					    file
 | 
				
			||||||
 | 
					    unzip
 | 
				
			||||||
 | 
					    elinks
 | 
				
			||||||
 | 
					    ctags
 | 
				
			||||||
 | 
					    mutt
 | 
				
			||||||
 | 
					    nix-prefetch-scripts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    texLiveFull biber
 | 
				
			||||||
 | 
					    androidsdk_4_4
 | 
				
			||||||
 | 
					    gimp
 | 
				
			||||||
 | 
					    inkscape
 | 
				
			||||||
 | 
					    # libreoffice
 | 
				
			||||||
 | 
					    jabref
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # haskell dev
 | 
				
			||||||
 | 
					    cabal2nix
 | 
				
			||||||
 | 
					    cabal-install
 | 
				
			||||||
 | 
					    # ghc-mod
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  nixpkgs.config.packageOverrides = pkgs: rec {
 | 
				
			||||||
 | 
					    jre = pkgs.openjdk8;
 | 
				
			||||||
 | 
					    jdk = pkgs.openjdk8;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  environment.variables.EDITOR = "${pkgs.vim}/bin/vim";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Enable the OpenSSH daemon.
 | 
				
			||||||
 | 
					  services.openssh = {
 | 
				
			||||||
 | 
					    enable = true;
 | 
				
			||||||
 | 
					    permitRootLogin = "no";
 | 
				
			||||||
 | 
					    passwordAuthentication = false;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					  programs.ssh.startAgent = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Enable CUPS to print documents.
 | 
				
			||||||
 | 
					  services.avahi.enable = true; # cups browsing support
 | 
				
			||||||
 | 
					  services.printing.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # IntelliJ
 | 
				
			||||||
 | 
					  boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fileSystems."/mnt/vaccaria" = {
 | 
				
			||||||
 | 
					    device = "//vaccaria.mtlaa.gebner.org/export";
 | 
				
			||||||
 | 
					    fsType = "cifs";
 | 
				
			||||||
 | 
					    options = "x-systemd.automount,credentials=/etc/smbcredentials/vaccaria";
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fileSystems."/mnt/aruanus" = {
 | 
				
			||||||
 | 
					    device = "//aruanus.htdf.gebner.org/export";
 | 
				
			||||||
 | 
					    fsType = "cifs";
 | 
				
			||||||
 | 
					    options = "x-systemd.automount,credentials=/etc/smbcredentials/aruanus";
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  users.extraUsers.gebner = {
 | 
				
			||||||
 | 
					    isNormalUser = true;
 | 
				
			||||||
 | 
					    extraGroups = [ "wheel" "networkmanager" ];
 | 
				
			||||||
 | 
					    shell = "${pkgs.zsh}/bin/zsh";
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										36
									
								
								gnome3.nix
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										36
									
								
								gnome3.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  programs.ibus.enable = true;
 | 
				
			||||||
 | 
					  programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  environment.systemPackages = with pkgs; with haskellngPackages; [
 | 
				
			||||||
 | 
					    xlibs.xwininfo # for gnome maximus extension
 | 
				
			||||||
 | 
					    unzip
 | 
				
			||||||
 | 
					    gnome3.libgweather
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  environment.gnome3.packageSet = pkgs.gnome3_16;
 | 
				
			||||||
 | 
					  nixpkgs.config.packageOverrides = pkgs: rec {
 | 
				
			||||||
 | 
					    gnome3 = pkgs.gnome3_16;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  fonts = {
 | 
				
			||||||
 | 
					    fonts = with pkgs; [
 | 
				
			||||||
 | 
					      inconsolata
 | 
				
			||||||
 | 
					      dejavu_fonts
 | 
				
			||||||
 | 
					      ipafont
 | 
				
			||||||
 | 
					      unifont
 | 
				
			||||||
 | 
					      ubuntu_font_family
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  services.xserver.enable = true;
 | 
				
			||||||
 | 
					  services.xserver.displayManager.gdm.enable = true;
 | 
				
			||||||
 | 
					  services.xserver.displayManager.desktopManagerHandlesLidAndPower = false;
 | 
				
			||||||
 | 
					  services.xserver.desktopManager.gnome3.enable = true;
 | 
				
			||||||
 | 
					  services.xserver.layout = "us";
 | 
				
			||||||
 | 
					  services.xserver.xkbVariant = "altgr-intl";
 | 
				
			||||||
 | 
					  services.xserver.xkbOptions = "caps:ctrl_modifier";
 | 
				
			||||||
 | 
					  services.dbus.packages = [ pkgs.colord ];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										160
									
								
								theba.nix
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										160
									
								
								theba.nix
									
									
									
									
									
								
							@ -1,23 +1,13 @@
 | 
				
			|||||||
# Edit this configuration file to define what should be installed on
 | 
					 | 
				
			||||||
# your system.  Help is available in the configuration.nix(5) man page
 | 
					 | 
				
			||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{ config, pkgs, ... }:
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports =
 | 
					  imports =
 | 
				
			||||||
    [ # Include the results of the hardware scan.
 | 
					    [
 | 
				
			||||||
      ./hardware-configuration.nix
 | 
					      ./common.nix
 | 
				
			||||||
 | 
					      ./uefi.nix
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Use the gummiboot efi boot loader.
 | 
					 | 
				
			||||||
  boot.loader.gummiboot.enable = true;
 | 
					 | 
				
			||||||
  boot.loader.efi.canTouchEfiVariables = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  boot.initrd.luks.devices = [ { name = "sda2_crypt"; device = "/dev/disk/by-uuid/a7482f34-1d7b-4181-9f3c-f6bbbdb8679d"; preLVM = true; } ];
 | 
					  boot.initrd.luks.devices = [ { name = "sda2_crypt"; device = "/dev/disk/by-uuid/a7482f34-1d7b-4181-9f3c-f6bbbdb8679d"; preLVM = true; } ];
 | 
				
			||||||
  boot.initrd.kernelModules = [ "fbcon" ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  boot.kernelPackages = pkgs.linuxPackages_latest;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # workaround until trackpad is supported properly
 | 
					  # workaround until trackpad is supported properly
 | 
				
			||||||
  boot.extraModprobeConfig = ''
 | 
					  boot.extraModprobeConfig = ''
 | 
				
			||||||
@ -47,148 +37,4 @@
 | 
				
			|||||||
  networking.hostName = "theba"; # Define your hostname.
 | 
					  networking.hostName = "theba"; # Define your hostname.
 | 
				
			||||||
  networking.hostId = "b29b900f";
 | 
					  networking.hostId = "b29b900f";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # nix.binaryCaches = [ https://hydra.nixos.org https://cache.nixos.org http://hydra.cryp.to/ ];
 | 
					 | 
				
			||||||
  # nix.trustedBinaryCaches = [ https://hydra.nixos.org https://cache.nixos.org http://hydra.cryp.to/ ];
 | 
					 | 
				
			||||||
  nix.binaryCaches = [ https://hydra.nixos.org https://cache.nixos.org ];
 | 
					 | 
				
			||||||
  nix.trustedBinaryCaches = [ https://hydra.nixos.org https://cache.nixos.org ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  networking.networkmanager.enable = true;
 | 
					 | 
				
			||||||
  networking.firewall.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # networking.extraHosts = ''
 | 
					 | 
				
			||||||
  #   127.1.0.80 compile compile.logic.tuwien.ac.at
 | 
					 | 
				
			||||||
  # '';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  time.timeZone = "Europe/Vienna";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Select internationalisation properties.
 | 
					 | 
				
			||||||
  # i18n = {
 | 
					 | 
				
			||||||
  #   consoleFont = "lat9w-16";
 | 
					 | 
				
			||||||
  #   consoleKeyMap = "us";
 | 
					 | 
				
			||||||
  #   defaultLocale = "en_US.UTF-8";
 | 
					 | 
				
			||||||
  # };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  programs.ibus.enable = true;
 | 
					 | 
				
			||||||
  programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  environment.systemPackages = with pkgs; with haskellngPackages; [
 | 
					 | 
				
			||||||
    stdenv
 | 
					 | 
				
			||||||
    nox
 | 
					 | 
				
			||||||
    wget
 | 
					 | 
				
			||||||
    vim_configurable
 | 
					 | 
				
			||||||
    zsh
 | 
					 | 
				
			||||||
    gitFull gitAndTools.hub tig gitg
 | 
					 | 
				
			||||||
    gnumake
 | 
					 | 
				
			||||||
    m4
 | 
					 | 
				
			||||||
    openjdk8
 | 
					 | 
				
			||||||
    # icedtea7_jdk
 | 
					 | 
				
			||||||
    sbt scala
 | 
					 | 
				
			||||||
    idea.idea-community
 | 
					 | 
				
			||||||
    screen
 | 
					 | 
				
			||||||
    psmisc
 | 
					 | 
				
			||||||
    firefoxWrapper
 | 
					 | 
				
			||||||
    thunderbird
 | 
					 | 
				
			||||||
    gnupg
 | 
					 | 
				
			||||||
    pass xclip
 | 
					 | 
				
			||||||
    gcc
 | 
					 | 
				
			||||||
    remmina
 | 
					 | 
				
			||||||
    silver-searcher
 | 
					 | 
				
			||||||
    tree
 | 
					 | 
				
			||||||
    python
 | 
					 | 
				
			||||||
    python34
 | 
					 | 
				
			||||||
    python34Packages.ipython
 | 
					 | 
				
			||||||
    ledger
 | 
					 | 
				
			||||||
    hledger
 | 
					 | 
				
			||||||
    hledger-diff
 | 
					 | 
				
			||||||
    cmake
 | 
					 | 
				
			||||||
    vimPlugins.YouCompleteMe
 | 
					 | 
				
			||||||
    gdb
 | 
					 | 
				
			||||||
    mpv
 | 
					 | 
				
			||||||
    xlibs.xwininfo # for gnome maximus extension
 | 
					 | 
				
			||||||
    dstat
 | 
					 | 
				
			||||||
    which
 | 
					 | 
				
			||||||
    zip
 | 
					 | 
				
			||||||
    file
 | 
					 | 
				
			||||||
    unzip
 | 
					 | 
				
			||||||
    elinks
 | 
					 | 
				
			||||||
    ctags
 | 
					 | 
				
			||||||
    mutt
 | 
					 | 
				
			||||||
    nix-prefetch-scripts
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    texLiveFull biber
 | 
					 | 
				
			||||||
    androidsdk_4_4
 | 
					 | 
				
			||||||
    gimp
 | 
					 | 
				
			||||||
    inkscape
 | 
					 | 
				
			||||||
    # libreoffice
 | 
					 | 
				
			||||||
    jabref
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # haskell dev
 | 
					 | 
				
			||||||
    cabal2nix
 | 
					 | 
				
			||||||
    cabal-install
 | 
					 | 
				
			||||||
    # ghc-mod
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    gnome3.libgweather
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  nixpkgs.config.packageOverrides = pkgs: rec {
 | 
					 | 
				
			||||||
    # sbt = pkgs.sbt.override { jre = pkgs.openjdk8; };
 | 
					 | 
				
			||||||
    jre = pkgs.openjdk8;
 | 
					 | 
				
			||||||
    jdk = pkgs.openjdk8;
 | 
					 | 
				
			||||||
    # vim_configurable = pkgs.vim_configurable.override { source = "vim-nox"; };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fonts = {
 | 
					 | 
				
			||||||
    fonts = with pkgs; [
 | 
					 | 
				
			||||||
      inconsolata
 | 
					 | 
				
			||||||
      dejavu_fonts
 | 
					 | 
				
			||||||
      ipafont
 | 
					 | 
				
			||||||
      unifont
 | 
					 | 
				
			||||||
      ubuntu_font_family
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  environment.variables.EDITOR = "${pkgs.vim}/bin/vim";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # List services that you want to enable:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Enable the OpenSSH daemon.
 | 
					 | 
				
			||||||
  services.openssh = {
 | 
					 | 
				
			||||||
    enable = true;
 | 
					 | 
				
			||||||
    permitRootLogin = "no";
 | 
					 | 
				
			||||||
    passwordAuthentication = false;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
  programs.ssh.startAgent = false;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Enable CUPS to print documents.
 | 
					 | 
				
			||||||
  services.avahi.enable = true; # cups browsing support
 | 
					 | 
				
			||||||
  services.printing.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Enable the X11 windowing system.
 | 
					 | 
				
			||||||
  services.xserver.enable = true;
 | 
					 | 
				
			||||||
  services.xserver.displayManager.gdm.enable = true;
 | 
					 | 
				
			||||||
  services.xserver.displayManager.desktopManagerHandlesLidAndPower = false;
 | 
					 | 
				
			||||||
  services.xserver.desktopManager.gnome3.enable = true;
 | 
					 | 
				
			||||||
  # services.xserver.displayManager.lightdm.enable = true;
 | 
					 | 
				
			||||||
  # services.xserver.desktopManager.kde5.enable = true;
 | 
					 | 
				
			||||||
  # services.xserver.layout = "us";
 | 
					 | 
				
			||||||
  # services.xserver.xkbOptions = "eurosign:e";
 | 
					 | 
				
			||||||
  services.dbus.packages = [ pkgs.colord ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # services.jenkins.enable = true;
 | 
					 | 
				
			||||||
  # services.jenkinsSlave.enable = true;
 | 
					 | 
				
			||||||
  # services.jenkins.port = 8888;
 | 
					 | 
				
			||||||
  # services.jenkins.packages = with pkgs; [ stdenv gitFull jdk openssh sbt prover9 minisat veriT bash gnutar gzip ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # TODO: ntp enabled anyhow
 | 
					 | 
				
			||||||
  # services.timesyncd.enable = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # IntelliJ
 | 
					 | 
				
			||||||
  boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  users.extraUsers.gebner = {
 | 
					 | 
				
			||||||
    isNormalUser = true;
 | 
					 | 
				
			||||||
    extraGroups = [ "wheel" "networkmanager" ];
 | 
					 | 
				
			||||||
    shell = "${pkgs.zsh}/bin/zsh";
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										9
									
								
								uefi.nix
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										9
									
								
								uefi.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					{ config, pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  # Use the gummiboot efi boot loader.
 | 
				
			||||||
 | 
					  boot.loader.gummiboot.enable = true;
 | 
				
			||||||
 | 
					  boot.loader.efi.canTouchEfiVariables = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  boot.initrd.kernelModules = [ "fbcon" ];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user