2019-12-03 05:18:30 +00:00
|
|
|
{
|
2023-09-12 20:07:05 +00:00
|
|
|
description = "b12f hosts";
|
2019-12-05 05:36:36 +00:00
|
|
|
|
2020-08-02 04:08:41 +00:00
|
|
|
inputs = {
|
2022-04-09 14:40:03 +00:00
|
|
|
# Track channels with commits tested and built by hydra
|
2023-12-17 16:14:19 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
2023-10-05 08:44:48 +00:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2022-11-07 10:24:59 +00:00
|
|
|
flake-compat.url = "github:edolstra/flake-compat";
|
|
|
|
flake-compat.flake = false;
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2023-12-17 16:14:19 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
2023-09-12 20:07:05 +00:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
nixos-flake.url = "github:srid/nixos-flake";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
deploy-rs.inputs.flake-compat.follows = "flake-compat";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2021-05-13 17:35:23 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2023-09-12 20:07:05 +00:00
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2021-03-02 03:30:47 +00:00
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2024-02-08 18:00:15 +00:00
|
|
|
impermanence.url = "github:nix-community/impermanence";
|
|
|
|
|
2023-10-03 12:21:09 +00:00
|
|
|
mobile-nixos.url = "github:nixos/mobile-nixos";
|
|
|
|
mobile-nixos.flake = false;
|
|
|
|
|
2023-09-11 21:51:13 +00:00
|
|
|
musnix.url = "github:musnix/musnix";
|
2023-10-07 12:06:28 +00:00
|
|
|
|
2023-09-11 21:51:13 +00:00
|
|
|
adblock-unbound.url = "github:MayNiklas/nixos-adblock-unbound";
|
2023-09-12 20:07:05 +00:00
|
|
|
adblock-unbound.inputs.nixpkgs.follows = "nixpkgs";
|
2024-02-27 08:41:03 +00:00
|
|
|
|
|
|
|
openstreetmap.url = "github:b12f/nixos-openstreetmap/flake-nixosmodule";
|
|
|
|
openstreetmap.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
outputs = inputs@{ self, ... }:
|
|
|
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
2022-01-31 16:47:45 +00:00
|
|
|
];
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
imports = [
|
|
|
|
inputs.nixos-flake.flakeModule
|
2023-10-03 11:34:34 +00:00
|
|
|
./lib
|
2023-09-12 20:07:05 +00:00
|
|
|
./modules
|
|
|
|
./hosts
|
|
|
|
./users
|
2023-10-07 18:14:16 +00:00
|
|
|
./overlays
|
2023-09-12 20:07:05 +00:00
|
|
|
];
|
2021-07-16 21:01:25 +00:00
|
|
|
|
2023-10-07 12:06:28 +00:00
|
|
|
perSystem = args@{ system, pkgs, lib, config, ... }: {
|
2023-09-12 20:07:05 +00:00
|
|
|
_module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
pkgs = import inputs.nixpkgs {
|
|
|
|
inherit system;
|
2023-10-07 15:29:12 +00:00
|
|
|
overlays = [ inputs.agenix.overlays.default ];
|
2021-07-16 21:01:25 +00:00
|
|
|
};
|
2021-04-22 03:44:15 +00:00
|
|
|
};
|
2021-07-16 21:01:25 +00:00
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
2023-11-12 17:17:35 +00:00
|
|
|
packages = with pkgs; [
|
|
|
|
nix
|
2023-10-03 12:21:09 +00:00
|
|
|
agenix
|
2024-02-03 11:21:27 +00:00
|
|
|
age-plugin-yubikey
|
2023-10-03 12:21:09 +00:00
|
|
|
cachix
|
2023-11-12 17:17:35 +00:00
|
|
|
|
|
|
|
nixos-generators
|
|
|
|
nvfetcher
|
|
|
|
|
2023-10-03 12:21:09 +00:00
|
|
|
editorconfig-checker
|
|
|
|
nodePackages.prettier
|
|
|
|
shellcheck
|
|
|
|
shfmt
|
|
|
|
treefmt
|
2023-11-12 17:17:35 +00:00
|
|
|
nixpkgs-fmt
|
|
|
|
|
|
|
|
deploy-rs
|
|
|
|
|
2023-12-17 16:14:19 +00:00
|
|
|
# terraform
|
|
|
|
# terraform-backend-git
|
2023-09-12 20:07:05 +00:00
|
|
|
];
|
2023-11-12 17:17:35 +00:00
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
export TF_BACKEND_GIT_GIT_REPOSITORY=gitea@git.pub.solar:b12f/terraform-state.git
|
|
|
|
export TF_BACKEND_GIT_GIT_REF=main
|
|
|
|
export TF_BACKEND_GIT_GIT_STATE=b12f.json
|
|
|
|
export TF_BACKEND_HTTP_ENCRYPTION_PROVIDER=sops
|
|
|
|
export TF_BACKEND_HTTP_SOPS_PGP_FP=4406E80E13CD656C
|
|
|
|
export HOSTINGDE_AUTH_TOKEN=$(secret-tool lookup hosting-de terraform-auth-token)
|
|
|
|
'';
|
2023-02-01 12:52:00 +00:00
|
|
|
};
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
2021-04-22 03:44:15 +00:00
|
|
|
|
2023-09-12 20:07:05 +00:00
|
|
|
flake = {
|
2023-10-07 12:06:28 +00:00
|
|
|
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
|
2023-10-03 11:50:01 +00:00
|
|
|
chocolatebar = {
|
|
|
|
sshUser = "b12f";
|
|
|
|
};
|
|
|
|
|
|
|
|
biolimo = {
|
|
|
|
sshUser = "b12f";
|
|
|
|
};
|
|
|
|
|
2024-01-27 22:53:36 +00:00
|
|
|
stroopwafel = {
|
|
|
|
sshUser = "b12f";
|
|
|
|
};
|
|
|
|
|
2023-10-03 11:50:01 +00:00
|
|
|
droppie = {
|
2023-10-08 17:32:00 +00:00
|
|
|
hostname = "droppie.b12f.io";
|
2023-10-03 11:34:34 +00:00
|
|
|
sshUser = "yule";
|
|
|
|
};
|
|
|
|
|
2023-10-03 11:50:01 +00:00
|
|
|
pie = {
|
2023-10-24 13:54:04 +00:00
|
|
|
hostname = "pie.b12f.io";
|
2023-10-03 11:34:34 +00:00
|
|
|
sshUser = "yule";
|
|
|
|
};
|
2023-09-12 18:11:29 +00:00
|
|
|
|
2023-10-24 13:54:04 +00:00
|
|
|
frikandel = {
|
|
|
|
hostname = "frikandel.b12f.io";
|
2023-10-24 15:56:14 +00:00
|
|
|
sshUser = "yule";
|
2023-10-24 13:54:04 +00:00
|
|
|
};
|
|
|
|
|
2023-10-03 11:50:01 +00:00
|
|
|
maoam = {
|
2023-10-03 11:34:34 +00:00
|
|
|
sshUser = "b12f";
|
|
|
|
};
|
2023-09-12 18:11:29 +00:00
|
|
|
};
|
2023-01-28 21:34:24 +00:00
|
|
|
};
|
2022-08-13 20:35:43 +00:00
|
|
|
};
|
2019-12-03 05:18:30 +00:00
|
|
|
}
|