From 669d347504c2f3235445406871e2348fbff4b5a8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 5 Jul 2023 11:30:47 +0200 Subject: setup local nix cache --- nixos/common.nix | 1 + nixos/kusanagi.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'nixos') diff --git a/nixos/common.nix b/nixos/common.nix index 658351e..64c656c 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -96,6 +96,7 @@ in "wheel" "yggdrasil" "plugdev" + "kvm" ]; }; diff --git a/nixos/kusanagi.nix b/nixos/kusanagi.nix index dca07ec..9a43868 100644 --- a/nixos/kusanagi.nix +++ b/nixos/kusanagi.nix @@ -50,6 +50,24 @@ swapDevices = [{ device = "/dev/disk/by-uuid/c78cfb77-75ee-4aae-9b24-b91f8eebb7c2"; }]; + # Nix-serve for friends on local network + services.nix-serve = { + enable = true; + secretKeyFile = "/var/lib/nix-serve/cache-priv-key.pem"; + }; + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts = { + "adnab.local" = { + locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; + }; + }; + networking.extraHosts = '' + 127.0.0.1 adnab.local + ''; + # Docker virtualisation.docker.enable = true; users.users.lx.extraGroups = [ "docker" ]; -- cgit v1.2.3