about summary refs log tree commit diff
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-06-05 18:14:20 +0200
committerProfpatsch <mail@profpatsch.de>2018-06-05 18:22:56 +0200
commit0facc96c126b359759d6e6b5d7812d462b307e22 (patch)
treeb0f0a7218df636dc51181400dd38ab166c9726b5
parent57ebb4111c2d36fe5d95223e3adb0da4faf3d753 (diff)
machines/labnet: pull hannswurscht into its own file
-rw-r--r--machines/default.nix5
-rw-r--r--machines/labnet/hannswurscht.nix70
-rw-r--r--machines/labnet/labtops.nix67
3 files changed, 73 insertions, 69 deletions
diff --git a/machines/default.nix b/machines/default.nix
index 709dfcb9..2d12faa0 100644
--- a/machines/default.nix
+++ b/machines/default.nix
@@ -17,8 +17,9 @@ with import ../lib;
     skunkworks = callMachine devhell/skunkworks.nix {};
     titan      = callMachine devhell/titan.nix {};
   };
-  labnet = {
-    labtops = callNetwork ./labnet/labtops.nix {};
+  labnet.labtops = {
+    inherit (callNetwork ./labnet/labtops.nix {}) labtop;
+    hannswurscht = callMachine ./labnet/hannswurscht.nix {};
   };
   profpatsch = {
     katara = callMachine ./profpatsch/katara.nix {};
diff --git a/machines/labnet/hannswurscht.nix b/machines/labnet/hannswurscht.nix
new file mode 100644
index 00000000..4ef21bac
--- /dev/null
+++ b/machines/labnet/hannswurscht.nix
@@ -0,0 +1,70 @@
+{ pkgs, ... }:
+
+let
+  musicDir = "/data/music";
+  webserverRootDir = "/var/www";
+
+in {
+  vuizvui.user.openlab.base.enable = true;
+
+  nixpkgs.system = "i686-linux";
+
+  users.users.openlab.extraGroups = [ "audio" ];
+  services.mingetty.autologinUser = "openlab";
+
+  hardware.pulseaudio = {
+    enable = true;
+    systemWide = true;
+    package = pkgs.pulseaudioFull;
+    zeroconf.discovery.enable = false;
+    zeroconf.publish.enable = true;
+    tcp.enable = true;
+    tcp.anonymousClients.allowedIpRanges = [ "172.16.0.0/16" "127.0.0.1" ];
+  };
+
+  hardware.bluetooth = {
+    enable = true;
+    extraConfig = ''
+      [General]
+      Enable=Source,Sink,Media,Socket
+    '';
+  };
+
+  hardware.sane.enable = true;
+  services.saned = {
+    enable = true;
+    extraConfig = ''
+      172.16.0.0/16
+    '';
+  };
+
+  # TODO: haskell module broken
+  # vuizvui.user.openlab.stackenblocken = {
+  #   enable = true;
+  #   volume = 35;
+  # };
+  vuizvui.user.openlab.speedtest = {
+    enable = true;
+    outputPath = "${webserverRootDir}/speedtest.yaml";
+  };
+
+  services.nginx = {
+    enable = true;
+    virtualHosts."hannswurscht.openlab.lan" = {
+      default = true;
+      root = webserverRootDir;
+    };
+  };
+
+  # machine mostly runs headless with the screen shut
+  services.logind.extraConfig = "HandleLidSwitch=ignore";
+
+  fileSystems = {
+    "${musicDir}" = {
+      device = "ftp.openlab.lan:/data/upload/music";
+      fsType = "nfs";
+      label = "lab-ftp";
+      options = [ "nolock" "x-systemd.automount"];
+    };
+  };
+}
diff --git a/machines/labnet/labtops.nix b/machines/labnet/labtops.nix
index f04507f0..190fd53b 100644
--- a/machines/labnet/labtops.nix
+++ b/machines/labnet/labtops.nix
@@ -14,71 +14,4 @@
 
   };
 
-  hannswurscht = { pkgs, ... }:
-    let musicDir = "/data/music";
-        webserverRootDir = "/var/www"; in
-  {
-    vuizvui.user.openlab.base.enable = true;
-
-    nixpkgs.system = "i686-linux";
-
-    users.users.openlab.extraGroups = [ "audio" ];
-    services.mingetty.autologinUser = "openlab";
-
-    hardware.pulseaudio = {
-      enable = true;
-      systemWide = true;
-      package = pkgs.pulseaudioFull;
-      zeroconf.discovery.enable = false;
-      zeroconf.publish.enable = true;
-      tcp.enable = true;
-      tcp.anonymousClients.allowedIpRanges = [ "172.16.0.0/16" "127.0.0.1" ];
-    };
-
-    hardware.bluetooth = {
-      enable = true;
-      extraConfig = ''
-        [General]
-        Enable=Source,Sink,Media,Socket
-      '';
-    };
-
-    hardware.sane.enable = true;
-    services.saned = {
-      enable = true;
-      extraConfig = ''
-        172.16.0.0/16
-      '';
-    };
-
-    # TODO: haskell module broken
-    # vuizvui.user.openlab.stackenblocken = {
-    #   enable = true;
-    #   volume = 35;
-    # };
-    vuizvui.user.openlab.speedtest = {
-      enable = true;
-      outputPath = "${webserverRootDir}/speedtest.yaml";
-    };
-
-    services.nginx = {
-      enable = true;
-      virtualHosts."hannswurscht.openlab.lan" = {
-        default = true;
-        root = webserverRootDir;
-      };
-    };
-
-    # machine mostly runs headless with the screen shut
-    services.logind.extraConfig = "HandleLidSwitch=ignore";
-
-    fileSystems = {
-      "${musicDir}" = {
-        device = "ftp.openlab.lan:/data/upload/music";
-        fsType = "nfs";
-        label = "lab-ftp";
-        options = [ "nolock" "x-systemd.automount"];
-      };
-    };
-  };
 }