diff options
author | Profpatsch <mail@profpatsch.de> | 2018-06-05 18:21:56 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2018-06-05 18:22:56 +0200 |
commit | c994b9e74a2b37dd9e9ef55565098c1e1fbce463 (patch) | |
tree | 0360ebc7c7add3f075c18463dfc43bb2a7e1e1f9 /machines/openlab/hannswurscht.nix | |
parent | 12cda91cf3a6cb3c08216e64f878e580530093ac (diff) |
machines: rename labnet to openlab
The namespace was kind of hard to remember, so let’s just call it openlab.
Diffstat (limited to 'machines/openlab/hannswurscht.nix')
-rw-r--r-- | machines/openlab/hannswurscht.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/machines/openlab/hannswurscht.nix b/machines/openlab/hannswurscht.nix new file mode 100644 index 00000000..4ef21bac --- /dev/null +++ b/machines/openlab/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"]; + }; + }; +} |