Skip to content

Commit

Permalink
ghaf-webserver: Add gala uploaders
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Lindqvist <[email protected]>
  • Loading branch information
Marko Lindqvist authored and cazfi committed Dec 16, 2024
1 parent 9b854fd commit 2287231
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions hosts/ghaf-webserver/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
imports =
[
./disk-config.nix
./gala_uploaders.nix
(modulesPath + "/profiles/qemu-guest.nix")
inputs.sops-nix.nixosModules.sops
inputs.disko.nixosModules.disko
Expand Down
48 changes: 48 additions & 0 deletions hosts/ghaf-webserver/gala_uploaders.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{ lib, ... }:
let
groupName = "gala";

# add new uploaders here
uploaders = [
{
desc = "Mikko Koivisto";
name = "mikko_koivisto";
keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHx2xDbBcBFRCQ8vtA47UMT4zBasUWxK+1CYOQSrv2BL [email protected]"
];
}
{
desc = "Nikita Bazulin";
name = "nikita.bazulin";
keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL/8+QSIlYHTMS6SOTd59WudS76HtZmbnSTSO04icPw1 [email protected]"
];
}
];
in
{
users = {
groups."${groupName}" = { };

users = builtins.listToAttrs (
map (
{
desc,
name,
keys,
}:
lib.nameValuePair name {
inherit name;

description = desc;
openssh.authorizedKeys.keys = keys;

isNormalUser = true;
extraGroups = [ groupName ];
}
) uploaders
);
};
}

0 comments on commit 2287231

Please sign in to comment.