diff options
author | Alex Auvolat <alex@adnab.me> | 2023-07-05 11:30:47 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-07-05 11:30:47 +0200 |
commit | 669d347504c2f3235445406871e2348fbff4b5a8 (patch) | |
tree | 371f514840bcfbfd52f437aedd3dc25168cd1818 /nixos | |
parent | 8c5dacf828cf1514cea04424b63d0c29d99544c8 (diff) | |
download | user-config-669d347504c2f3235445406871e2348fbff4b5a8.tar.gz user-config-669d347504c2f3235445406871e2348fbff4b5a8.zip |
setup local nix cache
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/common.nix | 1 | ||||
-rw-r--r-- | nixos/kusanagi.nix | 18 |
2 files changed, 19 insertions, 0 deletions
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" ]; |