mirror of
https://github.com/Ascyii/nixos.git
synced 2025-12-31 22:44:23 -05:00
Added webdav module that just works with the new server setup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ config, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics = {
|
||||
@@ -13,6 +13,12 @@
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(blender.override {
|
||||
cudaSupport = true;
|
||||
})
|
||||
];
|
||||
|
||||
# This causes very long build times
|
||||
#nixpkgs.config.cudaSupport = true;
|
||||
#hardware.enableAllFirmware = true;
|
||||
|
||||
46
modules/services/webdav.nix
Normal file
46
modules/services/webdav.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ inputs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
services.davfs2.enable = true;
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ./../../secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = "/home/jonas/.config/sops/age/keys.txt";
|
||||
templates = {
|
||||
"davtemp" = {
|
||||
owner = "root";
|
||||
content = ''${config.sops.placeholder.webdav_secret}'';
|
||||
mode = "0600";
|
||||
path = "/etc/davfs2/secrets";
|
||||
};
|
||||
};
|
||||
secrets = {
|
||||
webdav_secret = {
|
||||
owner = "jonas";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure the mountpoint directory exists
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /mnt/webdav 0755 jonas users -"
|
||||
];
|
||||
|
||||
# Just works
|
||||
systemd.mounts = [
|
||||
{
|
||||
description = "Webdav mount point";
|
||||
wants = [ "network-online.target" ];
|
||||
what = "https://dav.hahn1.one";
|
||||
where = "/mnt/webdav";
|
||||
type = "davfs";
|
||||
options = "uid=1000,gid=1000,file_mode=0664,dir_mode=2775,_netdev";
|
||||
mountConfig.TimeoutSec = "5s";
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user