From 0bd0ca09a39cc8e26ccdc8a08c61d468b76522cb Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Thu, 2 Jul 2020 18:53:55 -0400 Subject: refactor(gs/chupacabra): Vendor urbint config If I want to build this on TVL's CI I can't reference ~/code/urb/urbos, obviously, so I'll just vendor it here which is fine Change-Id: I40feb4b29fafae1d3bb0119b7cca1613a4582fdc Reviewed-on: https://cl.tvl.fyi/c/depot/+/885 Tested-by: BuildkiteCI Reviewed-by: glittershark Reviewed-by: BuildkiteCI --- .../system/system/machines/chupacabra.nix | 1 + .../glittershark/system/system/modules/common.nix | 4 --- .../glittershark/system/system/modules/urbint.nix | 31 ++++++++++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 users/glittershark/system/system/modules/urbint.nix (limited to 'users/glittershark') diff --git a/users/glittershark/system/system/machines/chupacabra.nix b/users/glittershark/system/system/machines/chupacabra.nix index 65e93507ce59..7e2269e074f0 100644 --- a/users/glittershark/system/system/machines/chupacabra.nix +++ b/users/glittershark/system/system/machines/chupacabra.nix @@ -4,6 +4,7 @@ ../modules/common.nix ../modules/reusable/battery.nix ../modules/tvl.nix + ../modules/urbint.nix ]; hardware.enableRedistributableFirmware = true; diff --git a/users/glittershark/system/system/modules/common.nix b/users/glittershark/system/system/modules/common.nix index 66d57704a089..c7f5055a8215 100644 --- a/users/glittershark/system/system/modules/common.nix +++ b/users/glittershark/system/system/modules/common.nix @@ -8,7 +8,6 @@ ./sound.nix ./kernel.nix ./rtlsdr.nix - /home/grfn/code/urb/urbos/system ]; boot.loader.systemd-boot.enable = true; @@ -129,9 +128,6 @@ }; }; - urbos.enable = true; - urbos.username = "grfn"; - services.udev.extraRules = '' # UDEV rules for Teensy USB devices ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1" diff --git a/users/glittershark/system/system/modules/urbint.nix b/users/glittershark/system/system/modules/urbint.nix new file mode 100644 index 000000000000..9790b69dcbb5 --- /dev/null +++ b/users/glittershark/system/system/modules/urbint.nix @@ -0,0 +1,31 @@ +{ config, pkgs, lib, ... }: + +with lib; + +{ + virtualisation.docker.enable = true; + + nix = rec { + binaryCaches = [ "https://nix.urbinternal.com" ]; + trustedBinaryCaches = binaryCaches; + requireSignedBinaryCaches = false; + }; + + services.openvpn.servers.urbint = { + config = '' + config /root/openvpn/urbint.conf + ''; + autoStart = false; + }; + + users.users."grfn".extraGroups = [ "docker" ]; + + services.clamav = { + daemon.enable = true; + updater = { + enable = true; + interval = "daily"; + frequency = 1; # per day + }; + }; +} -- cgit 1.4.1