fmt: directly access the inputs inside each machine.
This allows us to move the inputs to teh individual applications, making them more server agnostic.
This commit is contained in:
parent
4c99464bc4
commit
cfddc32424
5 changed files with 18 additions and 32 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ...}: with lib;
|
||||
{ config, pkgs, lib, inputs, ...}: with lib;
|
||||
let
|
||||
cfg = config.services.skynet_email;
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
|||
./dns.nix
|
||||
./acme.nix
|
||||
./nginx.nix
|
||||
inputs.simple-nixos-mailserver.nixosModule
|
||||
];
|
||||
|
||||
options.services.skynet_email = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.skynet_games_minecraft;
|
||||
|
@ -12,6 +12,7 @@
|
|||
../dns.nix
|
||||
../firewall.nix
|
||||
../nginx.nix
|
||||
inputs.arion.nixosModules.arion
|
||||
];
|
||||
|
||||
options.services.skynet_games_minecraft = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.ldap_backend;
|
||||
|
@ -9,6 +9,7 @@
|
|||
../acme.nix
|
||||
../dns.nix
|
||||
../nginx.nix
|
||||
inputs.skynet_ldap_backend.nixosModule."x86_64-linux"
|
||||
];
|
||||
|
||||
options.services.ldap_backend = {
|
||||
|
|
36
flake.nix
36
flake.nix
|
@ -22,18 +22,7 @@
|
|||
skynet_website.url = "gitlab:compsoc%2Fskynet/website?host=gitlab.skynet.ie";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs,
|
||||
# these are the nixos modules from otehr projects
|
||||
agenix,
|
||||
arion,
|
||||
simple-nixos-mailserver,
|
||||
skynet_ldap_backend,
|
||||
skynet_ldap_frontend,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
outputs = { self, nixpkgs, ... } @inputs: {
|
||||
# https://github.com/zhaofengli/colmena
|
||||
# colmena apply --on agentjones
|
||||
# colmena apply --on @dns
|
||||
|
@ -41,22 +30,16 @@
|
|||
colmena = {
|
||||
meta = {
|
||||
nixpkgs = import nixpkgs {
|
||||
system = system;
|
||||
system = "x86_64-linux";
|
||||
overlays = [];
|
||||
};
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
|
||||
# installed for each machine
|
||||
defaults = {
|
||||
imports = [
|
||||
./machines/_base.nix
|
||||
# for the secrets
|
||||
agenix.nixosModule
|
||||
];
|
||||
};
|
||||
defaults = import ./machines/_base.nix ;
|
||||
|
||||
# firewall machiene
|
||||
agentjones = import ./machines/agentjones.nix;
|
||||
|
@ -71,13 +54,10 @@
|
|||
galatea = import ./machines/galatea.nix;
|
||||
|
||||
# Game host
|
||||
optimus.imports = [./machines/optimus.nix arion.nixosModules.arion];
|
||||
optimus = import ./machines/optimus.nix;
|
||||
|
||||
# LDAP host
|
||||
kitt.imports = [
|
||||
./machines/kitt.nix
|
||||
skynet_ldap_backend.nixosModule.${system}
|
||||
];
|
||||
kitt = import ./machines/kitt.nix;
|
||||
|
||||
# Gitlab
|
||||
glados = import ./machines/glados.nix;
|
||||
|
@ -86,7 +66,7 @@
|
|||
wheatly = import ./machines/wheatly.nix;
|
||||
|
||||
# email
|
||||
gir.imports = [ ./machines/gir.nix simple-nixos-mailserver.nixosModule];
|
||||
gir = import ./machines/gir.nix;
|
||||
|
||||
# backup 1
|
||||
neuromancer = import ./machines/neuromancer.nix;
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ pkgs, modulesPath, config, options, ... }:
|
||||
{ pkgs, modulesPath, config, options, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
|
||||
# for the secrets
|
||||
inputs.agenix.nixosModule
|
||||
|
||||
# every sever may need the firewall config stuff
|
||||
../applications/firewall.nix
|
||||
|
||||
|
|
Loading…
Reference in a new issue