nixos/flake.nix

189 lines
4.7 KiB
Nix
Raw Normal View History

2023-01-25 11:48:44 +00:00
{
description = "Deployment for skynet";
inputs = {
# gonna start off with a fairly modern base
nixpkgs.url = "nixpkgs/nixos-unstable";
# Return to using unstable once the current master is merged in
# nixpkgs.url = "nixpkgs/nixos-unstable";
2023-01-25 11:48:44 +00:00
2023-01-25 11:48:44 +00:00
# utility stuff
flake-utils.url = "github:numtide/flake-utils";
agenix.url = "github:ryantm/agenix";
arion.url = "github:hercules-ci/arion";
alejandra = {
url = "github:kamadorueda/alejandra/3.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-04-20 01:08:57 +00:00
colmena.url = "github:zhaofengli/colmena";
attic.url = github:zhaofengli/attic;
2023-01-25 11:48:44 +00:00
# email
# simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
simple-nixos-mailserver = {
2024-02-04 20:17:46 +00:00
inputs.nixpkgs.follows = "nixpkgs";
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "misc%2Fnixos-mailserver";
};
# account.skynet.ie
skynet_ldap_backend = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "ldap%2Fbackend";
};
skynet_ldap_frontend = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "ldap%2Ffrontend";
};
skynet_website_renew = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2Falumni-renew";
};
skynet_website_games = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2Fgames.skynet.ie";
};
skynet_discord_bot = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "discord-bot";
};
compsoc_public = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fcompsoc";
repo = "presentations%2Fpresentations";
};
2024-06-14 20:34:43 +00:00
# skynet.ie
skynet_website = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2017";
};
skynet_website_2023 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2017";
rev = "c4d61c753292bf73ed41b47b1607cfc92a82a191";
};
2024-06-14 20:34:43 +00:00
skynet_website_2017 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2017";
};
skynet_website_2009 = {
type = "gitlab";
host = "gitlab.skynet.ie";
owner = "compsoc1%2Fskynet";
repo = "website%2F2009";
};
2023-01-25 11:48:44 +00:00
};
nixConfig = {
bash-prompt-suffix = "[Skynet Dev] ";
extra-substituters = "https://nix-cache.skynet.ie/skynet-cache";
2024-06-03 19:03:49 +00:00
extra-trusted-public-keys = "skynet-cache:zMFLzcRZPhUpjXUy8SF8Cf7KGAZwo98SKrzeXvdWABo=";
};
outputs = {
self,
nixpkgs,
agenix,
alejandra,
2024-04-20 01:08:57 +00:00
colmena,
...
} @ inputs: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in {
formatter.x86_64-linux = alejandra.defaultPackage."x86_64-linux";
devShells.x86_64-linux.default = pkgs.mkShell {
name = "Skynet build env";
nativeBuildInputs = [
pkgs.buildPackages.git
2024-04-20 01:08:57 +00:00
colmena.defaultPackage."x86_64-linux"
pkgs.attic-client
pkgs.buildPackages.nmap
];
buildInputs = [agenix.packages.x86_64-linux.default];
2023-10-11 08:17:40 +00:00
shellHook = ''export EDITOR="${pkgs.nano}/bin/nano --nonewlines"; unset LD_LIBRARY_PATH;'';
};
2023-01-25 11:48:44 +00:00
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
2023-01-25 11:48:44 +00:00
overlays = [];
};
2023-07-21 20:27:01 +00:00
specialArgs = {
2024-07-20 11:21:30 +00:00
inherit inputs self;
};
2023-01-25 11:48:44 +00:00
};
# installed for each machine
defaults = import ./machines/_base.nix;
2023-01-25 11:48:44 +00:00
# firewall machiene
agentjones = import ./machines/agentjones.nix;
# ns1
vendetta = import ./machines/vendetta.nix;
# ns2
2023-01-25 11:48:44 +00:00
vigil = import ./machines/vigil.nix;
# icecast - ULFM
galatea = import ./machines/galatea.nix;
2023-06-14 20:53:48 +00:00
# LDAP host
kitt = import ./machines/kitt.nix;
2023-06-14 19:45:34 +00:00
2023-06-15 01:47:56 +00:00
# Gitlab
glados = import ./machines/glados.nix;
2023-06-17 18:37:06 +00:00
# Gitlab runners
wheatly = import ./machines/wheatly.nix;
# email
gir = import ./machines/gir.nix;
# backup 1
neuromancer = import ./machines/neuromancer.nix;
# Skynet, user ssh access
2023-07-20 21:05:46 +00:00
skynet = import ./machines/skynet.nix;
# Main skynet sites
earth = import ./machines/earth.nix;
2023-10-25 18:28:09 +00:00
# Nextcloud
cadie = import ./machines/cadie.nix;
# trainee server
marvin = import ./machines/marvin.nix;
# Public Services
calculon = import ./machines/calculon.nix;
# metrics
ariia = import ./machines/ariia.nix;
2023-01-25 11:48:44 +00:00
};
};
}