diff --git a/flake.nix b/flake.nix index a68fa84..d1804f4 100755 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,26 @@ { description = "NixOS configs"; + nixConfig = { + extra-substituters = [ + "https://binarycache.k3t.dev" + "https://nix-community.cachix.org" + + ]; + extra-trusted-public-keys = [ + "binarycache.k3t.dev:cmIg4sWTZ729F1yEF2AYLtSbUXJGFYwM6tzYYF18qts=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + nix.settings = { + optimise.automatic = true; + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 2d"; + }; + }; + }; + inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; impermanence.url = "github:nix-community/impermanence"; diff --git a/hosts/nixcloud/services.d/nix-serve.nix b/hosts/nixcloud/services.d/nix-serve.nix index 2cf9909..b0574c5 100644 --- a/hosts/nixcloud/services.d/nix-serve.nix +++ b/hosts/nixcloud/services.d/nix-serve.nix @@ -3,4 +3,8 @@ enable = true; secretKeyFile = "/var/cache-priv-key.pem"; }; + services.nginx.virtualHosts."binarycache.k3t.dev" = { + enableACME = true; + locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; + }; } \ No newline at end of file diff --git a/modules/sys/hw/cpu/arm64.nix b/modules/sys/hw/cpu/arm64.nix index b72da9a..70ab179 100644 --- a/modules/sys/hw/cpu/arm64.nix +++ b/modules/sys/hw/cpu/arm64.nix @@ -1,4 +1,4 @@ { boot.binfmt.preferStaticEmulators = true; - boot.binfmt.emulatedSystems = [ "x86_64-linux" "i386-linux" ]; + #boot.binfmt.emulatedSystems = [ "x86_64-linux" "i386-linux" ]; } \ No newline at end of file diff --git a/modules/sys/nix.nix b/modules/sys/nix.nix index fb991ce..137f29c 100644 --- a/modules/sys/nix.nix +++ b/modules/sys/nix.nix @@ -8,16 +8,10 @@ "https://cache.nixos.org/" ]; trusted-public-keys = [ - "binarycache.k3t.dev:cmIg4sWTZ729F1yEF2AYLtSbUXJGFYwM6tzYYF18qts=#" + "binarycache.k3t.dev:cmIg4sWTZ729F1yEF2AYLtSbUXJGFYwM6tzYYF18qts=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; - optimise.automatic = true; - gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 2d"; - }; }; nixpkgs.config.allowUnfree = true; } \ No newline at end of file