diff --git a/frame12/modules/home-manager/home.nix b/frame12/modules/home-manager/home.nix index 957a98d..3df4820 100644 --- a/frame12/modules/home-manager/home.nix +++ b/frame12/modules/home-manager/home.nix @@ -53,6 +53,7 @@ jq python310 unstable.claude-code + unstable.opencode ### LSP's nil nodePackages_latest.bash-language-server diff --git a/frame12/modules/niri/auto-rotation.nix b/frame12/modules/niri/auto-rotation.nix index 0e03697..f5c5c6f 100644 --- a/frame12/modules/niri/auto-rotation.nix +++ b/frame12/modules/niri/auto-rotation.nix @@ -42,7 +42,7 @@ let ORIENTATION="normal" # Simple orientation detection based on which axis has highest absolute value - if [ "$ABS_Z" -gt 9000 ]; then + if [ "$ABS_Z" -gt 16000 ]; then # Device is flat if [ "$Z" -lt 0 ]; then ORIENTATION="normal" diff --git a/shared/modules/services/dufs.nix b/shared/modules/services/dufs.nix index 599a610..266d212 100644 --- a/shared/modules/services/dufs.nix +++ b/shared/modules/services/dufs.nix @@ -87,6 +87,18 @@ in description = "Users with read-write access"; }; + allowUpload = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Allow file uploads"; + }; + + allowDelete = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Allow file deletion"; + }; + allowSearch = lib.mkOption { type = lib.types.bool; default = true; @@ -184,6 +196,8 @@ in --bind ${cfg.publicInstance.bind} \ --port ${toString cfg.publicInstance.port} \ ${authArgs} \ + ${lib.optionalString cfg.pblicInstance.allowUpload "--allow-upload"} \ + ${lib.optionalString cfg.pblicInstance.allowDelete "--allow-delete"} \ ${lib.optionalString cfg.publicInstance.allowSearch "--allow-search"} ''; Restart = "on-failure"; diff --git a/shared/server-configuration.nix b/shared/server-configuration.nix index 3355a6f..2d5f5b5 100644 --- a/shared/server-configuration.nix +++ b/shared/server-configuration.nix @@ -186,6 +186,8 @@ in publicInstance = { enable = true; port = 5000; + allowUpload = true; + allowDelete = false; allowSearch = true; # Admin users can upload/modify on public instance users = [