diff --git a/global/software-configuration.nix b/global/software-configuration.nix index 0a39b51..12bea43 100644 --- a/global/software-configuration.nix +++ b/global/software-configuration.nix @@ -64,7 +64,13 @@ in "/files/" = { alias = downloadDir; - extraConfig = "autoindex on;"; + extraConfig = '' + autoindex on; + autoindex_exact_size off; + + add_before_body /.theme/header.html; + add_after_body /.theme/footer.html; + ''; }; "/transmission" = { @@ -72,11 +78,10 @@ in }; # resilio - /* - "/sync" = { + "/gui" = { proxyPass = "http://localhost:9000"; - }; - */ + }; + # kubo/ipfs /* diff --git a/global/stateless-configuration.nix b/global/stateless-configuration.nix deleted file mode 100644 index ad4485e..0000000 --- a/global/stateless-configuration.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - # /nix/persistent 是你实际保存文件的地方 - environment.persistence."/nix/persistent" = { - # 不让这些映射的 mount 出现在文件管理器的侧边栏中 - hideMounts = true; - - # 你要映射的文件夹 - directories = [ - # "/etc/NetworkManager/system-connections" - "/root" - "/var" - "/home" - "/boot" - ]; - - files = [ - "/etc/machine-id" - "/etc/ssh/ssh_host_ed25519_key.pub" - "/etc/ssh/ssh_host_ed25519_key" - "/etc/ssh/ssh_host_rsa_key.pub" - "/etc/ssh/ssh_host_rsa_key" - "/swapfile" - ]; - - users.pi = { - directories = [ - # 配置文件夹 - ".cache" - ".config" - ".gnupg" - ".local" - ".ssh" - ]; - files = [ ]; - }; - }; - - environment.variables.NIX_REMOTE = "daemon"; - - systemd.services.nix-daemon = { - environment = { - # 指定临时文件的位置 - TMPDIR = "/var/cache/nix"; - }; - serviceConfig = { - # 在 Nix Daemon 启动时自动创建 /var/cache/nix - CacheDirectory = "nix"; - }; - }; - - # Stateless rootfs - fileSystems."/" = { - device = "tmpfs"; - fsType = "tmpfs"; - options = [ "relatime" "mode=755" "nosuid" "nodev" ]; - }; -} diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 805d076..5f922f3 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -36,8 +36,6 @@ fsType = "ext4"; device = "/dev/disk/by-uuid/e419e4b8-d51c-4d5f-ad9f-91c4c0c4a52d"; options = [ - "mode=777" - "umask=000" "nodev" "noexec" "discard"