From e0f73777601e56a1dec00d1d2b015fe3af5aba9c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 3 Sep 2018 20:14:25 +0200 Subject: gitolite on odin --- odin.nix | 16 ++++++++++++++++ odin/hw.nix | 23 ++++++++++++++--------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/odin.nix b/odin.nix index e2f95f9d..cc0b70f6 100644 --- a/odin.nix +++ b/odin.nix @@ -404,6 +404,22 @@ }; }; + services.gitolite = { + enable = true; + adminPubkey = buildins.readFile (builtins.head (import ./users/gkleen.nix).openssh.authorizedKeys.keyFiles); + dataDir = "/srv/git"; + user = "gitolite"; + group = "git"; + enableGitAnnex = true; + extraGitoliteRc = '' + $RC{LOG_DEST} = 'syslog'; + $RC{GROUPLIST_PGM} = 'printf "@self-key-managers"'; + $RC{HOSTNAME} = '${networking.hostName}'; + $RC{LOCAL_CODE} = "$rc{GL_ADMIN_BASE}/local"; + push(@{$RC{ENABLE}}, qw(create fork D repo-specific-hooks macros git-annex-shell ua)); + ''; + }; + systemd.status-mail = { recipient = "root@odin.asgard.yggdrasil"; onFailure = [ "nixos-upgrade" diff --git a/odin/hw.nix b/odin/hw.nix index 1d1c7eaa..ae8cf825 100644 --- a/odin/hw.nix +++ b/odin/hw.nix @@ -34,7 +34,7 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/8dea04a6-4485-4cd2-bab5-d23321a11df9"; + { device = "/dev/ssd-raid1/root"; fsType = "ext4"; }; @@ -44,43 +44,48 @@ }; fileSystems."/srv/hlidskjalf" = - { device = "/dev/disk/by-uuid/e796f44c-2b0b-40a8-af22-90beb898d25e"; + { device = "/dev/raid6/hlidskjalf"; + fsType = "ext4"; + }; + + fileSystems."/srv/git" = + { device = "/dev/raid6/git"; fsType = "ext4"; }; fileSystems."/home" = - { device = "/dev/disk/by-uuid/e4737a9e-2a25-4247-936d-c0c4bad82970"; + { device = "/dev/raid6/home"; fsType = "ext4"; options = [ "defaults" "quota" ]; }; fileSystems."/root" = - { device = "/dev/disk/by-uuid/04d2f6cb-80de-43a4-80bd-d569e2304b6a"; + { device = "/dev/raid6/root"; fsType = "ext4"; }; fileSystems."/srv/media" = - { device = "/dev/disk/by-uuid/09959dcd-e8ca-4958-89b2-993cc79fe8f7"; + { device = "/dev/raid6/media"; fsType = "ext4"; }; fileSystems."/srv/mail" = - { device = "/dev/disk/by-uuid/d43c25b5-2c0f-4ac9-9f0b-de93c33442a1"; + { device = "/dev/raid6/mail"; fsType = "ext4"; }; fileSystems."/nix/store" = - { device = "/dev/disk/by-uuid/b36a581c-e38c-4c25-9073-18a313cce286"; + { device = "/dev/ssd-nvme/nix-store"; fsType = "xfs"; }; fileSystems."/var/spool" = - { device = "/dev/disk/by-uuid/5cb9231d-8d8d-45bf-b581-7a3422b0c3fe"; + { device = "/dev/raid6/spool"; fsType = "xfs"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/a27e368d-e1ed-41e5-8bcb-6e5865670532"; } + [ { device = "/dev/ssd-raid1/swap"; } ]; nix.maxJobs = lib.mkDefault 8; -- cgit v1.2.3