From a0bf84422aaab68cee3282462a38f0593acab6c7 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 16 May 2024 02:24:25 +0200 Subject: [PATCH] Add configuration for nextcloud --- lib/users/manuel.nix | 21 +++++++++++++++++++++ secrets/global.yaml | 5 +++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/users/manuel.nix b/lib/users/manuel.nix index 3d77d3f..1df7e01 100644 --- a/lib/users/manuel.nix +++ b/lib/users/manuel.nix @@ -1,6 +1,7 @@ { config, user, ... }: { imports = [ ./common.nix + ../modules/rclone.nix ]; config = { @@ -10,10 +11,30 @@ age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ]; + + defaultSopsFile = ../../secrets/global.yaml; + secrets.nextcloud_password = {}; }; programs = { home-manager.enable = true; + rclone = { + enable = true; + + systemdDependencies = { + secrets = [ + "sops-nix.service" + ]; + }; + + configs = { + nextcloud.nextcloud = { + baseUrl = "https://cloud.nuth.ch"; + username = "manuth"; + obscuredPasswordFile = config.sops.secrets.nextcloud_password.path; + }; + }; + }; git = { enable = true; diff --git a/secrets/global.yaml b/secrets/global.yaml index af321ac..1040a5e 100644 --- a/secrets/global.yaml +++ b/secrets/global.yaml @@ -1,4 +1,5 @@ default_password: ENC[AES256_GCM,data:u6AqBJh7B4ZZH3ajoxlAeqNAbIQSCubPXpbL/mgLy1ma8JQmgX3rCHWog+AqMDJmjmjzaPGDvs5LDfAEKg8fNcmBXg9QU10M2w==,iv:JGTLsMHMPQ/kswvwQQLmQhP1Evb8sAM/vC0LUFjmaMA=,tag:LrsYykB/5J8NKs//vf+xjQ==,type:str] +nextcloud_password: ENC[AES256_GCM,data:VHYLQzVohZJuLWt538YbVzd3kfwW6H3iLE37UiUCHhlJeixZCT150YEBCEitzGyPPXyyzO189JfcIBke,iv:ygiqXNNtsfmzOZ3qGFWLKZ3jp2l3rkxBOwyLGsohPuU=,tag:lipWOIfHp0UzfYODM9v2Yw==,type:str] sops: kms: [] gcp_kms: [] @@ -32,8 +33,8 @@ sops: cEpDSGRFYVAzbnJ2Wi9LZDRmRnlDY1EKkw0LAIL9ychnGq70UczJnGkZo7R+ysGD DJ4NPIljBD6rQlfXEw5TGqbhsMT3QHca3ntYrywRPN+ZvtD7N5L5iQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-05-03T11:55:21Z" - mac: ENC[AES256_GCM,data:OmL25eALWEiT6fQ2xpXHYSlmHeaAJcGswmhTBMcHo8Xil8Rh2tIXWByWmzjp8QpeZcnYpJwzDF4Iw7t0y6OkghiXugPeqJATTRe5SmLh8RN1vaNnl/6cPjhoPGhTwRdIecKzQp+HvJjl+0nZaVABuozEWBw3xioOKxL0LqEC04w=,iv:D/MGv4zpjy9Fgg8OKfpyfwQyOfPEdR0QcjejYx/KEdk=,tag:wcuU6WNHlft+foPC/GvICQ==,type:str] + lastmodified: "2024-05-16T00:11:24Z" + mac: ENC[AES256_GCM,data:UHbn7T5oVD9BhtDcbVno26yelKVR8ngR5jkGAucagntATD7h2iteLMQljX0hRqpr7w0HPbBSaBbdz4PlyLvu57/sU6VQbjFuZi/79F+d5rOrulSUFgpKl0kyrkG97Dx+mZAHdvSc/JuGGf+0Bs/rqevzp8ZhXnpYgI4v0x7pk3M=,iv:7vge+gdMTKqTH5VdVee42osWeWRosrTJEXC2AsPaCqE=,tag:266n4f2IFuGl3Jk0t4gsSQ==,type:str] pgp: - created_at: "2024-05-15T22:00:47Z" enc: |-