summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorseth <[email protected]>2023-05-24 06:53:12 -0400
committerseth <[email protected]>2023-05-24 06:53:12 -0400
commit632052e752becd11408ae909b8e70956cd259d64 (patch)
treeb6d94b19b8a9bfa1d2504dd1db0356d500ce54d6 /hosts
parent7be1973f71ba26c667ebd09b9d007815bb2fd1f3 (diff)
atlas/p-body: enable github auth for wheel users
Diffstat (limited to 'hosts')
-rw-r--r--hosts/atlas/default.nix16
-rw-r--r--hosts/p-body/default.nix12
-rw-r--r--hosts/p-body/hydra.nix1
3 files changed, 28 insertions, 1 deletions
diff --git a/hosts/atlas/default.nix b/hosts/atlas/default.nix
index 11db15e..0146b72 100644
--- a/hosts/atlas/default.nix
+++ b/hosts/atlas/default.nix
@@ -1,6 +1,7 @@
{
config,
pkgs,
+ self,
...
}: {
imports = [
@@ -19,6 +20,13 @@
hermetic = false;
};
+ age.secrets.authGH = {
+ file = "${self}/secrets/hosts/${config.networking.hostName}/authGH.age";
+ mode = "440";
+ owner = config.users.users.root.name;
+ group = config.users.groups.wheel.name;
+ };
+
boot = {
binfmt.emulatedSystems = ["x86_64-linux" "i686-linux"];
cleanTmpDir = true;
@@ -35,7 +43,13 @@
hostName = "atlas";
};
- nix.settings.trusted-users = ["bob"];
+ nix = {
+ extraOptions = ''
+ !include ${config.age.secrets.authGH.path}
+ '';
+
+ settings.trusted-users = ["bob"];
+ };
system.stateVersion = "22.11";
diff --git a/hosts/p-body/default.nix b/hosts/p-body/default.nix
index e303e36..e4368b4 100644
--- a/hosts/p-body/default.nix
+++ b/hosts/p-body/default.nix
@@ -3,6 +3,7 @@
guzzle_api,
modulesPath,
pkgs,
+ self,
...
}: {
imports = [
@@ -25,6 +26,13 @@
hermetic = false;
};
+ age.secrets.authGH = {
+ file = "${self}/secrets/hosts/${config.networking.hostName}/authGH.age";
+ mode = "440";
+ owner = config.users.users.root.name;
+ inherit (config.users.users.hydra) group;
+ };
+
getchoo.server.secrets.enable = true;
networking = {
@@ -32,6 +40,10 @@
hostName = "p-body";
};
+ nix.extraOptions = ''
+ !include ${config.age.secrets.authGH.path}
+ '';
+
services = {
guzzle-api = {
enable = true;
diff --git a/hosts/p-body/hydra.nix b/hosts/p-body/hydra.nix
index 115e077..5ed44e2 100644
--- a/hosts/p-body/hydra.nix
+++ b/hosts/p-body/hydra.nix
@@ -55,6 +55,7 @@ in {
nix.settings.trusted-users = ["@${hydraGroup}"];
users.users = {
+ ${hostName}.extraGroups = [hydraGroup];
hydra-queue-runner.extraGroups = [hydraGroup];
hydra-www.extraGroups = [hydraGroup];
};