From 996caabc8a811d67bfe235389808d2d01f49dc76 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 20 Nov 2021 23:41:11 +0100 Subject: [PATCH] various updates --- common.nix | 12 ++++++++++++ flake.lock | 12 ++++++------ flake.nix | 5 +++-- hosts/mosquitto/configuration.nix | 2 +- 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 common.nix diff --git a/common.nix b/common.nix new file mode 100644 index 0000000..6612aa3 --- /dev/null +++ b/common.nix @@ -0,0 +1,12 @@ +{ config, inputs, ... }: +{ + imports = [ + inputs.vault-secrets.nixosModules.vault-secrets + ]; + + vault-secrets = { + vaultPrefix = "nixos/${config.networking.hostName}"; + vaultAddress = "http://10.42.42.6:8200/"; + approlePrefix = "olympus-${config.networking.hostName}"; + }; +} diff --git a/flake.lock b/flake.lock index a1d2ffc..7018cb2 100644 --- a/flake.lock +++ b/flake.lock @@ -196,11 +196,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1637058895, - "narHash": "sha256-LeibxDl00pSZTqLazKr3qUIhL9K/7LPJdpNYqT3nOMc=", + "lastModified": 1637348621, + "narHash": "sha256-dTxccBfFK5ViweuYqx2GwtDo+m9SBSjyBZj0+zMds5M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6abc7cd907ea06424e7963e949cf554a6b3914c2", + "rev": "2d97acad3b9cc16063b554d850a8fe1c2e7bb36d", "type": "github" }, "original": { @@ -285,11 +285,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1636829084, - "narHash": "sha256-ZlfUAsiJt0uq5TBrtBWYwuoFaxJu3LiHKTHrLePI+Do=", + "lastModified": 1637273221, + "narHash": "sha256-ByBCiWlVprVgYGGy2ma7W0DKbtp4Xmj7S5whFrIzO3Q=", "owner": "serokell", "repo": "serokell.nix", - "rev": "3feedad5710f94ae18483249b7e7d12d4549f4b4", + "rev": "1649eceabbe6e148b3c1b322b716e873d312599f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 34ee9c7..31082b6 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ mkSystem = { host, lxc ? true }: nixpkgs.lib.nixosSystem { inherit system; - modules = [ ./hosts/${host}/configuration.nix ] ++ (if lxc then + modules = [ ./hosts/${host}/configuration.nix ./common.nix ] ++ (if lxc then [ "${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix" ] else [ ]); @@ -44,7 +44,7 @@ # Deploys deploy.nodes.bastion = mkDeploy "10.42.42.4" "bastion"; - deploy.nodes.k3s-node1 = mkDeploy "10.42.42.10" "k3s"; + deploy.nodes.k3s = mkDeploy "10.42.42.10" "k3s"; deploy.nodes.vault = mkDeploy "10.42.42.6" "vault"; deploy.nodes.mosquitto = mkDeploy "10.42.42.7" "mosquitto"; deploy.nodes.nginx = mkDeploy "10.42.42.9" "nginx"; @@ -55,6 +55,7 @@ pkgs = serokell-nix.lib.pkgsWith nixpkgs.legacyPackages.${system} [ vault-secrets.overlay ]; in pkgs.mkShell { + VAULT_ADDR = "http://10.42.42.6:8200/"; buildInputs = [ deploy-rs.packages.${system}.deploy-rs pkgs.vault diff --git a/hosts/mosquitto/configuration.nix b/hosts/mosquitto/configuration.nix index b4ec43b..e72b935 100644 --- a/hosts/mosquitto/configuration.nix +++ b/hosts/mosquitto/configuration.nix @@ -45,7 +45,7 @@ in { dataDir = "/var/lib/zigbee2mqtt"; settings = { homeassistant = true; - permit_join = true; + permit_join = false; serial = { port = "/dev/ttyUSB0"; };