Compare commits
No commits in common. "e7775284350ae8cd848f6239011e915d6d61b81c" and "921076703628bb40e8227299532c7083e547be72" have entirely different histories.
e777528435
...
9210767036
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../../modules
|
||||||
|
|
||||||
./backup.nix
|
./backup.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
# Deployment
|
# Deployment
|
||||||
bij
|
bij
|
||||||
|
colmena
|
||||||
clerie-sops
|
clerie-sops
|
||||||
clerie-sops-edit
|
clerie-sops-edit
|
||||||
sops
|
sops
|
||||||
|
14
flake.nix
14
flake.nix
@ -92,10 +92,11 @@
|
|||||||
|
|
||||||
nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts;
|
nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts;
|
||||||
|
|
||||||
nixosModules = {
|
colmena = {
|
||||||
clerie = import ./modules;
|
meta = {
|
||||||
default = self.nixosModules.clerie;
|
nixpkgs = localNixpkgs.x86_64-linux;
|
||||||
};
|
};
|
||||||
|
} // helper.mapToColmenaHosts self.nixosConfigurations;
|
||||||
|
|
||||||
overlays = {
|
overlays = {
|
||||||
nixfilesInputs = import ./flake/overlay.nix inputs;
|
nixfilesInputs = import ./flake/overlay.nix inputs;
|
||||||
@ -129,7 +130,12 @@
|
|||||||
|
|
||||||
inherit lib self;
|
inherit lib self;
|
||||||
|
|
||||||
hydraJobs = import ./flake/hydraJobs.nix inputs;
|
hydraJobs = {
|
||||||
|
inherit (self)
|
||||||
|
packages;
|
||||||
|
nixosConfigurations = helper.buildHosts self.nixosConfigurations;
|
||||||
|
iso = self.nixosConfigurations._iso.config.system.build.isoImage;
|
||||||
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
{ self
|
|
||||||
, nixpkgs
|
|
||||||
, ...
|
|
||||||
}@inputs:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
buildHosts = hosts: builtins.mapAttrs (name: host: host.config.system.build.toplevel) (nixpkgs.lib.filterAttrs (name: host: (builtins.substring 0 1 name) != "_") hosts);
|
|
||||||
|
|
||||||
in {
|
|
||||||
inherit (self)
|
|
||||||
packages;
|
|
||||||
nixosConfigurations = buildHosts self.nixosConfigurations;
|
|
||||||
iso = self.nixosConfigurations._iso.config.system.build.isoImage;
|
|
||||||
}
|
|
@ -10,7 +10,10 @@ let
|
|||||||
flake-helper = callLibs ./flake-helper.nix;
|
flake-helper = callLibs ./flake-helper.nix;
|
||||||
inherit ("flake-helper")
|
inherit ("flake-helper")
|
||||||
generateNixosSystem
|
generateNixosSystem
|
||||||
mapToNixosConfigurations;
|
mapToNixosConfigurations
|
||||||
|
generateColmenaHost
|
||||||
|
mapToColmenaHosts
|
||||||
|
buildHosts;
|
||||||
clerie-monitoring-ids = callLibs ./clerie-monitoring-ids.nix;
|
clerie-monitoring-ids = callLibs ./clerie-monitoring-ids.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ rec {
|
|||||||
in localNixpkgs.lib.nixosSystem {
|
in localNixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
modules = modules ++ [
|
modules = modules ++ [
|
||||||
self.nixosModules.clerie
|
|
||||||
({ ... }: {
|
({ ... }: {
|
||||||
/*
|
/*
|
||||||
Make the contents of the flake availiable to modules.
|
Make the contents of the flake availiable to modules.
|
||||||
@ -55,4 +54,21 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
mapToNixosConfigurations = hosts: builtins.mapAttrs (name: host: generateNixosSystem host) hosts;
|
mapToNixosConfigurations = hosts: builtins.mapAttrs (name: host: generateNixosSystem host) hosts;
|
||||||
|
|
||||||
|
generateColmenaHost = name: hostSystem: {
|
||||||
|
deployment = {
|
||||||
|
targetHost = hostSystem.config.networking.fqdn;
|
||||||
|
targetUser = null;
|
||||||
|
tags = let
|
||||||
|
group = nixpkgs.lib.attrByPath [ "clerie" "monitoring" "serviceLevel" ] null hostSystem.config;
|
||||||
|
in nixpkgs.lib.lists.optional (group != null) group;
|
||||||
|
};
|
||||||
|
nixpkgs.system = hostSystem.config.nixpkgs.system;
|
||||||
|
imports = hostSystem._module.args.modules;
|
||||||
|
deployment.allowLocalDeployment = builtins.any (n: n == name) [ "osmium" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mapToColmenaHosts = hosts: builtins.mapAttrs (generateColmenaHost) hosts;
|
||||||
|
|
||||||
|
buildHosts = hosts: builtins.mapAttrs (name: host: host.config.system.build.toplevel) (nixpkgs.lib.filterAttrs (name: host: (builtins.substring 0 1 name) != "_") hosts);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user