parent
9db2dcf124
commit
c0babce452
10 changed files with 95 additions and 95 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, ... }:
|
{ ... }:
|
||||||
# Boot recovery:
|
# Boot recovery:
|
||||||
# Activate 64-bit Rescue system in https://robot.your-server.de/server
|
# Activate 64-bit Rescue system in https://robot.your-server.de/server
|
||||||
# ssh root@build01.nix-community.org "mount /dev/md[0-9]* /mnt && /mnt/kexec_bundle"
|
# ssh root@build01.nix-community.org "mount /dev/md[0-9]* /mnt && /mnt/kexec_bundle"
|
||||||
|
@ -11,7 +11,6 @@
|
||||||
# nixos-enter
|
# nixos-enter
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
../roles/raid.nix
|
../roles/raid.nix
|
||||||
../roles/zfs.nix
|
../roles/zfs.nix
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ self, ... }:
|
|
||||||
{
|
|
||||||
flake.nixosConfigurations.build01 = self.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./configuration.nix ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,9 +1,7 @@
|
||||||
{ inputs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.srvos.nixosModules.mixins-nginx
|
|
||||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
|
||||||
./nixpkgs-update.nix
|
./nixpkgs-update.nix
|
||||||
./nixpkgs-update-backup.nix
|
./nixpkgs-update-backup.nix
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ self, ... }:
|
|
||||||
{
|
|
||||||
flake.nixosConfigurations.build02 = self.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./configuration.nix ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
# Boot recovery:
|
# Boot recovery:
|
||||||
# Activate 64-bit Rescue system in https://robot.your-server.de/server
|
# Activate 64-bit Rescue system in https://robot.your-server.de/server
|
||||||
|
@ -10,8 +10,6 @@
|
||||||
# $ zpool import -f zroot && mount -t zfs zroot/root/nixos /mnt && mount -t zfs zroot/root/home /mnt/home && mount /dev/md[0-9]* /mnt/boot
|
# $ zpool import -f zroot && mount -t zfs zroot/root/nixos /mnt && mount -t zfs zroot/root/home /mnt/home && mount /dev/md[0-9]* /mnt/boot
|
||||||
# $ nixos-enter
|
# $ nixos-enter
|
||||||
imports = [
|
imports = [
|
||||||
inputs.srvos.nixosModules.mixins-nginx
|
|
||||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
../roles/hercules-ci
|
../roles/hercules-ci
|
||||||
../roles/watch-store.nix
|
../roles/watch-store.nix
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ self, ... }:
|
|
||||||
{
|
|
||||||
flake.nixosConfiguration.build03 = self.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [ ./configuration.nix ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ inputs, ... }:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
../roles/hercules-ci
|
../roles/hercules-ci
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ self, ... }:
|
|
||||||
{
|
|
||||||
flake.nixosConfigurations.build04 = self.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
|
||||||
modules = [ ./configuration.nix ];
|
|
||||||
};
|
|
||||||
}
|
|
139
flake.nix
139
flake.nix
|
@ -42,64 +42,107 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { flake-parts, self, ... }:
|
outputs = inputs @ { flake-parts, self, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake
|
||||||
systems = [
|
{ inherit inputs; }
|
||||||
"aarch64-darwin"
|
{
|
||||||
"aarch64-linux"
|
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
"x86_64-darwin"
|
|
||||||
"x86_64-linux"
|
|
||||||
];
|
|
||||||
|
|
||||||
herculesCI = { lib, ... }: {
|
herculesCI = { lib, ... }: {
|
||||||
ciSystems = [ "x86_64-linux" "aarch64-linux" ];
|
ciSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
|
||||||
onPush.default.outputs = {
|
onPush.default.outputs = {
|
||||||
checks = lib.mkForce self.outputs.checks.x86_64-linux;
|
checks = lib.mkForce self.outputs.checks.x86_64-linux;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
hercules-ci.flake-update = {
|
hercules-ci.flake-update = {
|
||||||
enable = true;
|
enable = true;
|
||||||
createPullRequest = true;
|
createPullRequest = true;
|
||||||
autoMergeMethod = "rebase";
|
autoMergeMethod = "rebase";
|
||||||
when = {
|
when = {
|
||||||
hour = [ 2 ];
|
hour = [ 2 ];
|
||||||
dayOfWeek = [ "Mon" "Thu" ];
|
dayOfWeek = [ "Mon" "Thu" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
hercules-ci.github-pages.branch = "master";
|
imports = [
|
||||||
|
inputs.hercules-ci-effects.flakeModule
|
||||||
|
inputs.treefmt-nix.flakeModule
|
||||||
|
./effect.nix
|
||||||
|
./shell.nix
|
||||||
|
];
|
||||||
|
|
||||||
imports = [
|
hercules-ci.github-pages.branch = "master";
|
||||||
inputs.hercules-ci-effects.flakeModule
|
|
||||||
inputs.treefmt-nix.flakeModule
|
|
||||||
./effect.nix
|
|
||||||
./shell.nix
|
|
||||||
./build01
|
|
||||||
./build02
|
|
||||||
./build03
|
|
||||||
./build04
|
|
||||||
];
|
|
||||||
|
|
||||||
perSystem = { config, pkgs, ... }: {
|
perSystem = { config, pkgs, ... }: {
|
||||||
treefmt.imports = [ ./treefmt.nix ];
|
treefmt.imports = [ ./treefmt.nix ];
|
||||||
|
|
||||||
packages.pages = pkgs.runCommand "pages"
|
packages.pages = pkgs.runCommand "pages"
|
||||||
|
{
|
||||||
|
buildInputs = [ pkgs.python3.pkgs.mkdocs-material ];
|
||||||
|
} ''
|
||||||
|
cp -r ${pkgs.lib.cleanSource ./.}/* .
|
||||||
|
mkdocs build --strict --site-dir $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
hercules-ci.github-pages.settings.contents = config.packages.pages;
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.nixosConfigurations =
|
||||||
|
let
|
||||||
|
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||||
|
common = [
|
||||||
|
{ _module.args.inputs = inputs; }
|
||||||
|
{ srvos.flake = inputs.self; }
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.srvos.nixosModules.server
|
||||||
|
|
||||||
|
inputs.srvos.nixosModules.mixins-telegraf
|
||||||
|
{ networking.firewall.allowedTCPPorts = [ 9273 ]; }
|
||||||
|
];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
buildInputs = [ pkgs.python3.pkgs.mkdocs-material ];
|
build01 = nixosSystem {
|
||||||
} ''
|
system = "x86_64-linux";
|
||||||
cp -r ${pkgs.lib.cleanSource ./.}/* .
|
modules =
|
||||||
mkdocs build --strict --site-dir $out
|
common
|
||||||
'';
|
++ [
|
||||||
|
./build01/configuration.nix
|
||||||
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
hercules-ci.github-pages.settings.contents = config.packages.pages;
|
build02 = nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules =
|
||||||
|
common
|
||||||
|
++ [
|
||||||
|
./build02/configuration.nix
|
||||||
|
inputs.srvos.nixosModules.mixins-nginx
|
||||||
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
build03 = nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules =
|
||||||
|
common
|
||||||
|
++ [
|
||||||
|
./build03/configuration.nix
|
||||||
|
inputs.srvos.nixosModules.mixins-nginx
|
||||||
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
build04 = nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules =
|
||||||
|
common
|
||||||
|
++ [
|
||||||
|
./build04/configuration.nix
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.lib.nixosSystem = args:
|
|
||||||
inputs.nixpkgs.lib.nixosSystem ({ specialArgs = { inherit inputs; }; } // args);
|
|
||||||
|
|
||||||
flake.nixosModules = {
|
|
||||||
common = ./roles/common.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./auto-upgrade.nix
|
./auto-upgrade.nix
|
||||||
|
@ -6,15 +6,8 @@
|
||||||
./security.nix
|
./security.nix
|
||||||
./sops-nix.nix
|
./sops-nix.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
inputs.srvos.nixosModules.mixins-telegraf
|
|
||||||
inputs.srvos.nixosModules.server
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 9273 ];
|
|
||||||
|
|
||||||
srvos.flake = inputs.self;
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
# https://github.com/hercules-ci/hercules-ci-agent/issues/514
|
# https://github.com/hercules-ci/hercules-ci-agent/issues/514
|
||||||
|
|
Loading…
Add table
Reference in a new issue