This commit is contained in:
2026-01-04 16:33:14 -06:00
parent e4e6db94aa
commit cc834fd85d
5 changed files with 10 additions and 67 deletions

View File

@@ -25,7 +25,7 @@ creation_rules:
- *laptop
- *homebox
- *android
- path_regex: system-config/secrets.yaml$
- path_regex: system/secrets.yaml$
key_groups:
- age:
- *laptop

View File

@@ -1,33 +1,7 @@
keys:
- &homebox age1640eg0pnmkruc89m5xguz0m8fek44fl4tzez6qwuzlz6kmapqewsp8esxd
- &laptop age1yqgyp2uxz4lzrc9f9ka0mfjl5fr6ahf8nf24nlmran2wulg6fpvq9hyp9q
- &android age12pnf36uqesjmy3e0lythfnpwam3zg5mv8m936fc4jphy4ces2fdqwn0s74
creation_rules:
- path_regex: homebox/secrets.yaml$
key_groups:
- age:
- *homebox
- path_regex: laptop/secrets.yaml$
- path_regex: ^secrets.yaml$
key_groups:
- age:
- *laptop
- path_regex: pi4/secrets.yaml$
key_groups:
- age:
- *laptop
- path_regex: live/secrets.yaml$
key_groups:
- age:
- *laptop
- path_regex: nathan/secrets.yaml$
key_groups:
- age:
- *laptop
- *homebox
- *android
- path_regex: system-config/secrets.yaml$
key_groups:
- age:
- *laptop
- *homebox
- *android

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, modulesPath, ... }: {
{ config, lib, nixpkgs, ... }: {
imports = [
./services
@@ -28,41 +28,10 @@
config = {
sops.secrets = (if config.sysconfig.remoteBuildHost then (
builtins.listToAttrs
(builtins.map
(y: {
name = "remoteBuildClientKeys/${y}";
value = {
format = "yaml";
sopsFile = ./secrets.yaml;
};
})
(builtins.partition
(z: let
cfg = if
((builtins.readDir ./configuration).${z} == "directory")
then (import ./configuration/${z} {
config = {};
inherit lib pkgs inputs modulesPath;
}).config
else null;
test = if cfg == null then false
else if !(cfg ? sysconfig) then false
else if !(cfg.sysconfig ? remoteBuildClient) then false
else cfg.sysconfig.remoteBuildClient;
in test)
(builtins.attrNames (builtins.readDir ./configuration))
).right
)
) else {}) // {
"remoteBuildKey" = lib.mkIf config.sysconfig.remoteBuildClient {};
};
networking.hostName = lib.mkDefault config.sysconfig.host;
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
nixPath = [ "nixpkgs=${nixpkgs}" ];
channel.enable = false;
settings = {
experimental-features = [ "nix-command" "flakes" ];
@@ -73,7 +42,7 @@
distributedBuilds = config.sysconfig.remoteBuildClient;
buildMachines = lib.mkIf config.sysconfig.remoteBuildClient [
{
hostName = "blunkall.us";
hostName = "esotericbytes.com";
sshUser = "remote-builder";
sshKey = config.sops.secrets."remoteBuildKey".path;
supportedFeatures = [

View File

@@ -1,11 +1,11 @@
{ config, pkgs, lib, inputs, ... }:
{ config, pkgs, lib, home-manager, sops-nix, ... }:
{
imports = [
inputs.home-manager.nixosModules.default
home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops
sops-nix.nixosModules.sops
];
config = {

View File

@@ -32,9 +32,9 @@
defaultBranch = "master";
};
url = {
"ssh://gitea@gitea.blunkall.us/" = {
"ssh://gitea@esotericbytes.com/" = {
insteadOf = [
"blunkall:"
"server:"
];
};
};