summary refs log tree commit diff
path: root/fleet/hosts/trieste/git.nix
blob: bba3f9f5ab93e7199c4467ac8b117eb9d46a917d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# SPDX-FileCopyrightText: V <v@unfathomable.blue>
# SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
# SPDX-License-Identifier: OSL-3.0

{ pkgs, ... }:

let
  root = "/var/lib/git";
in {
  users.users.git = {
    isSystemUser = true;
    group = "git";

    # This lets us address remote repositories like `trieste:foo`.
    home = root;

    # TODO(V): Remove the override once https://github.com/NixOS/nixpkgs/pull/128062 has made its way into stable.
    shell = pkgs.git // { shellPath = "/bin/git-shell"; };

    openssh.authorizedKeys.keys = [
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDXELHAMjO/BzoBFgTW9ln3td2WnXw9VGF3zpMBiswsx git@vityaz"
    ];
  };

  users.groups.git = {};

  systemd.tmpfiles.rules = [
    "d ${root} 0750 git git"
  ];

  declarative.git.repositories.basin = {};
}