From f60b22191853c0076f97a000740ca3b5ac942978 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 26 Nov 2012 04:09:00 +0100 Subject: Move common NixOS expressions into common.nix. This should at least clean up some of this mess and only hardware and filesystem specific stuff should now endup within the respective machine expressions. Signed-off-by: aszlig --- common.nix | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 common.nix (limited to 'common.nix') diff --git a/common.nix b/common.nix new file mode 100644 index 00000000..8f856c0f --- /dev/null +++ b/common.nix @@ -0,0 +1,148 @@ +{config, pkgs, ...}: +{ + require = [ + + ]; + + nix = { + maxJobs = 8; + useChroot = true; + readOnlyStore = true; + extraOptions = '' + build-cores = 0 + ''; + }; + + boot = { + cleanTmpDir = true; + + loader.grub = { + enable = true; + version = 2; + }; + }; + + hardware = { + cpu.intel.updateMicrocode = true; + pulseaudio.enable = true; + pulseaudio.package = pkgs.pulseaudio.override { + useSystemd = true; + }; + }; + + users.defaultUserShell = "/var/run/current-system/sw/bin/zsh"; + + networking = { + wireless.enable = false; + }; + + fileSystems = { + /* + "/run/nix/remote-stores/mmrnmhrm/nix" = { + device = "root@mmrnmhrm:/nix"; + fsType = "sshfs"; + noCheck = true; + options = pkgs.lib.concatStringsSep "," [ + "comment=x-systemd.automount" + "compression=yes" + "ssh_command=${pkgs.openssh}/bin/ssh" + "Ciphers=arcfour" + "IdentityFile=/root/.ssh/id_buildfarm" + ]; + }; + */ + }; + + fonts = { + enableCoreFonts = true; + enableFontDir = true; + enableGhostscriptFonts = true; + extraFonts = [ + pkgs.dosemu_fonts + pkgs.liberation_ttf + ]; + }; + + i18n = { + consoleKeyMap = "dvorak"; + }; + + services = { + openssh = { + enable = true; + permitRootLogin = "without-password"; + }; + + syslogd.tty = "tty13"; + + xfs.enable = false; + + gpm = { + enable = true; + protocol = "exps2"; + }; + + nixosManual.showManual = false; + + pulseaudio.enable = false; + + printing = { + enable = true; + drivers = [ pkgs.foo2zjs pkgs.foomatic_filters ]; + }; + + xserver = { + enable = true; + layout = "dvorak"; + + windowManager = { + i3.enable = true; + default = "i3"; + }; + + desktopManager.default = "none"; + + displayManager.slim.theme = pkgs.fetchurl { + url = "mirror://sourceforge/slim.berlios/slim-fingerprint.tar.gz"; + sha256 = "0i1igl4iciml3d46n5hl3bbmqsdzzv56akw2l36i9f779kw07ds8"; + }; + }; + }; + + /* + jobs.vlock_all = { + name = "vlock-all"; + startOn = "keyboard-request"; + path = [ pkgs.vlock ]; + script = "vlock -asn"; + task = true; + restartIfChanged = false; + }; + */ + + environment.nix = pkgs.nixUnstable; + environment.systemPackages = with pkgs; [ + zsh + wget + vim_configurable + cacert + ]; + + nixpkgs = { + config = { + git = { + svnSupport = true; + guiSupport = true; + }; + }; + }; + + system.fsPackages = with pkgs; [ + sshfsFuse + ]; + + # broken -> chroot build -> FIXME + #system.copySystemConfiguration = true; + + time.timeZone = "Europe/Berlin"; +} -- cgit 1.4.1