nixos: invert common dependency

This commit is contained in:
Vivian 2021-11-21 14:35:09 +01:00
parent da803f5e55
commit 738c8c0faa
11 changed files with 25 additions and 44 deletions

View file

@ -1,12 +0,0 @@
{ 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}";
};
}

View file

@ -1,7 +1,8 @@
{ pkgs, ... }:
{ config, inputs, pkgs, ... }:
{
imports = [
inputs.vault-secrets.nixosModules.vault-secrets
# User account definitions
./users
./services
@ -38,4 +39,13 @@
SystemMaxUse=100M
MaxFileSec=7day
'';
# Enable SSH daemon support.
services.openssh.enable = true;
vault-secrets = {
vaultPrefix = "nixos/${config.networking.hostName}";
vaultAddress = "http://10.42.42.6:8200/";
approlePrefix = "olympus-${config.networking.hostName}";
};
}

View file

@ -3,7 +3,4 @@
# Supress systemd services that don't work (correctly) on LXC
systemd.suppressedSystemUnits = [ "dev-mqueue.mount" "sys-kernel-debug.mount" "sys-fs-fuse-connections.mount" ];
# Enable SSH daemon support.
services.openssh.enable = true;
}

View file

@ -5,10 +5,6 @@
networking.useDHCP = false;
networking.interfaces.ens18.useDHCP = lib.mkDefault true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.permitRootLogin = lib.mkDefault "yes";
# Enable qemu guest agent
services.qemuGuest.enable = true;
}

View file

@ -17,9 +17,6 @@ in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# Import common config
../../common/generic-vm.nix
../../common
];
# Use the GRUB 2 boot loader.

View file

@ -6,9 +6,6 @@
{
imports = [
# Import common config
../../common/generic-lxc.nix
../../common
];
networking.hostName = "consul";

View file

@ -2,9 +2,6 @@
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# Import common config
../../common/generic-vm.nix
../../common
];
# Use the GRUB 2 boot loader.

View file

@ -6,9 +6,6 @@
let mosquittoPort = 1883;
in {
imports = [
# Import common config
../../common/generic-lxc.nix
../../common
];
networking.hostName = "mosquitto";

View file

@ -14,9 +14,6 @@ let
};
in {
imports = [
# Import common config
../../common/generic-lxc.nix
../../common
];
networking.hostName = "nginx";

View file

@ -6,9 +6,6 @@
{
imports = [
# Import common config
../../common/generic-lxc.nix
../../common
];
networking.hostName = "vault";