mirror of
https://github.com/Ascyii/nixos.git
synced 2026-01-01 06:44:26 -05:00
Added webdav module that just works with the new server setup
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, config, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -8,7 +8,10 @@
|
|||||||
./../../modules/common.nix
|
./../../modules/common.nix
|
||||||
|
|
||||||
./../../modules/hardware/xremap.nix
|
./../../modules/hardware/xremap.nix
|
||||||
./../../modules/hardware/nvidia.nix
|
./../../modules/services/webdav.nix
|
||||||
|
#./../../modules/hardware/nvidia.nix
|
||||||
|
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "minoxy";
|
networking.hostName = "minoxy";
|
||||||
@@ -21,12 +24,6 @@
|
|||||||
systemd.targets.sleep.enable = true;
|
systemd.targets.sleep.enable = true;
|
||||||
systemd.targets.suspend.enable = true;
|
systemd.targets.suspend.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(blender.override {
|
|
||||||
cudaSupport = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
virtualisation.docker.storageDriver = "btrfs";
|
virtualisation.docker.storageDriver = "btrfs";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
@@ -13,6 +13,12 @@
|
|||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(blender.override {
|
||||||
|
cudaSupport = true;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
# This causes very long build times
|
# This causes very long build times
|
||||||
#nixpkgs.config.cudaSupport = true;
|
#nixpkgs.config.cudaSupport = true;
|
||||||
#hardware.enableAllFirmware = 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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
hello: ENC[AES256_GCM,data:k1EMjZbnlcpYw5pcRtQHGDfa/O++mQfxdr9vBHx+UFVFbofKaCKGEIdrVUE16Q==,iv:ahDFZ2w9BIpIANQSU02lNVx/iSUJD5PhlLATAjQmEdY=,tag:w5+8IWG8zb211Vc+UTwg3g==,type:str]
|
webdav_secret: ENC[AES256_GCM,data:OZyEFW/Aw2dPqZFvZoPWA/BBO7k/lzw0UVffuuEuNBTkjN+eHAxFZw==,iv:Y6kTyMb5wD5iJ1g6OHPiHGuu8qFjiduau0mjcS8KLjs=,tag:97OIL+aegLCMjlJM0SdJBg==,type:str]
|
||||||
sops:
|
sops:
|
||||||
age:
|
age:
|
||||||
- recipient: age1a2kpues0gayampkn9pn2czhk24r0yl4jnw84qg4gh5l72dflx95qkmyqzv
|
- recipient: age1a2kpues0gayampkn9pn2czhk24r0yl4jnw84qg4gh5l72dflx95qkmyqzv
|
||||||
@@ -10,7 +10,7 @@ sops:
|
|||||||
dmFEc1hrR3czZTBzU2pLQ0ZUL3VPblEKRwy03xI+qiTMJsmG/pe/3WoB8c+vLtXo
|
dmFEc1hrR3czZTBzU2pLQ0ZUL3VPblEKRwy03xI+qiTMJsmG/pe/3WoB8c+vLtXo
|
||||||
kaYY18r3tICKfxQQyDWh3Gevo2+CGhblCcgJ3AnyWQBqIZwIudDuHw==
|
kaYY18r3tICKfxQQyDWh3Gevo2+CGhblCcgJ3AnyWQBqIZwIudDuHw==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2025-08-30T23:26:45Z"
|
lastmodified: "2025-08-31T02:50:46Z"
|
||||||
mac: ENC[AES256_GCM,data:N2986cJFr1zr7bykl1FDIJRqhO+gzXjqrL9ly1z3DNrbB8uus2ab7SrynueBdQvbICMslBuj3Q2WliEqpc8E0Td71bBaKz0kmbVBvrNm9HoRmQMkRSDQderBSrhlUnYYlwYViKOS07eoGGzvJ6LRpS4VCznW/S2/RJxSUmQ3oms=,iv:7RsMmeEDgWEZSKVPHibeoSYldYUf2sOI/HaVKAW6p8o=,tag:yjZ7LxfXUd1e6w6VNzIA5w==,type:str]
|
mac: ENC[AES256_GCM,data:Gl7cLnEJ3TVL4gS4CAZQESJyzVWqm3aSLN/doLBHnAYL/Shu42ygJuuT+jKdFXo4tXKjYJuvw7gmuoVFx0L23lRpqUeU4b9fExmJX/ZVGZwJC3nreFCBqx8LWkF2cGtZJ1HObu97EzlKBxQ8c/QZZ/v3C4pAfwxNNiVavu8BUfg=,iv:qeKjETggLjtCNCyuM2z5WX4JGPcxcN99QBPQmK/a0NE=,tag:NwV56PeRGcxsdn46lre2Sg==,type:str]
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.10.2
|
version: 3.10.2
|
||||||
|
|||||||
Reference in New Issue
Block a user