Compare commits
3 Commits
9210767036
...
e777528435
Author | SHA1 | Date | |
---|---|---|---|
e777528435 | |||
6beb8db05a | |||
1f7ffd82ba |
@ -2,8 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
|
||||
./backup.nix
|
||||
./locale.nix
|
||||
./networking.nix
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
# Deployment
|
||||
bij
|
||||
colmena
|
||||
clerie-sops
|
||||
clerie-sops-edit
|
||||
sops
|
||||
|
14
flake.nix
14
flake.nix
@ -92,11 +92,10 @@
|
||||
|
||||
nixosConfigurations = helper.mapToNixosConfigurations self.clerie.hosts;
|
||||
|
||||
colmena = {
|
||||
meta = {
|
||||
nixpkgs = localNixpkgs.x86_64-linux;
|
||||
nixosModules = {
|
||||
clerie = import ./modules;
|
||||
default = self.nixosModules.clerie;
|
||||
};
|
||||
} // helper.mapToColmenaHosts self.nixosConfigurations;
|
||||
|
||||
overlays = {
|
||||
nixfilesInputs = import ./flake/overlay.nix inputs;
|
||||
@ -130,12 +129,7 @@
|
||||
|
||||
inherit lib self;
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self)
|
||||
packages;
|
||||
nixosConfigurations = helper.buildHosts self.nixosConfigurations;
|
||||
iso = self.nixosConfigurations._iso.config.system.build.isoImage;
|
||||
};
|
||||
hydraJobs = import ./flake/hydraJobs.nix inputs;
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
|
15
flake/hydraJobs.nix
Normal file
15
flake/hydraJobs.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ 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,10 +10,7 @@ let
|
||||
flake-helper = callLibs ./flake-helper.nix;
|
||||
inherit ("flake-helper")
|
||||
generateNixosSystem
|
||||
mapToNixosConfigurations
|
||||
generateColmenaHost
|
||||
mapToColmenaHosts
|
||||
buildHosts;
|
||||
mapToNixosConfigurations;
|
||||
clerie-monitoring-ids = callLibs ./clerie-monitoring-ids.nix;
|
||||
};
|
||||
|
||||
|
@ -11,6 +11,7 @@ rec {
|
||||
in localNixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
modules = modules ++ [
|
||||
self.nixosModules.clerie
|
||||
({ ... }: {
|
||||
/*
|
||||
Make the contents of the flake availiable to modules.
|
||||
@ -54,21 +55,4 @@ rec {
|
||||
};
|
||||
|
||||
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