From 0facc96c126b359759d6e6b5d7812d462b307e22 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 5 Jun 2018 18:14:20 +0200 Subject: machines/labnet: pull hannswurscht into its own file --- machines/default.nix | 5 +-- machines/labnet/hannswurscht.nix | 70 ++++++++++++++++++++++++++++++++++++++++ machines/labnet/labtops.nix | 67 -------------------------------------- 3 files changed, 73 insertions(+), 69 deletions(-) create mode 100644 machines/labnet/hannswurscht.nix 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"]; - }; - }; - }; } -- cgit 1.4.1