about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-04-25 01:21:37 +0200
committerProfpatsch <mail@profpatsch.de>2016-04-25 01:21:37 +0200
commit3fcbe6c5458d5866c4234695b00b500d26de0af0 (patch)
tree731c058faafe36338faf6e25f4b7906c47b48402 /modules
parent714682873db73daaa19019a16715019db5e1d8c8 (diff)
machines/labnet: generic labtop config
Draws out the general config for all Labtops in its own module and
creates a structure to specify the setting which are different.
Diffstat (limited to 'modules')
-rw-r--r--modules/module-list.nix1
-rw-r--r--modules/user/openlab/labtops.nix116
2 files changed, 117 insertions, 0 deletions
diff --git a/modules/module-list.nix b/modules/module-list.nix
index 3b6bff9c..4eb8dc54 100644
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -25,5 +25,6 @@
   ./user/aszlig/services/slim
   ./user/aszlig/services/vlock
   ./user/aszlig/system/kernel.nix
+  ./user/openlab/labtops.nix
   ./user/profpatsch/programs/scanning.nix
 ]
diff --git a/modules/user/openlab/labtops.nix b/modules/user/openlab/labtops.nix
new file mode 100644
index 00000000..26a08a22
--- /dev/null
+++ b/modules/user/openlab/labtops.nix
@@ -0,0 +1,116 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+
+let
+  cfg = config.vuizvui.user.openlab.labtops;
+
+in
+{
+
+  options.vuizvui.user.openlab.labtops = {
+    enable = mkEnableOption "basic shared functionality of labtops";
+
+  };
+
+
+
+  config = mkIf cfg.enable {
+
+    i18n = {
+      consoleFont = "lat9w-16";
+      consoleKeyMap = "us";
+      defaultLocale = "de_DE.UTF-8";
+    };
+
+    # TODO: filesystems 
+
+    # TODO: a way to modularly specify usage patterns (e.g. 3d-printing, arduino &c.)
+    environment.systemPackages = with pkgs; let
+      base = [
+        ack
+        fish
+        git
+        netcat-openbsd
+        python3
+        tmux
+        screen
+        vim
+        wget
+      ];
+      baseGUI = [
+        filezilla
+        chromium
+        gnome3.gedit
+        gmpc
+        libreoffice
+        vlc
+      ];
+      image = [
+        gimp
+        inkscape
+      ];
+      three-d = [
+        # TODO doesn’t build on i686
+        # TODO add a “packageset” mechanism
+        # blender
+        antimony
+      ];
+      three-d-printing = [
+        freecad
+        openscad
+        printrun
+        slic3r
+      ];
+      arduino = [
+        ino
+      ];
+      in base ++ baseGUI ++ image ++ three-d ++ three-d-printing ++ arduino;
+
+    services.xserver = {
+      enable = true;
+      layout = "us";
+      xkbOptions = "eurosign:e";
+
+      displayManager.auto.enable = true;
+      displayManager.auto.user = "openlab";
+      desktopManager.xfce.enable = true;
+      synaptics = {
+        enable = true;
+        minSpeed = "0.5";
+        accelFactor = "0.01";
+      };
+    };
+
+    services.openssh.enable = true;
+
+    networking.networkmanager.enable = true;
+    networking.firewall.enable = false;
+
+    # TODO: an argument that tells about hardware capability
+    nix.maxJobs = 2;
+    hardware.enableAllFirmware = true;
+
+    users.mutableUsers = false;
+    users.users.openlab = {
+      uid = 1000;
+      isNormalUser = true;
+      password = "openlab";
+      extraGroups = [ "wheel" "networkmanager" "dialout"];
+      openssh.authorizedKeys.keys = lib.singleton (lib.concatStrings [
+
+        "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJhthfk38lzDvoI7lPqRneI0yBpZEhLD"
+        "GRBpcXzpPSu+V0YlgrDix5fHhBl+EKfw4aeQNvQNuAky3pDtX+BDK1b7idbz9ZMCExy2a1"
+        "kBKDVJz/onLSQxiiZMuHlAljVj9iU4uoTOxX3vB85Ok9aZtMP1rByRIWR9e81/km4HdfZT"
+        "CjFVRLWfvo0s29H7l0fnbG9bb2E6kydlvjnXJnZFXX+KUM16X11lK53ilPdPJdm87VtxeS"
+        "KZ7GOiBz6q7FHzEd2Zc3CnzgupQiXGSblXrlN22IY3IWfm5S/8RTeQbMLVoH0TncgCeenX"
+        "H7FU/sXD79ypqQV/WaVVDYMOirsnh/ philip@nyx"
+      ]);
+    };
+
+    # fix for emacs
+    programs.bash.promptInit = "PS=\"# \"";
+
+  };
+
+}