roles, services: refactor into modules
This commit is contained in:
parent
eb6370be98
commit
77a32313e9
40 changed files with 41 additions and 26 deletions
.sops.yaml
build01
build02
build03
build04
docs
flake.nixmodules/nixos
auto-upgrade.nix
builder
common.nixdisko.nixhercules-ci
hydra
nix-community-cache
nix-daemon.nixnur-update
raid.nixremote-builder
security.nixsops-nix.nixusers.nixwatch-store.nixzfs.nix
|
@ -57,7 +57,7 @@ creation_rules:
|
||||||
- *ryantm
|
- *ryantm
|
||||||
- *zimbatm
|
- *zimbatm
|
||||||
- *zowoq
|
- *zowoq
|
||||||
- path_regex: roles/hercules-ci/.+\.yaml$
|
- path_regex: modules/nixos/hercules-ci/.+\.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *build02
|
- *build02
|
||||||
|
@ -67,7 +67,7 @@ creation_rules:
|
||||||
- *ryantm
|
- *ryantm
|
||||||
- *zimbatm
|
- *zimbatm
|
||||||
- *zowoq
|
- *zowoq
|
||||||
- path_regex: roles/.+\.yaml$
|
- path_regex: modules/.+\.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *build01
|
- *build01
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
../roles/common.nix
|
inputs.self.nixosModules.common
|
||||||
../roles/raid.nix
|
inputs.self.nixosModules.raid
|
||||||
../roles/zfs.nix
|
inputs.self.nixosModules.zfs
|
||||||
../roles/builder
|
inputs.self.nixosModules.builder
|
||||||
../roles/remote-builder/aarch64-nixos-community.nix
|
inputs.self.nixosModules.remote-builder-aarch64-nixos-community
|
||||||
];
|
];
|
||||||
|
|
||||||
# Emulate riscv64 until we have proper builders
|
# Emulate riscv64 until we have proper builders
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
./nixpkgs-update.nix
|
./nixpkgs-update.nix
|
||||||
./nixpkgs-update-backup.nix
|
./nixpkgs-update-backup.nix
|
||||||
../roles/common.nix
|
inputs.self.nixosModules.common
|
||||||
../roles/hercules-ci
|
inputs.self.nixosModules.hercules-ci
|
||||||
../roles/raid.nix
|
inputs.self.nixosModules.raid
|
||||||
../roles/zfs.nix
|
inputs.self.nixosModules.zfs
|
||||||
../roles/remote-builder/aarch64-build04.nix
|
inputs.self.nixosModules.remote-builder-aarch64-build04
|
||||||
];
|
];
|
||||||
|
|
||||||
# /boot is a mirror raid
|
# /boot is a mirror raid
|
||||||
|
|
|
@ -179,7 +179,7 @@ in
|
||||||
|
|
||||||
sops.secrets.nix-community-cachix = {
|
sops.secrets.nix-community-cachix = {
|
||||||
path = "/home/r-ryantm/.config/cachix/cachix.dhall";
|
path = "/home/r-ryantm/.config/cachix/cachix.dhall";
|
||||||
sopsFile = "${toString inputs.self}/roles/nix-community-cache/secrets.yaml";
|
sopsFile = "${toString inputs.self}/modules/nixos/nix-community-cache/secrets.yaml";
|
||||||
owner = "r-ryantm";
|
owner = "r-ryantm";
|
||||||
group = "r-ryantm";
|
group = "r-ryantm";
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
imports = [
|
imports = [
|
||||||
inputs.srvos.nixosModules.mixins-nginx
|
inputs.srvos.nixosModules.mixins-nginx
|
||||||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||||
../roles/common.nix
|
inputs.self.nixosModules.common
|
||||||
../roles/hercules-ci
|
inputs.self.nixosModules.hercules-ci
|
||||||
../roles/raid.nix
|
inputs.self.nixosModules.raid
|
||||||
../roles/zfs.nix
|
inputs.self.nixosModules.zfs
|
||||||
../roles/remote-builder/aarch64-build04.nix
|
inputs.self.nixosModules.remote-builder-aarch64-build04
|
||||||
|
|
||||||
../services/hydra
|
inputs.self.nixosModules.hydra
|
||||||
../services/nur-update
|
inputs.self.nixosModules.nur-update
|
||||||
];
|
];
|
||||||
|
|
||||||
# /boot is a mirror raid
|
# /boot is a mirror raid
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../roles/common.nix
|
inputs.self.nixosModules.common
|
||||||
../roles/hercules-ci
|
inputs.self.nixosModules.hercules-ci
|
||||||
../roles/remote-builder/user.nix
|
inputs.self.nixosModules.remote-builder-user
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.system = "aarch64-linux";
|
nixpkgs.system = "aarch64-linux";
|
||||||
|
|
||||||
# disable kvm/nixos-tests
|
# disable kvm/nixos-tests
|
||||||
nix.settings.system-features = [ "big-parallel" ]; # sync with roles/remote-builder/aarch64-build04.nix
|
nix.settings.system-features = [ "big-parallel" ]; # sync with modules/nixos/remote-builder/aarch64-build04.nix
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.systemd-boot.configurationLimit = 3;
|
boot.loader.systemd-boot.configurationLimit = 3;
|
||||||
|
|
|
@ -4,7 +4,7 @@ We provide an `x86_64-linux` build machine as a public remote builder for the ni
|
||||||
|
|
||||||
#### Access
|
#### Access
|
||||||
|
|
||||||
If you want access read the security guide lines on [aarch64-build-box](https://github.com/nix-community/aarch64-build-box). Than add your username to [`roles/builder/users.nix`](https://github.com/nix-community/infra/blob/master/roles/builder/users.nix). Don't keep any important data in your home! We will regularly delete `/home` without further notice.
|
If you want access read the security guide lines on [aarch64-build-box](https://github.com/nix-community/aarch64-build-box). Than add your username to [`builder/users.nix`](https://github.com/nix-community/infra/blob/master/modules/nixos/builder/users.nix). Don't keep any important data in your home! We will regularly delete `/home` without further notice.
|
||||||
|
|
||||||
#### Using your NixOS home-manager configuration on the hosts
|
#### Using your NixOS home-manager configuration on the hosts
|
||||||
|
|
||||||
|
|
15
flake.nix
15
flake.nix
|
@ -114,6 +114,21 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake.nixosModules = {
|
||||||
|
common = ./modules/nixos/common.nix;
|
||||||
|
|
||||||
|
builder = ./modules/nixos/builder;
|
||||||
|
hercules-ci = ./modules/nixos/hercules-ci;
|
||||||
|
hydra = ./modules/nixos/hydra;
|
||||||
|
nur-update = ./modules/nixos/nur-update;
|
||||||
|
raid = ./modules/nixos/raid.nix;
|
||||||
|
remote-builder-aarch64-build04 = ./modules/nixos/remote-builder/aarch64-build04.nix;
|
||||||
|
remote-builder-aarch64-nixos-community = ./modules/nixos/remote-builder/aarch64-nixos-community.nix;
|
||||||
|
remote-builder-user = ./modules/nixos/remote-builder/user.nix;
|
||||||
|
watch-store = ./modules/nixos/watch-store.nix;
|
||||||
|
zfs = ./modules/nixos/zfs.nix;
|
||||||
|
};
|
||||||
|
|
||||||
flake.lib.nixosSystem = args:
|
flake.lib.nixosSystem = args:
|
||||||
inputs.nixpkgs.lib.nixosSystem ({ specialArgs = { inherit inputs; }; } // args);
|
inputs.nixpkgs.lib.nixosSystem ({ specialArgs = { inherit inputs; }; } // args);
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@ in
|
||||||
];
|
];
|
||||||
nix.settings.post-build-hook = "${upload-to-cachix}/bin/upload-to-cachix";
|
nix.settings.post-build-hook = "${upload-to-cachix}/bin/upload-to-cachix";
|
||||||
|
|
||||||
sops.secrets.nix-community-cachix.sopsFile = "${toString inputs.self}/roles/nix-community-cache/secrets.yaml";
|
sops.secrets.nix-community-cachix.sopsFile = "${toString inputs.self}/modules/nixos/nix-community-cache/secrets.yaml";
|
||||||
sops.secrets.id_buildfarm = { };
|
sops.secrets.id_buildfarm = { };
|
||||||
|
|
||||||
# delete build logs older than 30 days
|
# delete build logs older than 30 days
|
Loading…
Add table
Reference in a new issue