Archived
1
0
forked from rarias/bscpkgs

Store ceph secret key in age

This allows a node to mount the ceph FS without any extra ceph
configuration in /etc/ceph.
This commit is contained in:
2023-08-23 17:18:17 +02:00
parent d81d9d58e1
commit 9fc393bb6a
3 changed files with 20 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
environment.systemPackages = [ pkgs.ceph-client ];
@@ -7,8 +7,14 @@
# modprobe command.
boot.kernelModules = [ "ceph" ];
age.secrets."secrets/ceph-user".file = ./secrets/ceph-user.age;
fileSystems."/ceph" = {
fsType = "ceph";
device = "animal@9c8d06e0-485f-4aaf-b16b-06d6daf1232b.cephfs=/";
device = "user@9c8d06e0-485f-4aaf-b16b-06d6daf1232b.cephfs=/";
options = [
"mon_addr=10.0.40.40"
"secretfile=${config.age.secrets."secrets/ceph-user".path}"
];
};
}