about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--devhell/machines/machine_common.nix109
-rw-r--r--machines/default.nix5
-rw-r--r--machines/devhell/eris.nix (renamed from devhell/machines/machine_eris.nix)2
-rw-r--r--machines/devhell/skunkworks.nix (renamed from devhell/machines/machine_skunkworks.nix)2
-rw-r--r--machines/devhell/titan.nix (renamed from devhell/machines/machine_titan.nix)2
-rw-r--r--modules/module-list.nix1
-rw-r--r--modules/user/devhell/profiles/base.nix108
7 files changed, 117 insertions, 112 deletions
diff --git a/devhell/machines/machine_common.nix b/devhell/machines/machine_common.nix
deleted file mode 100644
index b7fb5215..00000000
--- a/devhell/machines/machine_common.nix
+++ /dev/null
@@ -1,109 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-{
-  boot = {
-    kernelPackages = pkgs.linuxPackages_latest;
-    cleanTmpDir = true;
-  };
-
-  nix = {
-    buildCores = 0;
-    useSandbox = true;
-    binaryCaches = [
-      "https://headcounter.org/hydra/"
-      "https://cache.nixos.org/"
-    ];
-    requireSignedBinaryCaches = true;
-    binaryCachePublicKeys = [
-      "headcounter.org:/7YANMvnQnyvcVB6rgFTdb8p5LG1OTXaO+21CaOSBzg="
-      "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
-    ];
-    nixPath = lib.mkOptionDefault [ "nixpkgs=/home/dev/git/remote/other_github/nixpkgs" ];
-  };
-
-  time = {
-    timeZone = "Europe/London";
-  };
-
-  system = {
-    fsPackages = with pkgs; [
-      sshfsFuse
-      fuse
-      cryptsetup
-    ];
-  };
-
-  hardware = {
-    enableAllFirmware = true;
-    cpu.intel.updateMicrocode = true;
-    opengl = {
-      s3tcSupport = true;
-      driSupport32Bit = true;
-    };
-    pulseaudio = {
-      enable = true;
-      systemWide = false;
-    };
-  };
-
-  programs = {
-    ssh = {
-      startAgent = false;
-    };
-    zsh = {
-      enable = true;
-      enableCompletion = true;
-    };
-    bash = {
-      enableCompletion = true;
-      promptInit = ''
-        # Provide a nice prompt.
-        PROMPT_COLOR="1;31m"
-        let $UID && PROMPT_COLOR="1;32m"
-        PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
-        if test "$TERM" = "xterm"; then
-          PS1="\[\033]2;\h:\u:\w\007\]$PS1"
-        fi
-        eval `dircolors ~/.dir_colors`
-      '';
-    };
-  };
-
-  environment = {
-    shells = [ "/run/current-system/sw/bin/zsh" ];
-    sessionVariables.TERM = "xterm-256color";
-  };
-
-  fonts = {
-    fontconfig = {
-      enable = true;
-      ultimate = {
-        enable = true;
-      };
-    };
-    enableGhostscriptFonts = true;
-    enableCoreFonts = true;
-    fonts = with pkgs; [
-      clearlyU
-      cm_unicode
-      dejavu_fonts
-      dosemu_fonts
-      font-awesome-ttf
-      freefont_ttf
-      hack-font
-      inconsolata
-      powerline-fonts
-      proggyfonts
-      source-code-pro
-      source-sans-pro
-      source-serif-pro
-      terminus_font
-      tewi-font
-      ttf_bitstream_vera
-      ubuntu_font_family
-      unifont
-      vistafonts
-      wqy_microhei
-    ] ++ lib.filter lib.isDerivation (lib.attrValues lohit-fonts);
-  };
-}
diff --git a/machines/default.nix b/machines/default.nix
index a976bbc4..151576f8 100644
--- a/machines/default.nix
+++ b/machines/default.nix
@@ -12,6 +12,11 @@ with import ../lib;
       tyree   = callMachine ./aszlig/managed/tyree.nix {};
     };
   };
+  devhell = {
+    eris       = callMachine devhell/eris.nix {};
+    skunkworks = callMachine devhell/skunkworks.nix {};
+    titan      = callMachine devhell/titan.nix {};
+  };
   labnet = {
     labtops = callNetwork ./labnet/labtops.nix {};
   };
diff --git a/devhell/machines/machine_eris.nix b/machines/devhell/eris.nix
index 60b6944c..2aa83b9f 100644
--- a/devhell/machines/machine_eris.nix
+++ b/machines/devhell/eris.nix
@@ -1,7 +1,7 @@
 { config, pkgs, lib, ... }:
 
 {
-  imports = [ ./machine_common.nix ];
+  vuizvui.user.devhell.profiles.base.enable = true;
 
   boot = {
     loader = {
diff --git a/devhell/machines/machine_skunkworks.nix b/machines/devhell/skunkworks.nix
index 12ad9687..04ef71e8 100644
--- a/devhell/machines/machine_skunkworks.nix
+++ b/machines/devhell/skunkworks.nix
@@ -1,7 +1,7 @@
 { config, pkgs, lib, ... }:
 
 {
-  imports = [ ./machine_common.nix ];
+  vuizvui.user.devhell.profiles.base.enable = true;
 
   boot = {
     loader.grub = {
diff --git a/devhell/machines/machine_titan.nix b/machines/devhell/titan.nix
index 5a0018fb..605fc714 100644
--- a/devhell/machines/machine_titan.nix
+++ b/machines/devhell/titan.nix
@@ -1,7 +1,7 @@
 { config, pkgs, lib, ... }:
 
 {
-  imports = [ ./machine_common.nix ];
+  vuizvui.user.devhell.profiles.base.enable = true;
 
   boot = {
     loader = {
diff --git a/modules/module-list.nix b/modules/module-list.nix
index 5994dd61..33ac6af6 100644
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -29,6 +29,7 @@
   ./user/aszlig/services/slim
   ./user/aszlig/services/vlock
   ./user/aszlig/system/kernel.nix
+  ./user/devhell/profiles/base.nix
   ./user/openlab/base.nix
   ./user/openlab/labtops.nix
   ./user/openlab/stackenblocken.nix
diff --git a/modules/user/devhell/profiles/base.nix b/modules/user/devhell/profiles/base.nix
new file mode 100644
index 00000000..263206ff
--- /dev/null
+++ b/modules/user/devhell/profiles/base.nix
@@ -0,0 +1,108 @@
+{ config, pkgs, lib, ... }:
+
+let
+  cfg = config.vuizvui.user.devhell.profiles.base;
+
+in {
+  options.vuizvui.user.devhell.profiles.base = {
+    enable = lib.mkEnableOption "Base profile for devhell";
+  };
+
+  config = lib.mkIf cfg.enable {
+    boot = {
+      kernelPackages = pkgs.linuxPackages_latest;
+      cleanTmpDir = true;
+    };
+
+    nix = {
+      buildCores = 0;
+      useSandbox = true;
+    };
+
+    time = {
+      timeZone = "Europe/London";
+    };
+
+    system = {
+      fsPackages = with pkgs; [
+        sshfsFuse
+        fuse
+        cryptsetup
+      ];
+    };
+
+    hardware = {
+      enableAllFirmware = true;
+      cpu.intel.updateMicrocode = true;
+      opengl = {
+        s3tcSupport = true;
+        driSupport32Bit = true;
+      };
+      pulseaudio = {
+        enable = true;
+        systemWide = false;
+      };
+    };
+
+    programs = {
+      ssh = {
+        startAgent = false;
+      };
+      zsh = {
+        enable = true;
+        enableCompletion = true;
+      };
+      bash = {
+        enableCompletion = true;
+        promptInit = ''
+          # Provide a nice prompt.
+          PROMPT_COLOR="1;31m"
+          let $UID && PROMPT_COLOR="1;32m"
+          PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
+          if test "$TERM" = "xterm"; then
+            PS1="\[\033]2;\h:\u:\w\007\]$PS1"
+          fi
+          eval `dircolors ~/.dir_colors`
+        '';
+      };
+    };
+
+    environment = {
+      shells = [ "/run/current-system/sw/bin/zsh" ];
+      sessionVariables.TERM = "xterm-256color";
+    };
+
+    fonts = {
+      fontconfig = {
+        enable = true;
+        ultimate = {
+          enable = true;
+        };
+      };
+      enableGhostscriptFonts = true;
+      enableCoreFonts = true;
+      fonts = with pkgs; [
+        clearlyU
+        cm_unicode
+        dejavu_fonts
+        dosemu_fonts
+        font-awesome-ttf
+        freefont_ttf
+        hack-font
+        inconsolata
+        powerline-fonts
+        proggyfonts
+        source-code-pro
+        source-sans-pro
+        source-serif-pro
+        terminus_font
+        tewi-font
+        ttf_bitstream_vera
+        ubuntu_font_family
+        unifont
+        vistafonts
+        wqy_microhei
+      ] ++ lib.filter lib.isDerivation (lib.attrValues lohit-fonts);
+    };
+  };
+}